mac80211: replace restart_complete() with reconfig_complete()
[cascardo/linux.git] / tools / testing / selftests / rcutorture / bin / parse-build.sh
1 #!/bin/sh
2 #
3 # Check the build output from an rcutorture run for goodness.
4 # The "file" is a pathname on the local system, and "title" is
5 # a text string for error-message purposes.
6 #
7 # The file must contain kernel build output.
8 #
9 # Usage:
10 #       sh parse-build.sh file title
11 #
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, you can access it online at
24 # http://www.gnu.org/licenses/gpl-2.0.html.
25 #
26 # Copyright (C) IBM Corporation, 2011
27 #
28 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
29
30 T=$1
31 title=$2
32
33 . functions.sh
34
35 if grep -q CC < $T
36 then
37         :
38 else
39         print_bug $title no build
40         exit 1
41 fi
42
43 if grep -q "error:" < $T
44 then
45         print_bug $title build errors:
46         grep "error:" < $T
47         exit 2
48 fi
49 exit 0
50
51 if egrep -q "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T
52 then
53         print_warning $title build errors:
54         egrep "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T
55         exit 2
56 fi
57 exit 0