Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rcutorture: Fix numeric "test" comparison in srcu_lockdep.sh

This commit switches from "-eq" to "=" to handle the non-numeric
comparisons in srcu_lockdep.sh. While in the area, adjust SRCU flavor
to improve coverage.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>

authored by

Paul E. McKenney and committed by
Joel Fernandes
df6e6ae1 6778178c

+3 -3
+3 -3
tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh
··· 50 50 do 51 51 err= 52 52 val=$((d*1000+t*10+c)) 53 - tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 5s --configs "SRCU-P" --kconfig "CONFIG_FORCE_NEED_SRCU_NMI_SAFE=y" --bootargs "rcutorture.test_srcu_lockdep=$val rcutorture.reader_flavor=0x2" --trust-make --datestamp "$ds/$val" > "$T/kvm.sh.out" 2>&1 53 + tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 5s --configs "SRCU-P" --kconfig "CONFIG_FORCE_NEED_SRCU_NMI_SAFE=y" --bootargs "rcutorture.test_srcu_lockdep=$val rcutorture.reader_flavor=0x4" --trust-make --datestamp "$ds/$val" > "$T/kvm.sh.out" 2>&1 54 54 ret=$? 55 55 mv "$T/kvm.sh.out" "$RCUTORTURE/res/$ds/$val" 56 56 if ! grep -q '^CONFIG_PROVE_LOCKING=y' .config ··· 92 92 nerrs=$((nerrs+1)) 93 93 err=1 94 94 fi 95 - if test "$val" -eq 0xf && test "$ret" -eq 0 95 + if test "$val" = 0xf && test "$ret" -eq 0 96 96 then 97 97 err=1 98 98 echo -n Unexpected success for > "$RCUTORTURE/res/$ds/$val/kvm.sh.err" 99 99 fi 100 - if test "$val" -eq 0x1 && test "$ret" -ne 0 100 + if test "$val" = 0x1 && test "$ret" -ne 0 101 101 then 102 102 err=1 103 103 echo -n Unexpected failure for > "$RCUTORTURE/res/$ds/$val/kvm.sh.err"