aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/bin/parse-console.sh
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-04-26 16:51:56 -0700
committerPaul E. McKenney <paulmck@kernel.org>2020-06-29 12:01:44 -0700
commit59359e4f2a0906920389ec1e33296ac9a19178ba (patch)
tree51dece3765f96abb629a92b06ab334e1712eff21 /tools/testing/selftests/rcutorture/bin/parse-console.sh
parenttorture: Set configfile variable to current scenario (diff)
downloadlinux-dev-59359e4f2a0906920389ec1e33296ac9a19178ba.tar.xz
linux-dev-59359e4f2a0906920389ec1e33296ac9a19178ba.zip
rcutorture: Handle non-statistic bang-string error messages
The current console parsing assumes that console lines containing "!!!" are statistics lines from which it can parse the number of rcutorture too-short grace-period failures. This prints confusing output for other problems, including memory exhaustion. This commit therefore differentiates between these cases and prints an appropriate error string. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to '')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/parse-console.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh
index 4bf62d7b1cbc..1c64ca85438c 100755
--- a/tools/testing/selftests/rcutorture/bin/parse-console.sh
+++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh
@@ -44,11 +44,23 @@ then
tail -1 |
awk '
{
- for (i=NF-8;i<=NF;i++)
+ normalexit = 1;
+ for (i=NF-8;i<=NF;i++) {
+ if (i <= 0 || i !~ /^[0-9]*$/) {
+ bangstring = $0;
+ gsub(/^\[[^]]*] /, "", bangstring);
+ print bangstring;
+ normalexit = 0;
+ exit 0;
+ }
sum+=$i;
+ }
}
- END { print sum }'`
- print_bug $title FAILURE, $nerrs instances
+ END {
+ if (normalexit)
+ print sum " instances"
+ }'`
+ print_bug $title FAILURE, $nerrs
exit
fi