aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2021-07-09 14:31:37 -0700
committerPaul E. McKenney <paulmck@kernel.org>2021-07-27 11:41:33 -0700
commitb3bf9632efc47cc9ae640863b839c70e84da8ea6 (patch)
tree4259964eef19ffbec5133697bf709d279459c0e1 /tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh
parenttorture: Make kvm-test-1-run-batch.sh select per-scenario affinity masks (diff)
downloadlinux-dev-b3bf9632efc47cc9ae640863b839c70e84da8ea6.tar.xz
linux-dev-b3bf9632efc47cc9ae640863b839c70e84da8ea6.zip
torture: Don't use "test" command's "-a" argument
There was a time long ago when the "test" command's documentation claimed that the "-a" and "-o" arguments did something useful. But this documentation now suggests letting the shell execute these boolean operators, so this commit applies that suggestion to kvm-test-1-run-qemu.sh. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to '')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh
index d828a34b5b89..ca1d49c1c2f4 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh
@@ -89,7 +89,7 @@ then
fi
while :
do
- if test -z "$qemu_pid" -a -s "$resdir/qemu-pid"
+ if test -z "$qemu_pid" && test -s "$resdir/qemu-pid"
then
qemu_pid=`cat "$resdir/qemu-pid"`
fi
@@ -122,11 +122,11 @@ do
break
fi
done
-if test -z "$qemu_pid" -a -s "$resdir/qemu-pid"
+if test -z "$qemu_pid" && test -s "$resdir/qemu-pid"
then
qemu_pid=`cat "$resdir/qemu-pid"`
fi
-if test $commandcompleted -eq 0 -a -n "$qemu_pid"
+if test $commandcompleted -eq 0 && test -n "$qemu_pid"
then
if ! test -f "$resdir/../STOP.1"
then
@@ -159,11 +159,11 @@ then
then
last_ts=0
fi
- if test "$newline" != "$oldline" -a "$last_ts" -lt $((seconds + $TORTURE_SHUTDOWN_GRACE))
+ if test "$newline" != "$oldline" && test "$last_ts" -lt $((seconds + $TORTURE_SHUTDOWN_GRACE))
then
must_continue=yes
fi
- if test $must_continue = no -a $kruntime -ge $((seconds + $TORTURE_SHUTDOWN_GRACE))
+ if test $must_continue = no && test $kruntime -ge $((seconds + $TORTURE_SHUTDOWN_GRACE))
then
echo "!!! PID $qemu_pid hung at $kruntime vs. $seconds seconds" >> $resdir/Warnings 2>&1
kill -KILL $qemu_pid