crypto: testmgr - make extra tests depend on cryptomgr

The crypto self-tests are part of the "cryptomgr" module, which can
technically be disabled (though it rarely is).  If you do so, currently
you can still enable CRYPTO_MANAGER_EXTRA_TESTS, which doesn't make
sense since in that case testmgr.c isn't compiled at all.  Fix it by
making it CRYPTO_MANAGER_EXTRA_TESTS depend on CRYPTO_MANAGER2, like
CRYPTO_MANAGER_DISABLE_TESTS already does.

Fixes: 5b2706a4d4 ("crypto: testmgr - introduce CONFIG_CRYPTO_MANAGER_EXTRA_TESTS")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Eric Biggers 2019-05-20 09:48:29 -07:00 committed by Herbert Xu
parent e944eab37a
commit 929d34cac1
1 changed files with 4 additions and 1 deletions

View File

@ -137,10 +137,11 @@ config CRYPTO_USER
Userspace configuration for cryptographic instantiations such as Userspace configuration for cryptographic instantiations such as
cbc(aes). cbc(aes).
if CRYPTO_MANAGER2
config CRYPTO_MANAGER_DISABLE_TESTS config CRYPTO_MANAGER_DISABLE_TESTS
bool "Disable run-time self tests" bool "Disable run-time self tests"
default y default y
depends on CRYPTO_MANAGER2
help help
Disable run-time self tests that normally take place at Disable run-time self tests that normally take place at
algorithm registration. algorithm registration.
@ -155,6 +156,8 @@ config CRYPTO_MANAGER_EXTRA_TESTS
This is intended for developer use only, as these tests take much This is intended for developer use only, as these tests take much
longer to run than the normal self tests. longer to run than the normal self tests.
endif # if CRYPTO_MANAGER2
config CRYPTO_GF128MUL config CRYPTO_GF128MUL
tristate "GF(2^128) multiplication functions" tristate "GF(2^128) multiplication functions"
help help