Commit 365dc5cb authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

torture: Simplify exit-code plumbing for kvm-recheck.sh and kvm-find-errors.sh



This commit simplifies exit-code plumbing.  It makes kvm-recheck.sh return
the value 1 for a build error and 2 for a runtime error.  It also makes
kvm-find-errors.sh avoid checking runtime files for --build-only runs.

Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent c821f855
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ fi
if grep -q -e "--buildonly" < ${rundir}/log
then
	echo Build-only run, no console logs to check.
	exit $editorret
fi

# Find console logs with errors
+2 −1
Original line number Diff line number Diff line
@@ -87,15 +87,16 @@ do
	fi
done
EDITOR=echo kvm-find-errors.sh "${@: -1}" > $T 2>&1
ret=$?
builderrors="`tr ' ' '\012' < $T | grep -c '/Make.out.diags'`"
if test "$builderrors" -gt 0
then
	echo $builderrors runs with build errors.
	ret=1
fi
runerrors="`tr ' ' '\012' < $T | grep -c '/console.log.diags'`"
if test "$runerrors" -gt 0
then
	echo $runerrors runs with runtime errors.
	ret=2
fi
exit $ret