[PATCH v2 7/8] selftests/rcutorture: Fix double nerrs count in srcu_lockdep.sh
From: Paul E. McKenney
Date: Wed Oct 07 2026 - 17:05:28 EST
From: Kunwu Chan <kunwu.chan@xxxxxxxxx>
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 <kunwu.chan@xxxxxxxxx>
Acked-by: Boqun Feng <boqun@xxxxxxxxxx>
Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
---
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 72791499dd96b..3acaffe52c784 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.40.1