Skip to contentSkip to conversation

lib/crypto: tests: Fix aes_cbc_macs dependency and add to kunitconfig

PATCH In review Eric Biggers 1 participant 2 messages Mar 6 – Mar 9

Subsystems (2)
lore
Share & tools
lore

Eric Biggers

author maintainer
#0 lore raw

PATCH 1/1 lib/crypto: tests: Fix aes_cbc_macs dependency and add to kunitconfig

Update the dependency of CRYPTO_LIB_AES_CBC_MACS_KUNIT_TEST to match the new convention established by commit 4478e8eeb871 ("lib/crypto: tests:
Depend on library options rather than selecting them"), and add this test to the kunitconfig file added by commit 20d6f07004d6 ("lib/crypto:
tests: Add a .kunitconfig file").

---

This is targeting libcrypto-next. This patch is needed because the aes_cbc_macs test is queued for 7.1 and wasn't handled by the commits mentioned above which were merged into 7.0.

 lib/crypto/.kunitconfig  | 3 +++
 lib/crypto/tests/Kconfig | 3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)
lib/crypto/.kunitconfig +3 -0
index 6b2ce28ae509..8cfd213bded9 100644
@@ -3,12 +3,14 @@ CONFIG_KUNIT=y
 # These kconfig options select all the CONFIG_CRYPTO_LIB_* symbols that have a
 # corresponding KUnit test.  Those symbols cannot be directly enabled here,
 # since they are hidden symbols.
 CONFIG_CRYPTO=y
 CONFIG_CRYPTO_ADIANTUM=y
+CONFIG_CRYPTO_AES=y
 CONFIG_CRYPTO_BLAKE2B=y
 CONFIG_CRYPTO_CHACHA20POLY1305=y
+CONFIG_CRYPTO_CMAC=y
 CONFIG_CRYPTO_HCTR2=y
 CONFIG_CRYPTO_MD5=y
 CONFIG_CRYPTO_MLDSA=y
 CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA256=y
@@ -18,10 +20,11 @@ CONFIG_INET=y
 CONFIG_IPV6=y
 CONFIG_NET=y
 CONFIG_NETDEVICES=y
 CONFIG_WIREGUARD=y
 
+CONFIG_CRYPTO_LIB_AES_CBC_MACS_KUNIT_TEST=y
 CONFIG_CRYPTO_LIB_BLAKE2B_KUNIT_TEST=y
 CONFIG_CRYPTO_LIB_BLAKE2S_KUNIT_TEST=y
 CONFIG_CRYPTO_LIB_CURVE25519_KUNIT_TEST=y
 CONFIG_CRYPTO_LIB_MD5_KUNIT_TEST=y
 CONFIG_CRYPTO_LIB_MLDSA_KUNIT_TEST=y
lib/crypto/tests/Kconfig +1 -2
index f6b842cad97e..0d71de3da15d 100644
@@ -1,13 +1,12 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 
 config CRYPTO_LIB_AES_CBC_MACS_KUNIT_TEST
 	tristate "KUnit tests for AES-CMAC, AES-XCBC-MAC, and AES-CBC-MAC" if !KUNIT_ALL_TESTS
-	depends on KUNIT
+	depends on KUNIT && CRYPTO_LIB_AES_CBC_MACS
 	default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS
 	select CRYPTO_LIB_BENCHMARK_VISIBLE
-	select CRYPTO_LIB_AES_CBC_MACS
 	help
 	  KUnit tests for the AES-CMAC, AES-XCBC-MAC, and AES-CBC-MAC message
 	  authentication codes.
 
 config CRYPTO_LIB_BLAKE2B_KUNIT_TEST

base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f

author maintainer
#1 lore raw
Quoted 9 lines · Eric Biggers

Update the dependency of CRYPTO_LIB_AES_CBC_MACS_KUNIT_TEST to match the new convention established by commit 4478e8eeb871 ("lib/crypto: tests:
Depend on library options rather than selecting them"), and add this test to the kunitconfig file added by commit 20d6f07004d6 ("lib/crypto:
tests: Add a .kunitconfig file").

---

Quoted 7 lines

This is targeting libcrypto-next. This patch is needed because the aes_cbc_macs test is queued for 7.1 and wasn't handled by the commits mentioned above which were merged into 7.0.

 lib/crypto/.kunitconfig  | 3 +++
 lib/crypto/tests/Kconfig | 3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)

I folded this into "lib/crypto: tests: Add KUnit tests for CBC-based MACs", since it's a fix for that commit.

- Eric