Skip to content

Commit 61b77be

Browse files
committed
torture: Improve diagnostic for KCSAN-incapable compilers
Using --kcsan when the compiler does not support KCSAN results in this: :CONFIG_KCSAN=y: improperly set :CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000: improperly set :CONFIG_KCSAN_VERBOSE=y: improperly set :CONFIG_KCSAN_INTERRUPT_WATCHER=y: improperly set Clean KCSAN run in /home/git/linux-rcu/tools/testing/selftests/rcutorture/res/2020.06.16-09.53.16 This is a bit obtuse, so this commit adds checks resulting in this: :CONFIG_KCSAN=y: improperly set :CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000: improperly set :CONFIG_KCSAN_VERBOSE=y: improperly set :CONFIG_KCSAN_INTERRUPT_WATCHER=y: improperly set Compiler or architecture does not support KCSAN! Did you forget to switch your compiler with --kmake-arg CC=<cc-that-supports-kcsan>? Suggested-by: Marco Elver <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Acked-by: Marco Elver <[email protected]>
1 parent 6bcaf2a commit 61b77be

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/testing/selftests/rcutorture/bin/kvm-recheck.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ do
4444
then
4545
echo QEMU killed
4646
fi
47-
configcheck.sh $i/.config $i/ConfigFragment
47+
configcheck.sh $i/.config $i/ConfigFragment > $T 2>&1
48+
cat $T
4849
if test -r $i/Make.oldconfig.err
4950
then
5051
cat $i/Make.oldconfig.err
@@ -73,7 +74,11 @@ do
7374
done
7475
if test -f "$rd/kcsan.sum"
7576
then
76-
if test -s "$rd/kcsan.sum"
77+
if grep -q CONFIG_KCSAN=y $T
78+
then
79+
echo "Compiler or architecture does not support KCSAN!"
80+
echo Did you forget to switch your compiler with '--kmake-arg CC=<cc-that-supports-kcsan>'?
81+
elif test -s "$rd/kcsan.sum"
7782
then
7883
echo KCSAN summary in $rd/kcsan.sum
7984
else

0 commit comments

Comments
 (0)