[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220518073232.526443-2-davidgow@google.com>
Date: Wed, 18 May 2022 15:32:32 +0800
From: David Gow <davidgow@...gle.com>
To: Brendan Higgins <brendanhiggins@...gle.com>,
Daniel Latypov <dlatypov@...gle.com>,
Marco Elver <elver@...gle.com>,
Shuah Khan <skhan@...uxfoundation.org>
Cc: David Gow <davidgow@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>, kunit-dev@...glegroups.com,
kasan-dev@...glegroups.com, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] kcsan: test: Add a .kunitconfig to run KCSAN tests
Add a .kunitconfig file, which provides a default, working config for
running the KCSAN tests. Note that it needs to run on an SMP machine, so
to run under kunit_tool, the x86_64-smp qemu-based setup should be used:
./tools/testing/kunit/kunit.py run --arch=x86_64-smp --kunitconfig=kernel/kcsan
Signed-off-by: David Gow <davidgow@...gle.com>
---
kernel/kcsan/.kunitconfig | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 kernel/kcsan/.kunitconfig
diff --git a/kernel/kcsan/.kunitconfig b/kernel/kcsan/.kunitconfig
new file mode 100644
index 000000000000..a8a815b1eb73
--- /dev/null
+++ b/kernel/kcsan/.kunitconfig
@@ -0,0 +1,20 @@
+# Note that the KCSAN tests need to run on an SMP setup.
+# Under kunit_tool, this can be done by using the x86_64-smp
+# qemu-based architecture:
+# ./tools/testing/kunit/kunit.py run --kunitconfig=kernel/kcsan --arch=x86_64-smp
+
+CONFIG_KUNIT=y
+
+CONFIG_DEBUG_KERNEL=y
+
+CONFIG_KCSAN=y
+CONFIG_KCSAN_KUNIT_TEST=y
+
+# Needed for test_barrier_nothreads
+CONFIG_KCSAN_STRICT=y
+CONFIG_KCSAN_WEAK_MEMORY=y
+
+# This prevents the test from timing out on many setups. Feel free to remove
+# (or alter) this, in conjunction with setting a different test timeout with,
+# for example, the --timeout kunit_tool option.
+CONFIG_KCSAN_REPORT_ONCE_IN_MS=100
--
2.36.0.550.gb090851708-goog
Powered by blists - more mailing lists