Commit 10cec0de authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

torture: Make --kcsan argument also create a summary



The KCSAN tool emits a great many warnings for current kernels, for
example, a one-hour run of the full set of rcutorture scenarios results
in no fewer than 3252 such warnings, many of which are duplicates
or are otherwise closely related.  This commit therefore introduces
a kcsan-collapse.sh script that maps these warnings down to a set of
function pairs (22 of them given the 3252 individual warnings), placing
the resulting list in decreasing order of frequency of occurrence into
a kcsan.sum file.  If any KCSAN warnings were produced, the pathname of
this file is emitted at the end of the summary of the rcutorture runs.

Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 7226c5cb
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0+
#
# If this was a KCSAN run, collapse the reports in the various console.log
# files onto pairs of functions.
#
# Usage: kcsan-collapse.sh resultsdir
#
# Copyright (C) 2020 Facebook, Inc.
#
# Authors: Paul E. McKenney <paulmck@kernel.org>

if test -z "$TORTURE_KCONFIG_KCSAN_ARG"
then
	exit 0
fi
cat $1/*/console.log |
	grep "BUG: KCSAN: " |
	sed -e 's/^\[[^]]*] //' |
	sort |
	uniq -c |
	sort -k1nr > $1/kcsan.sum
+9 −0
Original line number Diff line number Diff line
@@ -70,6 +70,15 @@ do
			fi
		fi
	done
	if test -f "$rd/kcsan.sum"
	then
		if test -s "$rd/kcsan.sum"
		then
			echo KCSAN summary in $rd/kcsan.sum
		else
			echo Clean KCSAN run in $rd
		fi
	fi
done
EDITOR=echo kvm-find-errors.sh "${@: -1}" > $T 2>&1
ret=$?
+1 −0
Original line number Diff line number Diff line
@@ -472,6 +472,7 @@ echo
echo
echo " --- `date` Test summary:"
echo Results directory: $resdir/$ds
kcsan-collapse.sh $resdir/$ds
kvm-recheck.sh $resdir/$ds
___EOF___