torture: Print only one summary line per run
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 28 Dec 2021 05:21:35 +0000 (21:21 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 2 Feb 2022 01:25:41 +0000 (17:25 -0800)
The torture.sh scripts currently duplicates the summary lines, getting
one during the run phase and one during the summary phase of each run.
This commit therefore removes the run phase from consideration so as to
get only one summary line per run.

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

index a5f1c5fbefe4ce81eb1efc1f5635fbc782875e44..d1cb60085d8f2cf4a8af28ab44ca43152cbb3085 100755 (executable)
@@ -414,7 +414,7 @@ nfailures=0
 echo FAILURES: | tee -a $T/log
 if test -s "$T/failures"
 then
-       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 | tee "$T/failuresum"
+       awk < "$T/failures" -v sq="'" '{ print "echo " sq $0 sq; print "sed -e " sq "1,/^ --- .* Test summary:$/d" sq " " $2 "/log | grep Summary: | sed -e " sq "s/^[^S]*/  /" sq; }' | sh | tee -a $T/log | tee "$T/failuresum"
        nfailures="`wc -l "$T/failures" | awk '{ print $1 }'`"
        grep "^  Summary: " "$T/failuresum" |
                grep -v '^  Summary: Bugs: [0-9]* (all bugs kcsan)$' > "$T/nonkcsan"