brintos

brintos / linux-shallow public Read only

0
0
Text · 1.1 KiB · 5a0b7ff Raw
50 lines · bash
1#!/bin/bash2# SPDX-License-Identifier: GPL-2.0+3#4# Check the build output from an rcutorture run for goodness.5# The "file" is a pathname on the local system, and "title" is6# a text string for error-message purposes.7#8# The file must contain kernel build output.9#10# Usage: parse-build.sh file title11#12# Copyright (C) IBM Corporation, 201113#14# Authors: Paul E. McKenney <paulmck@linux.ibm.com>15 16F=$117title=$218T="`mktemp -d ${TMPDIR-/tmp}/parse-build.sh.XXXXXX`"19trap 'rm -rf $T' 020 21. functions.sh22 23if grep -q CC < $F || test -n "$TORTURE_TRUST_MAKE" || grep -qe --trust-make < `dirname $F`/../log24then25	:26else27	print_bug $title no build28	exit 129fi30 31if grep -q "error:" < $F32then33	print_bug $title build errors:34	grep "error:" < $F35	exit 236fi37 38grep warning: < $F > $T/warnings39grep "include/linux/*rcu*\.h:" $T/warnings > $T/hwarnings40grep "kernel/rcu/[^/]*:" $T/warnings > $T/cwarnings41grep "^ld: .*undefined reference to" $T/warnings | head -1 > $T/ldwarnings42cat $T/hwarnings $T/cwarnings $T/ldwarnings > $T/rcuwarnings43if test -s $T/rcuwarnings44then45	print_warning $title build errors:46	cat $T/rcuwarnings47	exit 248fi49exit 050