Skip to content

Commit bc77a72

Browse files
committed
torture: Abstract out console-log error detection
This commit pulls the simple pattern-based error detection from the console log into a new console-badness.sh file. This will enable future commits to end a run on the first error. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 6387ecb commit bc77a72

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# SPDX-License-Identifier: GPL-2.0+
3+
#
4+
# Scan standard input for error messages, dumping any found to standard
5+
# output.
6+
#
7+
# Usage: console-badness.sh
8+
#
9+
# Copyright (C) 2020 Facebook, Inc.
10+
#
11+
# Authors: Paul E. McKenney <[email protected]>
12+
13+
egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:|detected stalls on CPUs/tasks:|self-detected stall on CPU|Stall ended before state dump start|\?\?\? Writer stall state|rcu_.*kthread starved for|!!!' |
14+
grep -v 'ODEBUG: ' |
15+
grep -v 'This means that this is a DEBUG kernel and it is' |
16+
grep -v 'Warning: unable to open an initial console'

tools/testing/selftests/rcutorture/bin/parse-console.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ then
116116
fi
117117
fi | tee -a $file.diags
118118

119-
egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:|detected stalls on CPUs/tasks:|self-detected stall on CPU|Stall ended before state dump start|\?\?\? Writer stall state|rcu_.*kthread starved for' < $file |
120-
grep -v 'ODEBUG: ' |
121-
grep -v 'This means that this is a DEBUG kernel and it is' |
122-
grep -v 'Warning: unable to open an initial console' > $T.diags
119+
console-badness.sh < $file > $T.diags
123120
if test -s $T.diags
124121
then
125122
print_warning "Assertion failure in $file $title"

0 commit comments

Comments
 (0)