tools/rcutorture: Fix BUG parsing of console.log
authorAnna-Maria Behnsen <anna-maria@linutronix.de>
Mon, 2 Nov 2020 17:12:20 +0000 (18:12 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Sat, 7 Nov 2020 01:13:58 +0000 (17:13 -0800)
For the rcutorture test summary log file console.log of virtual machines is
parsed. When a console.log contains "DEBUG", BUG counter is incremented
because regular expression does not handle to ignore DEBUG.

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Reviewed-by: Benedikt Spranger <b.spranger@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/parse-console.sh

index e03338091a069c9b231aee77cde95af3d2c84632..263b1be5000802d015bc1753593fe3c0d2695c95 100755 (executable)
@@ -133,7 +133,7 @@ then
        then
                summary="$summary  Warnings: $n_warn"
        fi
-       n_bugs=`egrep -c 'BUG|Oops:' $file`
+       n_bugs=`egrep -c '\bBUG|Oops:' $file`
        if test "$n_bugs" -ne 0
        then
                summary="$summary  Bugs: $n_bugs"