torture: Make kvm-recheck-scf.sh tolerate qemu-cmd comments
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 15 Jun 2021 23:16:47 +0000 (16:16 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 20 Jul 2021 20:45:50 +0000 (13:45 -0700)
The qemu-cmd file can contain comments that are not relevant to the
operation of kvm-recheck-scf.sh.  This commit therefore strips these
comments before looking for timing information.

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

index 671bfee4fcef4cd87340477ee884f0aa07d191a6..3afa5c6eda4f745bec7826e5a416ac44ca0bb3c0 100755 (executable)
@@ -25,7 +25,7 @@ if test -z "$nscfs"
 then
        echo "$configfile ------- "
 else
-       dur="`sed -e 's/^.* scftorture.shutdown_secs=//' -e 's/ .*$//' < $i/qemu-cmd 2> /dev/null`"
+       dur="`grep -v '^#' $i/qemu-cmd | sed -e 's/^.* scftorture.shutdown_secs=//' -e 's/ .*$//' 2> /dev/null`"
        if test -z "$dur"
        then
                rate=""