Per recently added KUnit style recommendations at Documentation/dev-tools/kunit/style.rst, make the following changes to the KCSAN test: 1. Rename 'kcsan-test.c' to 'kcsan_test.c'. 2. Rename suite name 'kcsan-test' to 'kcsan'. 3. Rename CONFIG_KCSAN_TEST to CONFIG_KCSAN_KUNIT_TEST and default to KUNIT_ALL_TESTS.
Unified · Split
| @@ -13,5 +13,5 @@ CFLAGS_core.o := $(call cc-option,-fno-conserve-stack) \ · 12 unmodified lines | ||
| 13 | 13 | obj-y := core.o debugfs.o report.o |
| 14 | 14 | obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o |
| 15 | 15 | |
| 16 | −CFLAGS_kcsan-test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer | |
| 17 | −obj-$(CONFIG_KCSAN_TEST) += kcsan-test.o | |
| 16 | +CFLAGS_kcsan_test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer | |
| 17 | +obj-$(CONFIG_KCSAN_KUNIT_TEST) += kcsan_test.o | |
| @@ -1156,7 +1156,7 @@ static void test_exit(struct kunit *test) · 1155 unmodified lines | ||
| 1156 | 1156 | } |
| 1157 | 1157 | |
| 1158 | 1158 | static struct kunit_suite kcsan_test_suite = { |
| 1159 | − .name = "kcsan-test", | |
| 1159 | + .name = "kcsan", | |
| 1160 | 1160 | .test_cases = kcsan_test_cases, |
| 1161 | 1161 | .init = test_init, |
| 1162 | 1162 | .exit = test_exit, |
| @@ -69,8 +69,9 @@ config KCSAN_SELFTEST · 68 unmodified lines | ||
| 69 | 69 | panic. Recommended to be enabled, ensuring critical functionality |
| 70 | 70 | works as intended. |
| 71 | 71 | |
| 72 | −config KCSAN_TEST | |
| 73 | − tristate "KCSAN test for integrated runtime behaviour" | |
| 72 | +config KCSAN_KUNIT_TEST | |
| 73 | + tristate "KCSAN test for integrated runtime behaviour" if !KUNIT_ALL_TESTS | |
| 74 | + default KUNIT_ALL_TESTS | |
| 74 | 75 | depends on TRACEPOINTS && KUNIT |
| 75 | 76 | select TORTURE_TEST |
| 76 | 77 | help |