linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: paulmck@kernel.org
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
	mingo@kernel.org, jiangshanlai@gmail.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
	rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
	fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
	"Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH tip/core/rcu 09/20] torture: Make kvm.sh arguments accumulate
Date: Wed,  6 Jan 2021 09:25:56 -0800	[thread overview]
Message-ID: <20210106172607.22816-9-paulmck@kernel.org> (raw)
In-Reply-To: <20210106172547.GA22404@paulmck-ThinkPad-P72>

From: "Paul E. McKenney" <paulmck@kernel.org>

Given that kvm.sh in invoked from scripts, it is only natural for
different levels of scripting to provide their own Kconfig option values,
for example.  Unfortunately, right now, the last such argument on the
command line wins.

This commit therefore makes the --bootargs, --configs, --kconfigs,
--kmake-args, and --qemu-args argument values accumulate.  For example,
where "--configs TREE01 --configs TREE02" would previously have run only
scenario TREE02, now it will run both scenarios.

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

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index c8356d5..6fd7ef7 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -85,7 +85,7 @@ do
 		;;
 	--bootargs|--bootarg)
 		checkarg --bootargs "(list of kernel boot arguments)" "$#" "$2" '.*' '^--'
-		TORTURE_BOOTARGS="$2"
+		TORTURE_BOOTARGS="$TORTURE_BOOTARGS $2"
 		shift
 		;;
 	--bootimage)
@@ -97,8 +97,8 @@ do
 		TORTURE_BUILDONLY=1
 		;;
 	--configs|--config)
-		checkarg --configs "(list of config files)" "$#" "$2" '^[^/]*$' '^--'
-		configs="$2"
+		checkarg --configs "(list of config files)" "$#" "$2" '^[^/]\+$' '^--'
+		configs="$configs $2"
 		shift
 		;;
 	--cpus)
@@ -162,7 +162,7 @@ do
 		;;
 	--kconfig|--kconfigs)
 		checkarg --kconfig "(Kconfig options)" $# "$2" '^CONFIG_[A-Z0-9_]\+=\([ynm]\|[0-9]\+\)\( CONFIG_[A-Z0-9_]\+=\([ynm]\|[0-9]\+\)\)*$' '^error$'
-		TORTURE_KCONFIG_ARG="$2"
+		TORTURE_KCONFIG_ARG="`echo "$TORTURE_KCONFIG_ARG $2" | sed -e 's/^ *//' -e 's/ *$//'`"
 		shift
 		;;
 	--kasan)
@@ -173,7 +173,7 @@ do
 		;;
 	--kmake-arg|--kmake-args)
 		checkarg --kmake-arg "(kernel make arguments)" $# "$2" '.*' '^error$'
-		TORTURE_KMAKE_ARG="$2"
+		TORTURE_KMAKE_ARG="`echo "$TORTURE_KMAKE_ARG $2" | sed -e 's/^ *//' -e 's/ *$//'`"
 		shift
 		;;
 	--mac)
@@ -191,7 +191,7 @@ do
 		;;
 	--qemu-args|--qemu-arg)
 		checkarg --qemu-args "(qemu arguments)" $# "$2" '^-' '^error'
-		TORTURE_QEMU_ARG="$2"
+		TORTURE_QEMU_ARG="`echo "$TORTURE_QEMU_ARG $2" | sed -e 's/^ *//' -e 's/ *$//'`"
 		shift
 		;;
 	--qemu-cmd)
-- 
2.9.5


  parent reply	other threads:[~2021-01-06 17:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
2021-01-06 17:25 ` [PATCH tip/core/rcu 01/20] torture: Make --kcsan specify lockdep paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 02/20] torture: Make kvm.sh "--dryrun sched" summarize number of batches paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 03/20] torture: Make kvm.sh "--dryrun sched" summarize number of builds paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 04/20] torture: Allow kvm.sh --datestamp to specify subdirectories paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 05/20] torture: Prepare for splitting qemu execution from kvm-test-1-run.sh paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 06/20] torture: Add config2csv.sh script to compare torture scenarios paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 07/20] tools/rcutorture: Make identify_qemu_vcpus() independent of local language paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 08/20] torture: Make kvm.sh "Test Summary" date be end of test paulmck
2021-01-06 17:25 ` paulmck [this message]
2021-01-06 17:25 ` [PATCH tip/core/rcu 10/20] torture: Print run duration at end of kvm.sh execution paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 11/20] torture: Make kvm.sh return failure upon build failure paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 12/20] torture: Make kvm.sh include --kconfig arguments in CPU calculation paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 13/20] torture: Add kvm.sh test summary to end of log file paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 14/20] torture: Stop hanging on panic paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 15/20] torture: Add --dryrun batches to help schedule a distributed run paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 16/20] torture: s/STOP/STOP.1/ to avoid scenario collision paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 17/20] torture: Simplify exit-code plumbing for kvm-recheck.sh and kvm-find-errors.sh paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 18/20] torture: Remove "Failed to add ttynull console" false positive paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 19/20] torture: Allow standalone kvm-recheck.sh run detect --trust-make paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 20/20] torture: Do Kconfig analysis only once per scenario paulmck

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=20210106172607.22816-9-paulmck@kernel.org \
    --to=paulmck@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).