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>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: [PATCH 6/6] torture: Use ${:+} to save a few lines in torture.sh's torture_one()
Date: Mon, 16 Nov 2026 09:26:30 -0800	[thread overview]
Message-ID: <20261116172630.3845508-6-paulmck@kernel.org> (raw)
In-Reply-To: <bf761cab-7423-464b-ba8e-bd39ad0eb089@paulmck-laptop>

This commit uses the ${:+} bash substitution pattern in the torture_one()
function in torture.sh to save a few lines of code.

Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/torture.sh | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index bc842c94c4379..0498fce14ccd6 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -354,16 +354,8 @@ touch $T/successes
 # Note that quoting is problematic.  So on the command line, pass multiple
 # values with multiple kvm.sh argument instances.
 function torture_one {
-	local cur_bootargs=
-	local boottag=
-
 	echo " --- $curflavor:" Start `date` | tee -a $T/log
-	if test -n "$torture_bootargs"
-	then
-		boottag="--bootargs"
-		cur_bootargs="$torture_bootargs"
-	fi
-	"$@" $boottag "$cur_bootargs" --datestamp "$ds/results-$curflavor" > $T/$curflavor.out 2>&1
+	"$@" ${torture_bootargs:+--bootargs "$torture_bootargs"} --datestamp "$ds/results-$curflavor" > $T/$curflavor.out 2>&1
 	retcode=$?
 	resdir="`grep '^Results directory: ' $T/$curflavor.out | tail -1 | sed -e 's/^Results directory: //'`"
 	if test -z "$resdir"
-- 
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 ` [PATCH 5/6] torture: Make kvm.sh ignore empty-string arguments Paul E. McKenney
2026-11-16 17:26 ` Paul E. McKenney [this message]
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-6-paulmck@kernel.org \
    --to=paulmck@kernel.org \
    --cc=jfern@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --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®