aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2021-01-05 10:50:32 -0800
committerPaul E. McKenney <paulmck@kernel.org>2021-03-08 14:23:01 -0800
commita519d21480d330918bd522499a323432c31b6ec2 (patch)
treee46d71d7f0bd63f9bdb2ed0229cec4426b9db9d7 /tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
parentLinux 5.12-rc2 (diff)
downloadlinux-dev-a519d21480d330918bd522499a323432c31b6ec2.tar.xz
linux-dev-a519d21480d330918bd522499a323432c31b6ec2.zip
torturescript: Don't rerun failed rcutorture builds
If the build fails when running multiple instances of a given rcutorture scenario, for example, using the kvm.sh --configs "8*RUDE01" argument, the build will be rerun an additional seven times. This is in some sense correct, but it can waste significant time. This commit therefore checks for a prior failed build and simply copies over that build's output. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to '')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
index 536d103ef166..9d8a82cac808 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -73,7 +73,7 @@ config_override_param "--kconfig argument" KcList "$TORTURE_KCONFIG_ARG"
cp $T/KcList $resdir/ConfigFragment
base_resdir=`echo $resdir | sed -e 's/\.[0-9]\+$//'`
-if test "$base_resdir" != "$resdir" -a -f $base_resdir/bzImage -a -f $base_resdir/vmlinux
+if test "$base_resdir" != "$resdir" && test -f $base_resdir/bzImage && test -f $base_resdir/vmlinux
then
# Rerunning previous test, so use that test's kernel.
QEMU="`identify_qemu $base_resdir/vmlinux`"
@@ -83,6 +83,17 @@ then
ln -s $base_resdir/.config $resdir # for kvm-recheck.sh
# Arch-independent indicator
touch $resdir/builtkernel
+elif test "$base_resdir" != "$resdir"
+then
+ # Rerunning previous test for which build failed
+ ln -s $base_resdir/Make*.out $resdir # for kvm-recheck.sh
+ ln -s $base_resdir/.config $resdir # for kvm-recheck.sh
+ echo Initial build failed, not running KVM, see $resdir.
+ if test -f $builddir.wait
+ then
+ mv $builddir.wait $builddir.ready
+ fi
+ exit 1
elif kvm-build.sh $T/KcList $resdir
then
# Had to build a kernel for this test.