summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKunwu Chan <kunwu.chan@gmail.com>2026-09-14 17:34:18 +0800
committerPaul E. McKenney <paulmck@kernel.org>2026-10-01 17:21:07 -0700
commit7743179aaa22b6ecb499dbb7fdb4207c8fce6f3e (patch)
treecbc6c8553abd91a78b336f0cd8b3ae018b2b6dfb
parentf07c9df1b55ca1f23aa0c69de79b02313c4db47e (diff)
downloadlinux-next-7743179aaa22b6ecb499dbb7fdb4207c8fce6f3e.tar.gz
linux-next-7743179aaa22b6ecb499dbb7fdb4207c8fce6f3e.zip
selftests/rcutorture: Fix double nerrs count in srcu_lockdep.sh
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@gmail.com> Acked-by: Boqun Feng <boqun@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/srcu_lockdep.sh2
1 files changed, 0 insertions, 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