From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
mingo@kernel.org
Cc: stern@rowland.harvard.edu, parri.andrea@gmail.com,
will.deacon@arm.com, peterz@infradead.org, boqun.feng@gmail.com,
npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk,
luc.maranget@inria.fr, akiyks@gmail.com,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH memory-model 3/3] EXP tools/memory-model: Make scripts take "-j" abbreviation for "--jobs"
Date: Mon, 3 Dec 2018 15:04:51 -0800 [thread overview]
Message-ID: <20181203230451.28921-3-paulmck@linux.ibm.com> (raw)
In-Reply-To: <20181203230411.GA27476@linux.ibm.com>
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
The "--jobs" argument to the litmus-test scripts is similar to the "-jN"
argument to "make", so this commit allows the "-jN" form as well. While
in the area, it also prohibits the various forms of "-j0".
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
tools/memory-model/scripts/parseargs.sh | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/tools/memory-model/scripts/parseargs.sh b/tools/memory-model/scripts/parseargs.sh
index 96b307c8d64a..859e1d581e05 100755
--- a/tools/memory-model/scripts/parseargs.sh
+++ b/tools/memory-model/scripts/parseargs.sh
@@ -95,8 +95,18 @@ do
LKMM_HERD_OPTIONS="$2"
shift
;;
- --jobs|--job)
- checkarg --jobs "(number)" "$#" "$2" '^[0-9]\+$' '^--'
+ -j[1-9]*)
+ njobs="`echo $1 | sed -e 's/^-j//'`"
+ trailchars="`echo $njobs | sed -e 's/[0-9]\+\(.*\)$/\1/'`"
+ if test -n "$trailchars"
+ then
+ echo $1 trailing characters "'$trailchars'"
+ usagehelp
+ fi
+ LKMM_JOBS="`echo $njobs | sed -e 's/^\([0-9]\+\).*$/\1/'`"
+ ;;
+ --jobs|--job|-j)
+ checkarg --jobs "(number)" "$#" "$2" '^[1-9][0-9]\+$' '^--'
LKMM_JOBS="$2"
shift
;;
--
2.17.1
next prev parent reply other threads:[~2018-12-03 23:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 23:04 [PATCH memory-model 0/3] Updates to the formal memory model Paul E. McKenney
2018-12-03 23:04 ` Paul E. McKenney
2018-12-03 23:04 ` [PATCH memory-model 1/3] tools/memory-model: Model smp_mb__after_unlock_lock() Paul E. McKenney
2018-12-03 23:04 ` Paul E. McKenney
2018-12-03 23:04 ` [PATCH memory-model 2/3] EXP tools/memory-model: Add scripts to check github litmus tests Paul E. McKenney
2018-12-03 23:04 ` Paul E. McKenney
2018-12-03 23:04 ` Paul E. McKenney [this message]
2018-12-03 23:04 ` [PATCH memory-model 3/3] EXP tools/memory-model: Make scripts take "-j" abbreviation for "--jobs" Paul E. McKenney
2018-12-03 23:28 ` [PATCH memory-model 0/3] Updates to the formal memory model Akira Yokosawa
2018-12-03 23:28 ` Akira Yokosawa
2018-12-03 23:51 ` Paul E. McKenney
2018-12-03 23:51 ` Paul E. McKenney
2018-12-04 15:40 ` Akira Yokosawa
2018-12-04 15:40 ` Akira Yokosawa
2018-12-04 16:36 ` Paul E. McKenney
2018-12-04 16:36 ` 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=20181203230451.28921-3-paulmck@linux.ibm.com \
--to=paulmck@linux.ibm.com \
--cc=akiyks@gmail.com \
--cc=boqun.feng@gmail.com \
--cc=dhowells@redhat.com \
--cc=j.alglave@ucl.ac.uk \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.maranget@inria.fr \
--cc=mingo@kernel.org \
--cc=npiggin@gmail.com \
--cc=parri.andrea@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=stern@rowland.harvard.edu \
--cc=will.deacon@arm.com \
/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