11a5e31fbSPranith Kumar#!/bin/bash 2c87b9c60SPaul E. McKenney# 3c87b9c60SPaul E. McKenney# Check the console output from an rcutorture run for oopses. 4c87b9c60SPaul E. McKenney# The "file" is a pathname on the local system, and "title" is 5c87b9c60SPaul E. McKenney# a text string for error-message purposes. 6c87b9c60SPaul E. McKenney# 7c87b9c60SPaul E. McKenney# Usage: 81a5e31fbSPranith Kumar# bash parse-console.sh file title 9c87b9c60SPaul E. McKenney# 10c87b9c60SPaul E. McKenney# This program is free software; you can redistribute it and/or modify 11c87b9c60SPaul E. McKenney# it under the terms of the GNU General Public License as published by 12c87b9c60SPaul E. McKenney# the Free Software Foundation; either version 2 of the License, or 13c87b9c60SPaul E. McKenney# (at your option) any later version. 14c87b9c60SPaul E. McKenney# 15c87b9c60SPaul E. McKenney# This program is distributed in the hope that it will be useful, 16c87b9c60SPaul E. McKenney# but WITHOUT ANY WARRANTY; without even the implied warranty of 17c87b9c60SPaul E. McKenney# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18c87b9c60SPaul E. McKenney# GNU General Public License for more details. 19c87b9c60SPaul E. McKenney# 20c87b9c60SPaul E. McKenney# You should have received a copy of the GNU General Public License 210e342a87SPaul E. McKenney# along with this program; if not, you can access it online at 220e342a87SPaul E. McKenney# http://www.gnu.org/licenses/gpl-2.0.html. 23c87b9c60SPaul E. McKenney# 24c87b9c60SPaul E. McKenney# Copyright (C) IBM Corporation, 2011 25c87b9c60SPaul E. McKenney# 26c87b9c60SPaul E. McKenney# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> 27c87b9c60SPaul E. McKenney 28c87b9c60SPaul E. McKenneyT=/tmp/abat-chk-badness.sh.$$ 29c87b9c60SPaul E. McKenneytrap 'rm -f $T' 0 30c87b9c60SPaul E. McKenney 31c87b9c60SPaul E. McKenneyfile="$1" 32c87b9c60SPaul E. McKenneytitle="$2" 33c87b9c60SPaul E. McKenney 346d40cc0cSPaul E. McKenney. functions.sh 356d40cc0cSPaul E. McKenney 36c87b9c60SPaul E. McKenneyegrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T 37c87b9c60SPaul E. McKenneyif test -s $T 38c87b9c60SPaul E. McKenneythen 396d40cc0cSPaul E. McKenney print_warning Assertion failure in $file $title 40c87b9c60SPaul E. McKenney cat $T 41c87b9c60SPaul E. McKenneyfi 42