diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2018-12-03 18:04:51 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-01-21 05:07:04 -0500 |
commit | 910cc9591d1433c2e26bd1c210844b09c699dd89 (patch) | |
tree | b41c7b3f333ef18e046f00398977f44a79cba550 /tools/memory-model | |
parent | b02eb5b0961a06561b89f5b7f0dd171b750e5789 (diff) |
tools/memory-model: Make scripts take "-j" abbreviation for "--jobs"
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>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
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: luc.maranget@inria.fr
Cc: npiggin@gmail.com
Cc: parri.andrea@gmail.com
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/20181203230451.28921-3-paulmck@linux.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/memory-model')
-rw-r--r-- | tools/memory-model/scripts/parseargs.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/memory-model/scripts/parseargs.sh b/tools/memory-model/scripts/parseargs.sh index 96b307c8d64a..859e1d581e05 100644 --- a/tools/memory-model/scripts/parseargs.sh +++ b/tools/memory-model/scripts/parseargs.sh | |||
@@ -95,8 +95,18 @@ do | |||
95 | LKMM_HERD_OPTIONS="$2" | 95 | LKMM_HERD_OPTIONS="$2" |
96 | shift | 96 | shift |
97 | ;; | 97 | ;; |
98 | --jobs|--job) | 98 | -j[1-9]*) |
99 | checkarg --jobs "(number)" "$#" "$2" '^[0-9]\+$' '^--' | 99 | njobs="`echo $1 | sed -e 's/^-j//'`" |
100 | trailchars="`echo $njobs | sed -e 's/[0-9]\+\(.*\)$/\1/'`" | ||
101 | if test -n "$trailchars" | ||
102 | then | ||
103 | echo $1 trailing characters "'$trailchars'" | ||
104 | usagehelp | ||
105 | fi | ||
106 | LKMM_JOBS="`echo $njobs | sed -e 's/^\([0-9]\+\).*$/\1/'`" | ||
107 | ;; | ||
108 | --jobs|--job|-j) | ||
109 | checkarg --jobs "(number)" "$#" "$2" '^[1-9][0-9]\+$' '^--' | ||
100 | LKMM_JOBS="$2" | 110 | LKMM_JOBS="$2" |
101 | shift | 111 | shift |
102 | ;; | 112 | ;; |