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, Joel Fernandes <jfern@kernel.org>,
	"Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH 5/6] torture: Make kvm.sh ignore empty-string arguments
Date: Mon, 16 Nov 2026 09:26:29 -0800	[thread overview]
Message-ID: <20261116172630.3845508-5-paulmck@kernel.org> (raw)
In-Reply-To: <bf761cab-7423-464b-ba8e-bd39ad0eb089@paulmck-laptop>

This commit makes kvm.sh ignore empty-string arguments in order to
simplify some scripting use cases of kvm.sh.  In many cases, as pointed
out by Mathieu Desnoyers, the calling script would do better to use the
bash ${:+} substitution pattern.  For an example already in torture.sh,
${qemu_args:+--qemu-args "$qemu_args"} expands to nothingness if qemu_args
is empty, but otherwise expands to a "--qemu-args " prepended to it value.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 32c3199976388..86dd5c131d226 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -271,6 +271,9 @@ do
 	--trust-make)
 		TORTURE_TRUST_MAKE="y"
 		;;
+	"")
+		# torture.sh can pass empty arguments.  Ignore them.
+		;;
 	*)
 		echo Unknown argument $1
 		usage
-- 
2.40.1


  parent reply	other threads:[~2026-11-16 17:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 17:25 [PATCH 0/6] Additional miscellaneous RCU updates for v7.5 Paul E. McKenney
2026-11-16 17:26 ` [PATCH 1/6] MAINTAINERS: Add Puranjay Mohan and RCU reviewer Paul E. McKenney
2026-11-16 17:26 ` [PATCH 2/6] rcutorture: Make torture.sh test NMIs for atomic SRCU on x86 Paul E. McKenney
2026-11-16 17:26 ` [PATCH 3/6] torture: Avoid duplicate identify_qemu_vcpus calls in torture.sh Paul E. McKenney
2026-11-16 17:26 ` [PATCH 4/6] rcutorture: Make torture.sh test NMIs for RCU on x86 Paul E. McKenney
2026-11-16 17:26 ` Paul E. McKenney [this message]
2026-11-16 17:26 ` [PATCH 6/6] torture: Use ${:+} to save a few lines in torture.sh's torture_one() Paul E. McKenney
2026-11-16 19:00 ` [PATCH 0/6] Additional miscellaneous RCU updates for v7.5 Joel Fernandes

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=20261116172630.3845508-5-paulmck@kernel.org \
    --to=paulmck@kernel.org \
    --cc=jfern@kernel.org \
    --cc=kernel-team@meta.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®