Lines Matching +full:1 +full:- +full:9 +full:a +full:- +full:e
2 # SPDX-License-Identifier: GPL-2.0+
8 # Include into other Linux kernel tools/memory-model scripts.
12 # Author: Paul E. McKenney <paulmck@linux.ibm.com>
19 echo if test -z '"$'$1'"' > $T/s
21 echo $1='"'$2'"' >> $T/s
22 echo export $1 >> $T/s
24 echo $1_DEF='$'$1 >> $T/s
29 initparam LKMM_HERD_OPTIONS "-conf linux-kernel.cfg"
33 initparam LKMM_TIMEOUT "1m"
39 echo " --destdir path (place for .litmus.out, default by .litmus)"
40 echo " --herdopts -conf linux-kernel.cfg ..."
41 echo " --hw AArch64"
42 echo " --jobs N (number of jobs, default one per CPU)"
43 echo " --procs N (litmus tests with at most this many processes)"
44 echo " --timeout N (herd7 timeout (e.g., 10s, 1m, 2hr, 1d, '')"
45 …lts: --destdir '$LKMM_DESTDIR_DEF' --herdopts '$LKMM_HERD_OPTIONS_DEF' --hw '$LKMM_HW_MAP_FILE' --…
46 exit 1
50 usagehelp 1>&2
53 # checkarg --argname argtype $# arg mustmatch cannotmatch
55 if test $3 -le 1
57 echo $1 needs argument $2 matching \"$5\"
60 if echo "$4" | grep -q -e "$5"
64 echo $1 $2 \"$4\" must match \"$5\"
67 if echo "$4" | grep -q -e "$6"
69 echo $1 $2 \"$4\" must not match \"$6\"
74 while test $# -gt 0
76 case "$1" in
77 --destdir)
78 checkarg --destdir "(path to directory)" "$#" "$2" '.\+' '^--'
80 mkdir $LKMM_DESTDIR > /dev/null 2>&1
81 if ! test -e "$LKMM_DESTDIR"
83 echo "Cannot create directory --destdir '$LKMM_DESTDIR'"
86 if test -d "$LKMM_DESTDIR" -a -x "$LKMM_DESTDIR"
90 echo "Directory --destdir '$LKMM_DESTDIR' insufficient permissions to create files"
95 --herdopts|--herdopt)
96 checkarg --destdir "(herd7 options)" "$#" "$2" '.*' '^--'
100 --hw)
101 checkarg --hw "(.map file architecture name)" "$#" "$2" '^[A-Za-z0-9_-]\+' '^--'
105 -j[1-9]*)
106 njobs="`echo $1 | sed -e 's/^-j//'`"
107 trailchars="`echo $njobs | sed -e 's/[0-9]\+\(.*\)$/\1/'`"
108 if test -n "$trailchars"
110 echo $1 trailing characters "'$trailchars'"
113 LKMM_JOBS="`echo $njobs | sed -e 's/^\([0-9]\+\).*$/\1/'`"
115 --jobs|--job|-j)
116 checkarg --jobs "(number)" "$#" "$2" '^[1-9][0-9]*$' '^--'
120 --procs|--proc)
121 checkarg --procs "(number)" "$#" "$2" '^[0-9]\+$' '^--'
125 --timeout)
126 checkarg --timeout "(timeout spec)" "$#" "$2" '^\([0-9]\+[smhd]\?\|\)$' '^--'
130 --)
135 echo Unknown argument $1
141 if test -z "$LKMM_TIMEOUT"
147 rm -rf $T