From nobody Mon Feb 9 23:20:06 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9F92215073; Mon, 31 Mar 2025 21:03:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743454996; cv=none; b=GNHT7Q1kEQdmkAe3EVUoRizTr/zpABPIkoe7m6YUFHvTwXEBn/HkAKCoEIaVuR2TiWosTKVhIfI1uCUXobyKw3QrFgcq7nGR8qT3pdaySDjhwpAhJDtfWk8/dAI1QBG8h7z2+CHAJpocuLKJz/pH2ZaBZiIZyZGhuYWcwHPu7RA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743454996; c=relaxed/simple; bh=77AYLHKjJDUAxlPSNSjE5Yx8FldJR4VJKjnY8y5KFC8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mgdwFamwBlq9UTmfGmdZ60CM+O1/KunWUsRnCU6FivHgAIi+6dlZcrmKdUIiTfmKELyuCGQzh66Cb+pcxRrPs9KM0UbX87F+5iPZR/XMmV0BmvrEg1on79ZLp7jPcm8Ph4wtRi95B3Bj4rJQiuwmAmpm33LyLxH4QkeUSD25hYw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=slC7fkxD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="slC7fkxD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71B86C4CEE5; Mon, 31 Mar 2025 21:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743454995; bh=77AYLHKjJDUAxlPSNSjE5Yx8FldJR4VJKjnY8y5KFC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=slC7fkxDPp+7PFcG720jp6SwhBm+3ATcG0jFNAUE+luEy+OwRfgdFNAaH2x4JUc1F sPmu67F93C0sLm1jWHB6SW2f1uiXt1Dx3ElIrY9/XbyUPltel150jXpO3H1kyx/FIc /nqgWjwIJDmOWkd+Evl/lw7X8JiRAatKUS5oXTbFU+0n4HUJiq191M2FColzRHDDBN aIR650fdt5LRdo1BWAMiUmQXsaysoTGFlBHASF+hD1bxtLaiv3m4nU0hd8eBmP1ESg v2XGo/MqR85E6T5AjjWBfa+kFpR9hKKXnXyZFQ3b+D9GPwMZ3GGCj3CN2Q3ar/VQuB wlHl/l9Q4UcaA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 230E5CE0869; Mon, 31 Mar 2025 14:03:15 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org, Joel Fernandes Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" Subject: [PATCH v2 01/12] rcutorture: Make srcu_lockdep.sh check kernel Kconfig Date: Mon, 31 Mar 2025 14:03:03 -0700 Message-Id: <20250331210314.590622-1-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The srcu_lockdep.sh currently blindly trusts the rcutorture SRCU-P scenario to build its kernel with lockdep enabled. Of course, this dependency might not be obvious to someone rebalancing SRCU scenarios. This commit therefore adds code to srcu_lockdep.sh that verifies that the .config file has lockdep enabled. Signed-off-by: Paul E. McKenney --- .../testing/selftests/rcutorture/bin/srcu_lockdep.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh b/tools= /testing/selftests/rcutorture/bin/srcu_lockdep.sh index 2db12c5cad9c6..b94f6d3445c6c 100755 --- a/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh +++ b/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh @@ -39,8 +39,9 @@ do shift done =20 -err=3D nerrs=3D0 + +# Test lockdep's handling of deadlocks. for d in 0 1 do for t in 0 1 2 @@ -52,6 +53,12 @@ do tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 5s -= -configs "SRCU-P" --kconfig "CONFIG_FORCE_NEED_SRCU_NMI_SAFE=3Dy" --bootarg= s "rcutorture.test_srcu_lockdep=3D$val rcutorture.reader_flavor=3D0x2" --tr= ust-make --datestamp "$ds/$val" > "$T/kvm.sh.out" 2>&1 ret=3D$? mv "$T/kvm.sh.out" "$RCUTORTURE/res/$ds/$val" + if ! grep -q '^CONFIG_PROVE_LOCKING=3Dy' .config + then + echo "rcu_torture_init_srcu_lockdep:Error: CONFIG_PROVE_LOCKING disabl= ed in rcutorture SRCU-P scenario" + nerrs=3D$((nerrs+1)) + err=3D1 + fi if test "$d" -ne 0 && test "$ret" -eq 0 then err=3D1 @@ -71,6 +78,8 @@ do done done done + +# Set up exit code. if test "$nerrs" -ne 0 then exit 1 --=20 2.40.1