linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhou Wang <wangzhou1@hisilicon.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	<linux-crypto@vger.kernel.org>, <linuxarm@huawei.com>
Subject: Re: [PATCH] crypto: zlib-deflate - add zlib-deflate test case in tcrypt
Date: Tue, 22 Oct 2019 15:04:52 +0800	[thread overview]
Message-ID: <5DAEAA14.3020208@hisilicon.com> (raw)
In-Reply-To: <20191022061550.jak3xnou2gezdfxf@gondor.apana.org.au>

On 2019/10/22 14:15, Herbert Xu wrote:
> 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.

I got it, thanks for your explanation. Will stop to do this.

Best,
Zhou

> 
> Cheers,
> 


      reply	other threads:[~2019-10-22  7:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10  8:21 [PATCH] crypto: zlib-deflate - add zlib-deflate test case in tcrypt Zhou Wang
2019-10-17  6:12 ` Zhou Wang
2019-10-18  7:14 ` Herbert Xu
2019-10-21  4:00   ` Zhou Wang
2019-10-21  5:45     ` Herbert Xu
2019-10-21  8:45       ` Zhou Wang
2019-10-22  6:15         ` Herbert Xu
2019-10-22  7:04           ` Zhou Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5DAEAA14.3020208@hisilicon.com \
    --to=wangzhou1@hisilicon.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).