Currently the kconfig options for the crypto library KUnit tests appear
in the menu:

    -> Library routines
      -> Crypto library routines

However, this is the only content of "Crypto library routines".  I.e.,
it is empty when CONFIG_KUNIT=n.  This is because the crypto library
routines themselves don't have (or need to have) prompts.

Since this usually ends up as an unnecessary empty menu, let's remove
this menu and instead source the lib/crypto/tests/Kconfig file from
lib/Kconfig.debug inside the "Runtime Testing" menu:

    -> Kernel hacking
      -> Kernel Testing and Coverage
        -> Runtime Testing

This puts the prompts alongside the ones for most of the other lib/
KUnit tests.  This seems to be a much better match to how the kconfig
menus are organized.

Signed-off-by: Eric Biggers <[email protected]>
---

This patch is targeting the libcrypto-next tree

 lib/Kconfig.debug  | 2 ++
 lib/crypto/Kconfig | 6 ------
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 93f356d2b3d9..146358530010 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -3056,10 +3056,12 @@ config HW_BREAKPOINT_KUNIT_TEST
        help
          Tests for hw_breakpoint constraints accounting.
 
          If unsure, say N.
 
+source "lib/crypto/tests/Kconfig"
+
 config SIPHASH_KUNIT_TEST
        tristate "Perform selftest on siphash functions" if !KUNIT_ALL_TESTS
        depends on KUNIT
        default KUNIT_ALL_TESTS
        help
diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig
index 4910fe20e42a..f7a21d20e470 100644
--- a/lib/crypto/Kconfig
+++ b/lib/crypto/Kconfig
@@ -1,9 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
-menu "Crypto library routines"
-
 config CRYPTO_HASH_INFO
        bool
 
 config CRYPTO_LIB_UTILS
        tristate
@@ -265,9 +263,5 @@ config CRYPTO_LIB_SHA3_ARCH
        default y if ARM64
        default y if S390
 
 config CRYPTO_LIB_SM3
        tristate
-
-source "lib/crypto/tests/Kconfig"
-
-endmenu
-- 
2.53.0


Reply via email to