]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
torture: Make kvm-recheck-lock.sh tolerate qemu-cmd comments
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 15 Jun 2021 23:31:16 +0000 (16:31 -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-lock.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-lock.sh

index f3a7a5e2b89d49a0752a0714f64714f7eaf50b6d..db2c0e2c8e1def6dc864df3c4a15bb62de3de957 100755 (executable)
@@ -25,7 +25,7 @@ then
        echo "$configfile -------"
 else
        title="$configfile ------- $ncs acquisitions/releases"
-       dur=`sed -e 's/^.* locktorture.shutdown_secs=//' -e 's/ .*$//' < $i/qemu-cmd 2> /dev/null`
+       dur=`grep -v '^#' $i/qemu-cmd | sed -e 's/^.* locktorture.shutdown_secs=//' -e 's/ .*$//' 2> /dev/null`
        if test -z "$dur"
        then
                :