Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5211656ybg; Mon, 21 Oct 2019 23:17:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwInqrgZ/qfVZesECWZMHSHuUWcMTV95D0MOYYpmlBpe82iSjxXA8ZS5qiQyjn2Jq5+O04V X-Received: by 2002:a17:906:6d45:: with SMTP id a5mr1728704ejt.218.1571725071756; Mon, 21 Oct 2019 23:17:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571725071; cv=none; d=google.com; s=arc-20160816; b=kD85u22BFqbsb0K1g65LTwdOTfjd4xSN/vMt+yGN+rcUQGUdN8WMvFlSsap/C7Z0G+ REczB7e2Kfy0n+mE8yIDl4KyFwgICUU4WuAoW2sHLW9nOwgk7YoefnhDe76Q/aRgMmM6 H09tR+S9+ZU2vVymN9jEf29399kEIjhsUV2pnQT3yjIPAKZdJRQYYUWosnbdSdmdnw6w eRpAKHUjAIeDIvolZBPOd1kKm0mzWLaOtDE9+XtgGI6ToCI37U8sztEb2QBzSLd17FPs jKWAYjhg+0aRhNuEThNqIZIAZyxSoZHEn2ZQIfQc2L6UONK9QVH7lu+4zQ/SyXflkupF mdPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bJBNbLSYUTEbmccQlw5CrGAjiRT5FlJBhMf+eEC3bME=; b=n5IX4r479zrmCsRUjxV0934xVIczN3xp8DDjUVRGM7y/GdpxWC5evZ40aiXIfnka2k sGkgJEqPVvdM05Ck2mNwDtHSJlShAenMHFUhYjuL5Q39BoQ0D0tYvqpF5X3qSt+j48gn 7R6FAiN1SabB5C2ZkVInDqUgMLCiNX6hghTnDr7Uq1UWaoDqeg6mKuomQyjIlgTUmtFY kvhXDuQUxC4ekgOxPlkRIcrC43EqJyHK8nL4b6Z98A1KAEF7xEjZXEi4ruAO0WMYNWNr p1fmwOazuFhylJJlcSCQd84z6tj0SkH9o0CmqIfw+SQouSset7mKPQSSVIl/C6pTB6y3 /HtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w23si10160427ejj.214.2019.10.21.23.17.23; Mon, 21 Oct 2019 23:17:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387675AbfJVGP5 (ORCPT + 99 others); Tue, 22 Oct 2019 02:15:57 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:43546 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387488AbfJVGP5 (ORCPT ); Tue, 22 Oct 2019 02:15:57 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1iMnST-0001Lm-EB; Tue, 22 Oct 2019 14:15:53 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1iMnSQ-00025c-RF; Tue, 22 Oct 2019 14:15:50 +0800 Date: Tue, 22 Oct 2019 14:15:50 +0800 From: Herbert Xu To: Zhou Wang Cc: "David S. Miller" , linux-crypto@vger.kernel.org, linuxarm@huawei.com Subject: Re: [PATCH] crypto: zlib-deflate - add zlib-deflate test case in tcrypt Message-ID: <20191022061550.jak3xnou2gezdfxf@gondor.apana.org.au> References: <1570695707-46528-1-git-send-email-wangzhou1@hisilicon.com> <20191018071424.GA16131@gondor.apana.org.au> <5DAD2D40.6000901@hisilicon.com> <20191021054559.GA32542@gondor.apana.org.au> <5DAD701A.7010701@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5DAD701A.7010701@hisilicon.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Oct 21, 2019 at 04:45:14PM +0800, Zhou Wang wrote: > > I made CRYPTO_MANAGER_DISABLE_TESTS=n and CRYPTO_TEST=m. After loading > hisi_qm and hisi_zip modules, I got: > > [ 138.232605] hisi_zip 0000:75:00.0: Adding to iommu group 40 > [ 138.239325] hisi_zip 0000:75:00.0: enabling device (0000 -> 0002) > [ 138.245896] hisi_zip 0000:b5:00.0: Adding to iommu group 41 > [ 138.252435] hisi_zip 0000:b5:00.0: enabling device (0000 -> 0002) > [ 138.260393] alg: No test for gzip (hisi-gzip-acomp) > > This is OK: as the test of zlib-deflate of hisi_zip was successful, so > it was quiet, as there is no test case for gzip, so it printed above message. > > cat /proc/crypto, I got: > name : gzip > driver : hisi-gzip-acomp > module : hisi_zip > priority : 300 > refcnt : 1 > selftest : passed > internal : no > type : acomp > > name : zlib-deflate > driver : hisi-zlib-acomp > module : hisi_zip > priority : 300 > refcnt : 1 > selftest : passed > internal : no > type : acomp > [...] > > However, seems we can not trigger a test by loading tcrypto. The test has already been carried out when the algorithm is registered. Testing twice doesn't change anything. To trigger a new test, unload the algorithm and then run tcrypt again. > Do you mean as crypto_has_alg can detect if an alg has already > been tested, so it directly breaks in the case 0 in do test in tcrypto? As I said, tests are always carried out at registration time so by triggering the registration tcrypt knows that the test would have already occured. In fact this tcrypt code exists only for legacy reasons. You can also trigger the registration directly by loading your modules or for templates use crconf. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt