On Thu, Feb 26, 2026 at 02:12:38PM +0100, Geert Uytterhoeven wrote: > Hi Eric, > > On Thu, 11 Dec 2025 at 02:25, Eric Biggers <[email protected]> wrote: > > Add some simple KUnit tests for the nh() function. > > > > These replace the test coverage which will be lost by removing the > > nhpoly1305 crypto_shash. > > > > Note that the NH code also continues to be tested indirectly as well, > > via the tests for the "adiantum(xchacha12,aes)" crypto_skcipher. > > > > Signed-off-by: Eric Biggers <[email protected]> > > Thanks for your patch, which is now commit 7246fe6cd64475d8 > ("lib/crypto: tests: Add KUnit tests for NH") in v7.0-rc1. > > > --- a/lib/crypto/tests/Kconfig > > +++ b/lib/crypto/tests/Kconfig > > @@ -45,10 +45,18 @@ config CRYPTO_LIB_MLDSA_KUNIT_TEST > > select CRYPTO_LIB_BENCHMARK_VISIBLE > > select CRYPTO_LIB_MLDSA > > help > > KUnit tests for the ML-DSA digital signature algorithm. > > > > +config CRYPTO_LIB_NH_KUNIT_TEST > > + tristate "KUnit tests for NH" if !KUNIT_ALL_TESTS > > + depends on KUNIT > > + default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS > > + select CRYPTO_LIB_NH > > This select means that enabling KUNIT_ALL_TESTS also enables > extra functionality, which may not be desirable in a production system. > Fortunately CRYPTO_LIB_NH is tristate, so in the modular case the > extra functionality is a module, too, and not part of the running > system by default. Unfortunately CRYPTO_LIB_NH is invisible, so this > cannot just be changed from "select" to "depends on".
I'll probably be changing this, pending the result of the discussion on the similar thread about CRYPTO_LIB_MLDSA_KUNIT_TEST: https://lore.kernel.org/linux-crypto/20260226180538.GC2251@sol/ - Eric

