torture: Fix grace-period rate output
authorPaul E. McKenney <paulmck@kernel.org>
Sun, 14 Mar 2021 22:19:59 +0000 (15:19 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 10 May 2021 23:05:06 +0000 (16:05 -0700)
The kvm-again.sh script relies on shell comments added to the qemu-cmd
file, but this means that code extracting values from the QEMU command in
this file must grep out those commment.  Which kvm-recheck-rcu.sh failed
to do, which destroyed its grace-period-per-second calculation.  This
commit therefore adds the needed "grep -v '^#'" to kvm-recheck-rcu.sh.

Fixes: 315957cad445 ("torture: Prepare for splitting qemu execution from kvm-test-1-run.sh")
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh

index 1706cd4466b429d0cae27d65a957bfb0e3d23eba..fbdf162b6acdff8f2fc93d70376a409ae42de461 100755 (executable)
@@ -31,7 +31,7 @@ then
        echo "$configfile ------- " $stopstate
 else
        title="$configfile ------- $ngps GPs"
-       dur=`sed -e 's/^.* rcutorture.shutdown_secs=//' -e 's/ .*$//' < $i/qemu-cmd 2> /dev/null`
+       dur=`grep -v '^#' $i/qemu-cmd | sed -e 's/^.* rcutorture.shutdown_secs=//' -e 's/ .*$//'`
        if test -z "$dur"
        then
                :