When CONFIG_PROVE_LOCKING is missing, the deadlock-detection loop and the mixed-SRCU-readers section each increment nerrs once in the configuration check and again in the common error path, counting the same error twice.
Remove the stray increments so that each error advances nerrs by one. Signed-off-by: Kunwu Chan <[email protected]> --- tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh b/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh index 72791499dd96..3acaffe52c78 100755 --- a/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh +++ b/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh @@ -56,7 +56,6 @@ do if ! grep -q '^CONFIG_PROVE_LOCKING=y' .config then echo "rcu_torture_init_srcu_lockdep:Error: CONFIG_PROVE_LOCKING disabled in rcutorture SRCU-P scenario" - nerrs=$((nerrs+1)) err=1 fi if test "$d" -ne 0 && test "$ret" -eq 0 @@ -126,7 +125,6 @@ do if ! grep -q '^CONFIG_PROVE_LOCKING=y' .config then echo "rcu_torture_init_srcu_lockdep:Error: CONFIG_PROVE_LOCKING disabled in rcutorture SRCU-P scenario" - nerrs=$((nerrs+1)) err=1 fi if test "$val" = 0xf && test "$ret" -eq 0 -- 2.43.0

