torture: Output per-failed-run summary lines from torture.sh
authorPaul E. McKenney <paulmck@kernel.org>
Sat, 4 Dec 2021 21:53:24 +0000 (13:53 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 2 Feb 2022 01:25:28 +0000 (17:25 -0800)
Currently, torture.sh lists the failed runs, but it is up to the user
to work out what failed.  This is especially annoying for KCSAN runs,
where RCU's tighter definitions result in failures being reported for
other parts of the kernel.  This commit therefore outputs "Summary:"
lines for each failed run, allowing the user to more quickly identify
which failed runs need focused attention.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/torture.sh

index eae88aacca2aa19fc4a849bdad145d73c1ac7f44..894f589dd562586e10ac2c1108cb61f40b494ea1 100755 (executable)
@@ -414,7 +414,7 @@ nfailures=0
 echo FAILURES: | tee -a $T/log
 if test -s "$T/failures"
 then
-       cat "$T/failures" | tee -a $T/log
+       awk < "$T/failures" -v sq="'" '{ print "echo " sq $0 sq; print "grep Summary: " $2 "/log | sed -e " sq "s/^[^S]*/  /" sq; }' | sh | tee -a $T/log
        nfailures="`wc -l "$T/failures" | awk '{ print $1 }'`"
        ret=2
 fi