* [PATCH] lib: Move crypto library tests to Runtime Testing menu
@ 2026-03-22 3:24 Eric Biggers
2026-03-22 20:08 ` Randy Dunlap
2026-03-24 23:27 ` Eric Biggers
0 siblings, 2 replies; 3+ messages in thread
From: Eric Biggers @ 2026-03-22 3:24 UTC (permalink / raw)
To: linux-crypto
Cc: linux-kernel, Ard Biesheuvel, Jason A . Donenfeld, Herbert Xu,
kunit-dev, linux-kselftest, Eric Biggers
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 <ebiggers@kernel.org>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lib: Move crypto library tests to Runtime Testing menu
2026-03-22 3:24 [PATCH] lib: Move crypto library tests to Runtime Testing menu Eric Biggers
@ 2026-03-22 20:08 ` Randy Dunlap
2026-03-24 23:27 ` Eric Biggers
1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2026-03-22 20:08 UTC (permalink / raw)
To: Eric Biggers, linux-crypto
Cc: linux-kernel, Ard Biesheuvel, Jason A . Donenfeld, Herbert Xu,
kunit-dev, linux-kselftest
On 3/21/26 8:24 PM, Eric Biggers wrote:
> 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.
Ack.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
> ---
>
> 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"
> -
Ah, I see, no menus or user prompts remaining there.
> 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
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lib: Move crypto library tests to Runtime Testing menu
2026-03-22 3:24 [PATCH] lib: Move crypto library tests to Runtime Testing menu Eric Biggers
2026-03-22 20:08 ` Randy Dunlap
@ 2026-03-24 23:27 ` Eric Biggers
1 sibling, 0 replies; 3+ messages in thread
From: Eric Biggers @ 2026-03-24 23:27 UTC (permalink / raw)
To: linux-crypto
Cc: linux-kernel, Ard Biesheuvel, Jason A . Donenfeld, Herbert Xu,
kunit-dev, linux-kselftest
On Sat, Mar 21, 2026 at 08:24:38PM -0700, Eric Biggers wrote:
> 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 <ebiggers@kernel.org>
> ---
>
> This patch is targeting the libcrypto-next tree
>
> lib/Kconfig.debug | 2 ++
> lib/crypto/Kconfig | 6 ------
> 2 files changed, 2 insertions(+), 6 deletions(-)
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next
- Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-24 23:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-22 3:24 [PATCH] lib: Move crypto library tests to Runtime Testing menu Eric Biggers
2026-03-22 20:08 ` Randy Dunlap
2026-03-24 23:27 ` Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox