OSDN Git Service

crypto: testmgr - introduce CONFIG_CRYPTO_MANAGER_EXTRA_TESTS
authorEric Biggers <ebiggers@google.com>
Fri, 1 Feb 2019 07:51:44 +0000 (23:51 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 Feb 2019 07:30:09 +0000 (15:30 +0800)
commit5b2706a4d45987dfa9102f9529a8436392526111
tree765cac647685de64d941093d3d737000e552aaa4
parent3f47a03df6e81174558f4604828851cb600e1db6
crypto: testmgr - introduce CONFIG_CRYPTO_MANAGER_EXTRA_TESTS

To achieve more comprehensive crypto test coverage, I'd like to add fuzz
tests that use random data layouts and request flags.

To be most effective these tests should be part of testmgr, so they
automatically run on every algorithm registered with the crypto API.
However, they will take much longer to run than the current tests and
therefore will only really be intended to be run by developers, whereas
the current tests have a wider audience.

Therefore, add a new kconfig option CONFIG_CRYPTO_MANAGER_EXTRA_TESTS
that can be set by developers to enable these extra, expensive tests.

Similar to the regular tests, also add a module parameter
cryptomgr.noextratests to support disabling the tests.

Finally, another module parameter cryptomgr.fuzz_iterations is added to
control how many iterations the fuzz tests do.  Note: for now setting
this to 0 will be equivalent to cryptomgr.noextratests=1.  But I opted
for separate parameters to provide more flexibility to add other types
of tests under the "extra tests" category in the future.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/Kconfig
crypto/testmgr.c