Skip to contentSkip to conversation

lib: Move crypto library tests to Runtime Testing menu

PATCH Applied Eric Biggers 2 participants 3 messages Mar 22 – Mar 24

Subsystems (4)
lore
Share & tools
lore

Eric Biggers

author maintainer
#0 lore raw

PATCH 1/1 lib: Move crypto library tests to Runtime Testing menu

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.

---

This patch is targeting the libcrypto-next tree

 lib/Kconfig.debug  | 2 ++
 lib/crypto/Kconfig | 6 ------
 2 files changed, 2 insertions(+), 6 deletions(-)
lib/Kconfig.debug +2 -0
index 93f356d2b3d9..146358530010 100644
@@ -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
lib/crypto/Kconfig +0 -6
index 4910fe20e42a..f7a21d20e470 100644
@@ -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
Signature · 1 line
2.53.0
Acked-by Tested-by on v1 1/1
#1 lore raw
Quoted 14 lines · 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:

Quoted 7 lines
    -> 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.

Quoted 2 lines
Quoted 30 lines

---

This patch is targeting the libcrypto-next tree

 lib/Kconfig.debug  | 2 ++
 lib/crypto/Kconfig | 6 ------
 2 files changed, 2 insertions(+), 6 deletions(-)
lib/Kconfig.debug +2 -0
index 93f356d2b3d9..146358530010 100644
@@ -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
lib/crypto/Kconfig +0 -0
index 4910fe20e42a..f7a21d20e470 100644

lib/crypto/Kconfig line 4

Quoted 4 lines
lib/crypto/Kconfig +0 -2
@@ -1,9 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
-menu "Crypto library routines"
-

Ah, I see, no menus or user prompts remaining there.

Quoted 15 lines
lib/crypto/Kconfig +0 -4
 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
Signature · 1 line
~Randy
author maintainer Applied
#2 lore raw
In reply to Eric Biggers
Quoted 22 lines · 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.

Quoted 8 lines

---

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