Commit c821f855 authored by Paul E. McKenney's avatar Paul E. McKenney

torture: s/STOP/STOP.1/ to avoid scenario collision

This commit changes the "STOP" file that is used to cleanly halt a running
rcutorture run to "STOP.1" because no scenario directory will ever end
with ".1".  If there really was a scenario named "STOP", its directories
would instead be named "STOP", "STOP.2", "STOP.3", and so on.  While in
the area, the commit also changes the kernel-run-time checks for this
file to look directly in the directory above $resdir, thus avoiding the
need to pass the TORTURE_STOPFILE environment variable to remote systems.

While in the area, move the STOP.1 file to the top-level directory
covering all of the scenarios.
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 755cf0af
...@@ -211,7 +211,7 @@ do ...@@ -211,7 +211,7 @@ do
if test -n "$TORTURE_KCONFIG_GDB_ARG" if test -n "$TORTURE_KCONFIG_GDB_ARG"
then then
: :
elif test $kruntime -ge $seconds || test -f "$TORTURE_STOPFILE" elif test $kruntime -ge $seconds || test -f "$resdir/../STOP.1"
then then
break; break;
fi fi
...@@ -254,16 +254,16 @@ then ...@@ -254,16 +254,16 @@ then
fi fi
if test $commandcompleted -eq 0 -a -n "$qemu_pid" if test $commandcompleted -eq 0 -a -n "$qemu_pid"
then then
if ! test -f "$TORTURE_STOPFILE" if ! test -f "$resdir/../STOP.1"
then then
echo Grace period for qemu job at pid $qemu_pid echo Grace period for qemu job at pid $qemu_pid
fi fi
oldline="`tail $resdir/console.log`" oldline="`tail $resdir/console.log`"
while : while :
do do
if test -f "$TORTURE_STOPFILE" if test -f "$resdir/../STOP.1"
then then
echo "PID $qemu_pid killed due to run STOP request" >> $resdir/Warnings 2>&1 echo "PID $qemu_pid killed due to run STOP.1 request" >> $resdir/Warnings 2>&1
kill -KILL $qemu_pid kill -KILL $qemu_pid
break break
fi fi
......
...@@ -386,7 +386,7 @@ then ...@@ -386,7 +386,7 @@ then
fi fi
mkdir -p $resdir/$ds mkdir -p $resdir/$ds
TORTURE_RESDIR="$resdir/$ds"; export TORTURE_RESDIR TORTURE_RESDIR="$resdir/$ds"; export TORTURE_RESDIR
TORTURE_STOPFILE="$resdir/$ds/STOP"; export TORTURE_STOPFILE TORTURE_STOPFILE="$resdir/$ds/STOP.1"; export TORTURE_STOPFILE
echo Results directory: $resdir/$ds echo Results directory: $resdir/$ds
echo $scriptname $args echo $scriptname $args
touch $resdir/$ds/log touch $resdir/$ds/log
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment