tools/memory-model: Fix scripting --jobs argument
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 27 Mar 2019 18:47:14 +0000 (11:47 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 24 Mar 2023 17:24:14 +0000 (10:24 -0700)
The parseargs.sh regular expression for the --jobs argument incorrectly
requires that the number of jobs be at least 10, that is, have at least
two digits.  This commit therefore adjusts this regular expression to
allow single-digit numbers of jobs to be specified.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/memory-model/scripts/parseargs.sh

index 5f016fc3f3af5dca6df8e7b5c8db0af418851806..25a81ac0dfdf46dbcce8b19d32f122f52f6a5214 100755 (executable)
@@ -113,7 +113,7 @@ do
                LKMM_JOBS="`echo $njobs | sed -e 's/^\([0-9]\+\).*$/\1/'`"
                ;;
        --jobs|--job|-j)
-               checkarg --jobs "(number)" "$#" "$2" '^[1-9][0-9]\+$' '^--'
+               checkarg --jobs "(number)" "$#" "$2" '^[1-9][0-9]*$' '^--'
                LKMM_JOBS="$2"
                shift
                ;;