Răsfoiți Sursa

torture: Abbreviate console error dump

Currently, the scripts print a list of warning/bug indicators from the
console.log file.  This works well if there are only a few warnings or
bugs, but can be quite annoying if there is a large number.  This commit
therefore prints a summary listing the number of each type of warning/bug
indicator, but only if there is at least one such indicator.  The full
list is stored in the results directory at console.log.diags, which
makes it easier to find the warning/bugs in the full console.log.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Paul E. McKenney 9 ani în urmă
părinte
comite
5708c64757
1 a modificat fișierele cu 35 adăugiri și 6 ștergeri
  1. 35 6
      tools/testing/selftests/rcutorture/bin/parse-console.sh

+ 35 - 6
tools/testing/selftests/rcutorture/bin/parse-console.sh

@@ -24,9 +24,6 @@
 #
 #
 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 
 
-T=/tmp/abat-chk-badness.sh.$$
-trap 'rm -f $T' 0
-
 file="$1"
 file="$1"
 title="$2"
 title="$2"
 
 
@@ -36,9 +33,41 @@ if grep -Pq '\x00' < $file
 then
 then
 	print_warning Console output contains nul bytes, old qemu still running?
 	print_warning Console output contains nul bytes, old qemu still running?
 fi
 fi
-egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:|Stall ended before state dump start' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T
-if test -s $T
+egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:|detected stalls on CPUs/tasks:|Stall ended before state dump start' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $1.diags
+if test -s $1.diags
 then
 then
 	print_warning Assertion failure in $file $title
 	print_warning Assertion failure in $file $title
-	cat $T
+	# cat $1.diags
+	summary=""
+	n_badness=`grep -c Badness $1`
+	if test "$n_badness" -ne 0
+	then
+		summary="$summary  Badness: $n_badness"
+	fi
+	n_warn=`grep -v 'Warning: unable to open an initial console' $1 | egrep -c 'WARNING:|Warn'`
+	if test "$n_warn" -ne 0
+	then
+		summary="$summary  Warnings: $n_warn"
+	fi
+	n_bugs=`egrep -c 'BUG|Oops:' $1`
+	if test "$n_bugs" -ne 0
+	then
+		summary="$summary  Bugs: $n_bugs"
+	fi
+	n_calltrace=`grep -c 'Call Trace:' $1`
+	if test "$n_calltrace" -ne 0
+	then
+		summary="$summary  Call Traces: $n_calltrace"
+	fi
+	n_lockdep=`grep -c =========== $1`
+	if test "$n_badness" -ne 0
+	then
+		summary="$summary  lockdep: $n_badness"
+	fi
+	n_stalls=`egrep -c 'detected stalls on CPUs/tasks:|Stall ended before state dump start' $1`
+	if test "$n_stalls" -ne 0
+	then
+		summary="$summary  Stalls: $n_stalls"
+	fi
+	print_warning Summary: $summary
 fi
 fi