2014-07-11 17:31:27 -04:00
#!/bin/bash
2013-09-28 14:12:21 -07:00
#
# Check the console output from an rcutorture run for oopses.
# The "file" is a pathname on the local system, and "title" is
# a text string for error-message purposes.
#
2014-07-11 19:47:35 -04:00
# Usage: parse-console.sh file title
2013-09-28 14:12:21 -07:00
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
2013-12-03 09:54:18 -08:00
# along with this program; if not, you can access it online at
# http://www.gnu.org/licenses/gpl-2.0.html.
2013-09-28 14:12:21 -07:00
#
# Copyright (C) IBM Corporation, 2011
#
# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
T = /tmp/abat-chk-badness.sh.$$
trap 'rm -f $T' 0
file = " $1 "
title = " $2 "
2013-10-28 06:34:22 -07:00
. functions.sh
2014-08-26 11:35:43 -07:00
if grep -Pq '\x00' < $file
then
print_warning Console output contains nul bytes, old qemu still running?
fi
2014-12-08 09:13:52 -08:00
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
2013-09-28 14:12:21 -07:00
if test -s $T
then
2013-10-28 06:34:22 -07:00
print_warning Assertion failure in $file $title
2013-09-28 14:12:21 -07:00
cat $T
fi