On Tue, Apr 22, 2025 at 01:10:47PM +0100, Mark Brown wrote: > On Mon, Apr 14, 2025 at 04:35:00PM +0200, Geert Uytterhoeven wrote: > > Enabling a (modular) test should not silently enable additional kernel > > functionality, as that may increase the attack vector of a product. > > > > Fix this by making PRIME_NUMBERS_KUNIT_TEST depend on PRIME_NUMBERS > > instead of selecting it. > > > > After this, one can safely enable CONFIG_KUNIT_ALL_TESTS=m to build > > modules for all appropriate tests for ones system, without pulling in > > extra unwanted functionality, while still allowing a tester to manually > > enable PRIME_NUMBERS and this test suite on a system where PRIME_NUMBERS > > is not enabled by default. Resurrect CONFIG_PRIME_NUMBERS=m in > > tools/testing/selftests/lib/config for the latter use case. > > This commit, which is now in mainline, causes the prime numbers test to > vanish from my CI which is a regression - the selftests config fragment > is obviously not picked up by the kunit runner when it builds the > kernel. You should add any KUnit tests to one of the configs in > tools/testing/kunit/configs/ - generally all_tests.config.
Ah! Thanks -- I forgot about these (apparently my memory horizon is at most 2 years, considering commit 4d9060981f88 ("kunit: tool: Enable CONFIG_FORTIFY_SOURCE under UML"). Does this look like you're expecting? diff --git a/tools/testing/kunit/configs/all_tests.config b/tools/testing/kunit/configs/all_tests.config index cdd9782f9646..554da9df02f2 100644 --- a/tools/testing/kunit/configs/all_tests.config +++ b/tools/testing/kunit/configs/all_tests.config @@ -51,3 +51,5 @@ CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_SOC=y CONFIG_SND_SOC_TOPOLOGY_BUILD=y + +CONFIG_PRIME_NUMBERS=y -- Kees Cook