2014-07-11 15:31:27 -06:00
|
|
|
#!/bin/bash
|
2019-02-11 08:14:09 -07:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2013-09-28 15:12:21 -06:00
|
|
|
#
|
|
|
|
# Check the build output from an rcutorture run for goodness.
|
|
|
|
# The "file" is a pathname on the local system, and "title" is
|
|
|
|
# a text string for error-message purposes.
|
|
|
|
#
|
|
|
|
# The file must contain kernel build output.
|
|
|
|
#
|
2014-07-11 17:47:35 -06:00
|
|
|
# Usage: parse-build.sh file title
|
2013-09-28 15:12:21 -06:00
|
|
|
#
|
|
|
|
# Copyright (C) IBM Corporation, 2011
|
|
|
|
#
|
2019-02-11 08:14:09 -07:00
|
|
|
# Authors: Paul E. McKenney <paulmck@linux.ibm.com>
|
2013-09-28 15:12:21 -06:00
|
|
|
|
2014-11-21 14:54:57 -07:00
|
|
|
F=$1
|
2013-09-28 15:12:21 -06:00
|
|
|
title=$2
|
2017-08-30 16:33:49 -06:00
|
|
|
T=${TMPDIR-/tmp}/parse-build.sh.$$
|
2014-11-21 14:54:57 -07:00
|
|
|
trap 'rm -rf $T' 0
|
|
|
|
mkdir $T
|
2013-09-28 15:12:21 -06:00
|
|
|
|
2013-10-28 07:34:22 -06:00
|
|
|
. functions.sh
|
|
|
|
|
2019-05-11 21:18:00 -06:00
|
|
|
if grep -q CC < $F || test -n "$TORTURE_TRUST_MAKE"
|
2013-09-28 15:12:21 -06:00
|
|
|
then
|
|
|
|
:
|
|
|
|
else
|
2013-10-28 07:34:22 -06:00
|
|
|
print_bug $title no build
|
2013-09-28 15:12:21 -06:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-11-21 14:54:57 -07:00
|
|
|
if grep -q "error:" < $F
|
2013-10-28 07:34:22 -06:00
|
|
|
then
|
|
|
|
print_bug $title build errors:
|
2014-11-21 14:54:57 -07:00
|
|
|
grep "error:" < $F
|
2013-10-28 07:34:22 -06:00
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
2014-11-21 14:54:57 -07:00
|
|
|
grep warning: < $F > $T/warnings
|
|
|
|
grep "include/linux/*rcu*\.h:" $T/warnings > $T/hwarnings
|
|
|
|
grep "kernel/rcu/[^/]*:" $T/warnings > $T/cwarnings
|
|
|
|
cat $T/hwarnings $T/cwarnings > $T/rcuwarnings
|
|
|
|
if test -s $T/rcuwarnings
|
2013-09-28 15:12:21 -06:00
|
|
|
then
|
2013-10-28 07:34:22 -06:00
|
|
|
print_warning $title build errors:
|
2014-11-21 14:54:57 -07:00
|
|
|
cat $T/rcuwarnings
|
2013-09-28 15:12:21 -06:00
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
exit 0
|