History

kcsan: Make test follow KUnit style recommendations

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.

Marco Elver committed 5 years ago

Commit a146fed1 parent e36299e3 files · +6 −5Browse files

Unified · Split

3 files
  1. kernel/kcsan/Makefile +2 −2
  2. kernel/kcsan/kcsan_test.c +1 −1
  3. lib/Kconfig.kcsan +3 −2
kernel/kcsan/Makefile+2−2
@@ -13,5 +13,5 @@ CFLAGS_core.o := $(call cc-option,-fno-conserve-stack) \ · 12 unmodified lines
13obj-y := core.o debugfs.o report.o13obj-y := core.o debugfs.o report.o
14obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o14obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o
15 15
16CFLAGS_kcsan-test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer16CFLAGS_kcsan_test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer
17obj-$(CONFIG_KCSAN_TEST) += kcsan-test.o17obj-$(CONFIG_KCSAN_KUNIT_TEST) += kcsan_test.o
kernel/kcsan/kcsan_test.crenamed from kernel/kcsan/kcsan-test.c+1−1
@@ -1156,7 +1156,7 @@ static void test_exit(struct kunit *test) · 1155 unmodified lines
1156}1156}
1157 1157
1158static struct kunit_suite kcsan_test_suite = {1158static struct kunit_suite kcsan_test_suite = {
1159 .name = "kcsan-test",1159 .name = "kcsan",
1160 .test_cases = kcsan_test_cases,1160 .test_cases = kcsan_test_cases,
1161 .init = test_init,1161 .init = test_init,
1162 .exit = test_exit,1162 .exit = test_exit,
lib/Kconfig.kcsan+3−2
@@ -69,8 +69,9 @@ config KCSAN_SELFTEST · 68 unmodified lines
69 panic. Recommended to be enabled, ensuring critical functionality69 panic. Recommended to be enabled, ensuring critical functionality
70 works as intended.70 works as intended.
71 71
72config KCSAN_TEST72config KCSAN_KUNIT_TEST
73 tristate "KCSAN test for integrated runtime behaviour"73 tristate "KCSAN test for integrated runtime behaviour" if !KUNIT_ALL_TESTS
74 default KUNIT_ALL_TESTS
74 depends on TRACEPOINTS && KUNIT75 depends on TRACEPOINTS && KUNIT
75 select TORTURE_TEST76 select TORTURE_TEST
76 help77 help

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t