summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-12-21 01:52:29 +0100
committerPaul E. McKenney <paulmck@kernel.org>2021-01-04 23:01:24 +0100
commit365dc5cb62c8714e27554e44464f6e0e9c1fdbdf (patch)
tree84bd8ca0d582d9f870d2953c2e6d2a15ec0d8117 /tools
parenttorture: s/STOP/STOP.1/ to avoid scenario collision (diff)
downloadlinux-365dc5cb62c8714e27554e44464f6e0e9c1fdbdf.tar.xz
linux-365dc5cb62c8714e27554e44464f6e0e9c1fdbdf.zip
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: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-find-errors.sh1
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-recheck.sh3
2 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh b/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
index be265987fa9d..0670841122d8 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
@@ -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
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
index 840a4679a0d7..47cf4db10896 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
@@ -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