Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7557683imu; Mon, 3 Dec 2018 15:05:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/VXQENvJM4th8nO6ZYAg4LXnrcwG6aeKSRoSKI5B7GxruqmA7YL6jKjBulBwYhP+AktyxSN X-Received: by 2002:a63:eb52:: with SMTP id b18mr14493146pgk.213.1543878359000; Mon, 03 Dec 2018 15:05:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543878358; cv=none; d=google.com; s=arc-20160816; b=ZqL5+iBnq8HJUKW5xuxHmuNlD2xwSoZ1wvCYt4ZQitTJI3SXfvuje07C2n3xTHiy57 muuegOOE/CkRqUgcTSLvk8yMGcwEL5AxU0lWIVgdCx2mClrU/85gr7xhAbO43fV9K8h8 xE6TD8p64Af2s74+xLSYETdGBC1zeie/qlSfVSk3511S4k5dhCV8cMcN1ZQ5a2zxggjW in4n2ih5GfG9sP1RIzOaG6soJg2baLP2zKIFUWsX2uFKyMs8upKPWbvssmkhDEymtwRm aR+qWunWhdo4jBPJbK0csUo/ijBTDviuiT79Py2F7vyHqAmWRqaT82lWBxPZK+WCd/cm YHDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from; bh=LNiJWqTOLGVYy10irzeqOp7RBk5cGlSfDoCtZ5Uuqjw=; b=0JxNuZir/KpirwtUoAHOv/mrU2PCGhtFUC3FtPxgJIrqpIN2+Oex4AcfZATp4pDpzS uRwfkX7HjPimZf/+qOYgUGlyARaM5EEyWDDVrR48+HiY4z3cRNl0vs95qGgoCcRG0j+b ycrsatNj7pL2aiVadIbC8D+f5jGzU+p6mvLe0CGGuMJhMnR3h+rLNW9M8rPJ9ZFB1jyW lIYxCvBzF/RsEP8EUXDA0izJNV4aNrR+3VjU35dDzvG9SlwX0XCPA3DPrK6GFH5t0Rly klh+tGng+kG6CGaaTLvA3ii9SklEsogHMiuG8NIFAL+7Jg2h1Trv6u/WYanJiLlsJkVE Oksw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w185si16437569pfw.122.2018.12.03.15.05.43; Mon, 03 Dec 2018 15:05:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725981AbeLCXFB (ORCPT + 99 others); Mon, 3 Dec 2018 18:05:01 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39436 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725961AbeLCXE7 (ORCPT ); Mon, 3 Dec 2018 18:04:59 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wB3N4i7j029628 for ; Mon, 3 Dec 2018 18:04:58 -0500 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p5c0n4bp8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 03 Dec 2018 18:04:58 -0500 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Dec 2018 23:04:56 -0000 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 3 Dec 2018 23:04:51 -0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wB3N4oXh13893828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Dec 2018 23:04:50 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A4E77B206E; Mon, 3 Dec 2018 23:04:50 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8479BB206C; Mon, 3 Dec 2018 23:04:50 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.38]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 3 Dec 2018 23:04:50 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 92CC216C3238; Mon, 3 Dec 2018 15:04:53 -0800 (PST) From: "Paul E. McKenney" 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" 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 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181203230411.GA27476@linux.ibm.com> References: <20181203230411.GA27476@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18120323-0068-0000-0000-0000036B70C0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010166; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01126571; UDB=6.00585088; IPR=6.00906705; MB=3.00024430; MTD=3.00000008; XFM=3.00000015; UTC=2018-12-03 23:04:55 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18120323-0069-0000-0000-000046A458EB Message-Id: <20181203230451.28921-3-paulmck@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-03_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812030206 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Paul E. McKenney" 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 Signed-off-by: Paul E. McKenney --- 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