From: paulmck@kernel.org
To: linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
kernel-team@fb.com, mingo@kernel.org
Cc: elver@google.com, andreyknvl@google.com, glider@google.com,
dvyukov@google.com, cai@lca.pw, boqun.feng@gmail.com,
"Paul E . McKenney" <paulmck@kernel.org>
Subject: [PATCH kcsan 2/4] kcsan: Make test follow KUnit style recommendations
Date: Wed, 3 Mar 2021 16:40:38 -0800 [thread overview]
Message-ID: <20210304004040.25074-2-paulmck@kernel.org> (raw)
In-Reply-To: <20210304003750.GA24696@paulmck-ThinkPad-P72>
From: Marco Elver <elver@google.com>
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.
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
kernel/kcsan/Makefile | 4 ++--
kernel/kcsan/{kcsan-test.c => kcsan_test.c} | 2 +-
lib/Kconfig.kcsan | 5 +++--
3 files changed, 6 insertions(+), 5 deletions(-)
rename kernel/kcsan/{kcsan-test.c => kcsan_test.c} (99%)
diff --git a/kernel/kcsan/Makefile b/kernel/kcsan/Makefile
index 65ca553..c2bb07f 100644
--- a/kernel/kcsan/Makefile
+++ b/kernel/kcsan/Makefile
@@ -13,5 +13,5 @@ CFLAGS_core.o := $(call cc-option,-fno-conserve-stack) \
obj-y := core.o debugfs.o report.o
obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o
-CFLAGS_kcsan-test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer
-obj-$(CONFIG_KCSAN_TEST) += kcsan-test.o
+CFLAGS_kcsan_test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer
+obj-$(CONFIG_KCSAN_KUNIT_TEST) += kcsan_test.o
diff --git a/kernel/kcsan/kcsan-test.c b/kernel/kcsan/kcsan_test.c
similarity index 99%
rename from kernel/kcsan/kcsan-test.c
rename to kernel/kcsan/kcsan_test.c
index ebe7fd2..f16f632 100644
--- a/kernel/kcsan/kcsan-test.c
+++ b/kernel/kcsan/kcsan_test.c
@@ -1156,7 +1156,7 @@ static void test_exit(struct kunit *test)
}
static struct kunit_suite kcsan_test_suite = {
- .name = "kcsan-test",
+ .name = "kcsan",
.test_cases = kcsan_test_cases,
.init = test_init,
.exit = test_exit,
diff --git a/lib/Kconfig.kcsan b/lib/Kconfig.kcsan
index f271ff5..0440f37 100644
--- a/lib/Kconfig.kcsan
+++ b/lib/Kconfig.kcsan
@@ -69,8 +69,9 @@ config KCSAN_SELFTEST
panic. Recommended to be enabled, ensuring critical functionality
works as intended.
-config KCSAN_TEST
- tristate "KCSAN test for integrated runtime behaviour"
+config KCSAN_KUNIT_TEST
+ tristate "KCSAN test for integrated runtime behaviour" if !KUNIT_ALL_TESTS
+ default KUNIT_ALL_TESTS
depends on TRACEPOINTS && KUNIT
select TORTURE_TEST
help
--
2.9.5
next prev parent reply other threads:[~2021-03-04 1:09 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 0:37 [PATCH tip/core/rcu 0/28] Torture-test scripting updates for v5.13 Paul E. McKenney
2021-03-04 0:37 ` [PATCH tip/core/rcu 01/28] torturescript: Don't rerun failed rcutorture builds paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 02/28] torture: Allow 1G of memory for torture.sh kvfree testing paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 03/28] torture: Provide bare-metal modprobe-based advice paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 04/28] torture: Improve readability of the testid.txt file paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 05/28] rcuscale: Disable verbose torture-test output paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 06/28] refscale: " paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 07/28] torture: Move build/run synchronization files into scenario directories paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 08/28] torture: Use file-based protocol to mark batch's runs complete paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 09/28] torture: Use "jittering" file to control jitter.sh execution paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 10/28] torture: Eliminate jitter_pids file paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 11/28] torture: Reverse jittering and duration parameters for jitter.sh paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 12/28] torture: Abstract jitter.sh start/stop into scripts paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 13/28] torture: Record TORTURE_KCONFIG_GDB_ARG in qemu-cmd paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 14/28] torture: Extract kvm-test-1-run-qemu.sh from kvm-test-1-run.sh paulmck
2021-03-04 0:37 ` [PATCH tip/core/rcu 15/28] torture: Record jitter start/stop commands paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 16/28] torture: Record kvm-test-1-run.sh and kvm-test-1-run-qemu.sh PIDs paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 17/28] torture: Remove no-mpstat error message paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 18/28] torture: Rename SRCU-t and SRCU-u to avoid lowercase characters paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 19/28] torture: Make upper-case-only no-dot no-slash scenario names official paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 20/28] torture: De-capitalize TORTURE_SUITE paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 21/28] torture: Create a "batches" file for build reuse paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 22/28] torture: Add kvm-again.sh to rerun a previous torture-test paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 23/28] torture: Add --duration argument to kvm-again.sh paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 24/28] torture: Make kvm-transform.sh update jitter commands paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 25/28] torture: Make TORTURE_TRUST_MAKE available in kvm-again.sh environment paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 26/28] torture: Print proper vmlinux path for kvm-again.sh runs paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 27/28] torture: Consolidate qemu-cmd duration editing into kvm-transform.sh paulmck
2021-03-04 0:38 ` [PATCH tip/core/rcu 28/28] torture: Fix kvm.sh --datestamp regex check paulmck
2021-03-04 0:40 ` [PATCH kcsan 1/4] kcsan, debugfs: Move debugfs file creation out of early init paulmck
2021-03-04 0:40 ` paulmck [this message]
2021-03-04 0:40 ` [PATCH kcsan 3/4] kcsan: Switch to KUNIT_CASE_PARAM for parameterized tests paulmck
2021-03-04 0:40 ` [PATCH kcsan 4/4] kcsan: Add missing license and copyright headers paulmck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210304004040.25074-2-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=andreyknvl@google.com \
--cc=boqun.feng@gmail.com \
--cc=cai@lca.pw \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox