Hi Eric, Thanks for your patch!
On Thu, 26 Feb 2026 at 20:20, Eric Biggers <[email protected]> wrote: > The convention for KUnit tests is to have the test kconfig options > visible only when the code they depend on is already enabled. This way > only the tests that are relevant to the particular kernel build can be > enabled, either manually or via KUNIT_ALL_TESTS. > > Update lib/crypto/tests/Kconfig to follow that convention, i.e. depend > on the corresponding library options rather than selecting them. This > fixes an issue where enabling KUNIT_ALL_TESTS enabled non-test code. > > This does mean that it becomes more difficult to enable *all* the crypto > library tests (which is what I do as a maintainer of the code), since > doing so will now require enabling other options that select the > libraries. Regardless, we should follow the standard KUnit convention. > > Note: currently most of the crypto library options are selected by > visible options in crypto/Kconfig, which can be used to enable them > without too much trouble. If in the future we end up with more cases > like CRYPTO_LIB_CURVE25519 which is selected only by WIREGUARD (thus > making CRYPTO_LIB_CURVE25519_KUNIT_TEST effectively depend on WIREGUARD > after this commit), we could consider adding a new kconfig option that > enables all the library code specifically for testing. You can make those library symbols visible if KUNIT_ALL_TESTS, like I suggested (after I sent my earlier reports to you) in [1], and like Vladimir already did in [2]. > Reported-by: Geert Uytterhoeven <[email protected]> > Closes: > https://lore.kernel.org/r/camuhmdvfrqzxckjbobdjtpenvpvo39axgmufwvqdm6xktpn...@mail.gmail.com [1] "Re: [PATCH v3 net-next 05/10] phy: add phy_get_rx_polarity() and phy_get_tx_polarity()" https://lore.kernel.org/camuhmdubaoyknj52gn8dqezfz42cvm6xt6fvo0-_twnv1k3...@mail.gmail.com/ [2] "[PATCH phy-fixes] phy: make PHY_COMMON_PROPS Kconfig symbol conditionally user-selectable" https://lore.kernel.org/[email protected]/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds

