]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lib: Move crypto library tests to Runtime Testing menu
authorEric Biggers <ebiggers@kernel.org>
Sun, 22 Mar 2026 03:24:38 +0000 (20:24 -0700)
committerEric Biggers <ebiggers@kernel.org>
Tue, 24 Mar 2026 00:50:59 +0000 (17:50 -0700)
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.

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20260322032438.286296-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/Kconfig.debug
lib/crypto/Kconfig

index 93f356d2b3d955b2501e712bef1569503eb29036..1463585300102603417d02932355b802dfdaed22 100644 (file)
@@ -3058,6 +3058,8 @@ config HW_BREAKPOINT_KUNIT_TEST
 
          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
index 91b1d0eb13b0913140e31e4bfee8f0c2796222d2..4b6f593dc72f5e6f0b75501448891cbdaf834cbe 100644 (file)
@@ -1,7 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 
-menu "Crypto library routines"
-
 config CRYPTO_HASH_INFO
        bool
 
@@ -283,7 +281,3 @@ config CRYPTO_LIB_SM3_ARCH
        default y if RISCV && 64BIT && TOOLCHAIN_HAS_VECTOR_CRYPTO && \
                     RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS
        default y if X86_64
-
-source "lib/crypto/tests/Kconfig"
-
-endmenu