summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/rcutorture/bin
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2021-12-21 07:24:25 +0300
committerPaul E. McKenney <paulmck@kernel.org>2022-02-02 04:25:41 +0300
commit2bc9062e7f394b3c6cbe408a13523c0a4bd13d2a (patch)
tree81ffbf9e72dd8f5bc39c256f9ab13915115da45b /tools/testing/selftests/rcutorture/bin
parent99c80a96a512f32a234687343ff1c8e5e033976b (diff)
downloadlinux-2bc9062e7f394b3c6cbe408a13523c0a4bd13d2a.tar.xz
torture: Make kvm-remote.sh try multiple times to download tarball
This commit ups the retries for downloading the build-product tarball to a given remote system from once to five times, the better to handle transient network failures. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-remote.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-remote.sh b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh
index e09b1bc78708..29b068a55b46 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-remote.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh
@@ -155,18 +155,23 @@ do
echo Downloading tarball to $i `date` | tee -a "$oldrun/remote-log"
cat $T/binres.tgz | ssh $i "cd /tmp; tar -xzf -"
ret=$?
- if test "$ret" -ne 0
- then
- echo Unable to download $T/binres.tgz to system $i, waiting and then retrying. | tee -a "$oldrun/remote-log"
+ tries=0
+ while test "$ret" -ne 0
+ do
+ echo Unable to download $T/binres.tgz to system $i, waiting and then retrying. $tries prior retries. | tee -a "$oldrun/remote-log"
sleep 60
cat $T/binres.tgz | ssh $i "cd /tmp; tar -xzf -"
ret=$?
if test "$ret" -ne 0
then
- echo Unable to download $T/binres.tgz to system $i, giving up. | tee -a "$oldrun/remote-log"
- exit 10
+ if test "$tries" > 5
+ then
+ echo Unable to download $T/binres.tgz to system $i, giving up. | tee -a "$oldrun/remote-log"
+ exit 10
+ fi
fi
- fi
+ tries=$((tries+1))
+ done
done
# Function to check for presence of a file on the specified system.