History

lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS

This is in line with Documentation/dev-tools/kunit/style.rst. Some of these tests predate that so they don't follow this convention. With this and commit b0841b51cac9 ("kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default"), kunit.py will now run these tests by default. This hopefully makes it easier to run and maintain the tests. If any of these were to start failing, people would notice much quicker. Note: this commit doesn't update LINEAR_RANGES_TEST since that would select its dependency (LINEAR_RANGES). We don't want KUNIT_ALL_TESTS to enable anything other than test kconfigs.

Daniel Latypov committed 4 years ago

Commit dcbb2ee1 parent ad691721 file · +10 −5Browse files

Unified · Split

lib/Kconfig.debug+10−5
@@ -2140,10 +2140,11 @@ config TEST_DIV64 · 2139 unmodified lines
21402140 If unsure, say N.
21412141
21422142 config KPROBES_SANITY_TEST
2143− tristate "Kprobes sanity tests"
2143+ tristate "Kprobes sanity tests" if !KUNIT_ALL_TESTS
21442144 depends on DEBUG_KERNEL
21452145 depends on KPROBES
21462146 depends on KUNIT
2147+ default KUNIT_ALL_TESTS
21472148 help
21482149 This option provides for testing basic kprobes functionality on
21492150 boot. Samples of kprobe and kretprobe are inserted and
@@ -2417,8 +2418,9 @@ config TEST_SYSCTL · 267 unmodified lines
24172418 If unsure, say N.
24182419
24192420 config BITFIELD_KUNIT
2420− tristate "KUnit test bitfield functions at runtime"
2421+ tristate "KUnit test bitfield functions at runtime" if !KUNIT_ALL_TESTS
24212422 depends on KUNIT
2423+ default KUNIT_ALL_TESTS
24222424 help
24232425 Enable this option to test the bitfield functions at boot.
24242426
@@ -2452,8 +2454,9 @@ config HASH_KUNIT_TEST · 27 unmodified lines
24522454 optimized versions. If unsure, say N.
24532455
24542456 config RESOURCE_KUNIT_TEST
2455− tristate "KUnit test for resource API"
2457+ tristate "KUnit test for resource API" if !KUNIT_ALL_TESTS
24562458 depends on KUNIT
2459+ default KUNIT_ALL_TESTS
24572460 help
24582461 This builds the resource API unit test.
24592462 Tests the logic of API provided by resource.c and ioport.h.
@@ -2506,8 +2509,9 @@ config LINEAR_RANGES_TEST · 46 unmodified lines
25062509 If unsure, say N.
25072510
25082511 config CMDLINE_KUNIT_TEST
2509− tristate "KUnit test for cmdline API"
2512+ tristate "KUnit test for cmdline API" if !KUNIT_ALL_TESTS
25102513 depends on KUNIT
2514+ default KUNIT_ALL_TESTS
25112515 help
25122516 This builds the cmdline API unit test.
25132517 Tests the logic of API provided by cmdline.c.
@@ -2517,8 +2521,9 @@ config CMDLINE_KUNIT_TEST · 3 unmodified lines
25172521 If unsure, say N.
25182522
25192523 config BITS_TEST
2520− tristate "KUnit test for bits.h"
2524+ tristate "KUnit test for bits.h" if !KUNIT_ALL_TESTS
25212525 depends on KUNIT
2526+ default KUNIT_ALL_TESTS
25222527 help
25232528 This builds the bits unit test.
25242529 Tests the logic of macros defined in bits.h.