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
2140 If unsure, say N.2140 If unsure, say N.
2141 2141
2142config KPROBES_SANITY_TEST2142config KPROBES_SANITY_TEST
2143 tristate "Kprobes sanity tests"2143 tristate "Kprobes sanity tests" if !KUNIT_ALL_TESTS
2144 depends on DEBUG_KERNEL2144 depends on DEBUG_KERNEL
2145 depends on KPROBES2145 depends on KPROBES
2146 depends on KUNIT2146 depends on KUNIT
2147 default KUNIT_ALL_TESTS
2147 help2148 help
2148 This option provides for testing basic kprobes functionality on2149 This option provides for testing basic kprobes functionality on
2149 boot. Samples of kprobe and kretprobe are inserted and2150 boot. Samples of kprobe and kretprobe are inserted and
@@ -2417,8 +2418,9 @@ config TEST_SYSCTL · 267 unmodified lines
2417 If unsure, say N.2418 If unsure, say N.
2418 2419
2419config BITFIELD_KUNIT2420config BITFIELD_KUNIT
2420 tristate "KUnit test bitfield functions at runtime"2421 tristate "KUnit test bitfield functions at runtime" if !KUNIT_ALL_TESTS
2421 depends on KUNIT2422 depends on KUNIT
2423 default KUNIT_ALL_TESTS
2422 help2424 help
2423 Enable this option to test the bitfield functions at boot.2425 Enable this option to test the bitfield functions at boot.
2424 2426
@@ -2452,8 +2454,9 @@ config HASH_KUNIT_TEST · 27 unmodified lines
2452 optimized versions. If unsure, say N.2454 optimized versions. If unsure, say N.
2453 2455
2454config RESOURCE_KUNIT_TEST2456config RESOURCE_KUNIT_TEST
2455 tristate "KUnit test for resource API"2457 tristate "KUnit test for resource API" if !KUNIT_ALL_TESTS
2456 depends on KUNIT2458 depends on KUNIT
2459 default KUNIT_ALL_TESTS
2457 help2460 help
2458 This builds the resource API unit test.2461 This builds the resource API unit test.
2459 Tests the logic of API provided by resource.c and ioport.h.2462 Tests the logic of API provided by resource.c and ioport.h.
@@ -2506,8 +2509,9 @@ config LINEAR_RANGES_TEST · 46 unmodified lines
2506 If unsure, say N.2509 If unsure, say N.
2507 2510
2508config CMDLINE_KUNIT_TEST2511config CMDLINE_KUNIT_TEST
2509 tristate "KUnit test for cmdline API"2512 tristate "KUnit test for cmdline API" if !KUNIT_ALL_TESTS
2510 depends on KUNIT2513 depends on KUNIT
2514 default KUNIT_ALL_TESTS
2511 help2515 help
2512 This builds the cmdline API unit test.2516 This builds the cmdline API unit test.
2513 Tests the logic of API provided by cmdline.c.2517 Tests the logic of API provided by cmdline.c.
@@ -2517,8 +2521,9 @@ config CMDLINE_KUNIT_TEST · 3 unmodified lines
2517 If unsure, say N.2521 If unsure, say N.
2518 2522
2519config BITS_TEST2523config BITS_TEST
2520 tristate "KUnit test for bits.h"2524 tristate "KUnit test for bits.h" if !KUNIT_ALL_TESTS
2521 depends on KUNIT2525 depends on KUNIT
2526 default KUNIT_ALL_TESTS
2522 help2527 help
2523 This builds the bits unit test.2528 This builds the bits unit test.
2524 Tests the logic of macros defined in bits.h.2529 Tests the logic of macros defined in bits.h.