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-07 17:11:09 -0700
committerPaul E. McKenney <paulmck@kernel.org>2021-07-27 11:41:32 -0700
commit8220a1184970b4ce983113cf48009fd8fea8c4a3 (patch)
tree6e80962549e142dd972449b508731eaa7d6320b5 /tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh
parenttorture: Make kvm.sh select per-scenario affinity masks (diff)
downloadlinux-dev-8220a1184970b4ce983113cf48009fd8fea8c4a3.tar.xz
linux-dev-8220a1184970b4ce983113cf48009fd8fea8c4a3.zip
torture: Don't redirect qemu-cmd comment lines
Currently, kvm-test-1-run-qemu.sh applies redirection to each and every line of each qemu-cmd script. Only the first line (the only one that is not a bash comment) needs to be redirected. Although redirecting the comments is currently harmless, just adding to the comment, it is an accident waiting to happen. This commit therefore adjusts the "sed" command to redirect only the qemu-system* command itself. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to '')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh2
1 files changed, 1 insertions, 1 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 7c6643d1f037..2fd0868b357c 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
@@ -40,7 +40,7 @@ grep '^#' $resdir/qemu-cmd | sed -e 's/^# //' > $T/qemu-cmd-settings
. $T/qemu-cmd-settings
# Decorate qemu-cmd with redirection, backgrounding, and PID capture
-sed -e 's/$/ 2>\&1 \&/' < $resdir/qemu-cmd > $T/qemu-cmd
+sed -e 's/^[^#].*$/& 2>\&1 \&/' < $resdir/qemu-cmd > $T/qemu-cmd
echo 'echo $! > $resdir/qemu_pid' >> $T/qemu-cmd
# In case qemu refuses to run...