mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
	rostedt@goodmis.org, Kunwu Chan <kunwu.chan@gmail.com>,
	Boqun Feng <boqun@kernel.org>,
	"Paul E . McKenney" <paulmck@kernel.org>
Subject: [PATCH v2 7/8] selftests/rcutorture: Fix double nerrs count in srcu_lockdep.sh
Date: Wed,  7 Oct 2026 14:04:07 -0700	[thread overview]
Message-ID: <20261007210408.1983713-7-paulmck@kernel.org> (raw)
In-Reply-To: <f9cb7abd-db60-43f6-9392-27fe29abb75b@paulmck-laptop>

From: Kunwu Chan <kunwu.chan@gmail.com>

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>
---
 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


  parent reply	other threads:[~2026-10-07 21:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 21:04 [PATCH 0/8] Torture-test updates for v7.4 Paul E. McKenney
2026-10-07 21:04 ` [PATCH v2 1/8] rcutorture: Fix divide-by-zero with fwd_progress_div=1 Paul E. McKenney
2026-10-07 21:04 ` [PATCH v2 2/8] rcutorture: Synchronously wait for all rcu_torture_irq() callbacks to complete Paul E. McKenney
2026-10-07 21:04 ` [PATCH v2 3/8] torture: Allow specifying alternative ssh command to kvm-remote.sh Paul E. McKenney
2026-10-07 21:04 ` [PATCH v2 4/8] rcutorture: Fix kvm-again.sh re-run failure on ppc64 Paul E. McKenney
2026-10-07 21:04 ` [PATCH v2 5/8] rcutorture: Add atomic SRCU lockdep support Paul E. McKenney
2026-10-07 21:04 ` [PATCH v2 6/8] selftests/rcutorture: Wire atomic SRCU into srcu_lockdep.sh Paul E. McKenney
2026-10-07 21:04 ` Paul E. McKenney [this message]
2026-10-07 21:04 ` [PATCH v2 8/8] rcutorture: Add atomic SRCU cross-CPU IRQ context mismatch test Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261007210408.1983713-7-paulmck@kernel.org \
    --to=paulmck@kernel.org \
    --cc=boqun@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kunwu.chan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®