]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
torture: Retry download once before giving up
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 22 Nov 2021 20:47:50 +0000 (12:47 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 1 Dec 2021 01:30:29 +0000 (17:30 -0800)
Currently, a transient network error can kill a run if it happens while
downloading the tarball to one of the target systems.  This commit
therefore does a 60-second wait and then a retry.  If further experience
indicates, a more elaborate mechanism might be used later.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/kvm-remote.sh

index c7d42ef80c5345e27488d7718cf4bd36c8936e78..67ebc56111e3f264ba088a0e45fb6855880eaecf 100755 (executable)
@@ -157,8 +157,15 @@ do
        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 | tee -a "$oldrun/remote-log"
+               echo Unable to download $T/binres.tgz to system $i, waiting and then retrying. | 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
+               fi
        fi
 done