torture: Make kvm-remote.sh announce which system is being waited on
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 12 Apr 2022 22:17:37 +0000 (15:17 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 20 Jun 2022 16:22:57 +0000 (09:22 -0700)
If a remote system fails in certain ways, for example, if it is rebooted
without removing the contents of the /tmp directory, its remote.run file
never will be removed and the kvm-remote.sh script will loop waiting
forever.  The manual workaround for this (hopefully!) rare event is to
manually remove the file, which will cause the results up to the reboot
to be collected and evaluated.

Unfortunately, to work out which system is holding things up, the user
must refer to the name of the last system whose results were collected,
then look up the name of the next system in sequence, then manually
remove the remote.run file.  Even more unfortunately, this procedure can
be fooled in runs where each system handles more than one batch should
a given system take longer than expected, causing the systems to be
handled out of order.

This commit therefore causes kvm-remote.sh to print out the name of
the system it will wait on next, allowing the user to refer directly
to that name.  Making the kvm-remote.sh script automatically handle
unscheduled termination of the qemu processes is left as future work.
Quite possibly deep future work.

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

index 0ff59bd8b640df201d4a3ffa8b031e61a3ffe53c..9f0a5d5ff2ddc11ba213f9db21560b6a1065b47f 100755 (executable)
@@ -262,6 +262,7 @@ echo All batches started. `date` | tee -a "$oldrun/remote-log"
 # Wait for all remaining scenarios to complete and collect results.
 for i in $systems
 do
+       echo " ---" Waiting for $i `date` | tee -a "$oldrun/remote-log"
        while checkremotefile "$i" "$resdir/$ds/remote.run"
        do
                sleep 30