Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp70357imm; Wed, 29 Aug 2018 14:13:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZuld32gecQDzrHQZBJIkK/FAOfG/U3Dvci8X4jClfdvlj+366UC+IWeHdbaQ5GMMnjCEks X-Received: by 2002:a63:4c07:: with SMTP id z7-v6mr7249657pga.312.1535577182681; Wed, 29 Aug 2018 14:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535577182; cv=none; d=google.com; s=arc-20160816; b=DZ767mchD7O7d2O+wTIZAA55hFYOdshvlVJDgN9CfFBhLYk1U/e1Q3CxBAYTiMZF15 7q59lP/n05DWKGddFpHj80RGcfXQSt4dP+twAWyN/ZPiSWevuXpCCMtD+9URdQbK1NPH 1N005Bwp72pAeSSrPXZJLKNTR2C4Ww7RQ45Zq1SFAnJqQKS3a+TA7KkSYkmTmF5xpkVx eU1EuWM30CTAq8L0L89WWW+GqA/Jp+5y5LZps1I03NYYOF1zPS98yQPmt2czXs1DftTK QKQJzVZQ1gHIku20JdrUJ5dZSNc2B9BtIXqyy3Osl89IlUTr/BMBdQTNJx/ut0Trqsdr b9Pw== 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:arc-authentication-results; bh=hoOQZ0Ria4xnRLyj3VFvFgF6J7bylQZ/QBwx2tbx7PQ=; b=EFZByWFSpgrBuxX2UJOZxx9DAC/JhvWFe7Bn7iLve0U5yZ7RAt+q/jQvdmLF9VZ7a7 qbDsIjK8bn9ZtjB02aJ5pzWDDaRCg1xQVR4jcWzA7j+di70IRad1iHtG24o0o5prNCHm oAi9RRf/Ve8gPVilvF/NN7GnsPdsupF1KA5xx3Q8bOn4uWUg87kidWAKsLqb/ZnNqt/y p7B1XG2fC2h7nB4EiGw90Szz9+YlvXDSxVsfgjrjdYYLVw3NvpG2ZJ0KYUTDGSOnWdcy MRW29CG//XYqOL5+ksAawcDhtT3whVjvg6sN/Iszz6U9ECtGK0vR4quAlzoY+IMtx7g3 Lkyg== 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 k11-v6si4596459pgi.328.2018.08.29.14.12.48; Wed, 29 Aug 2018 14:13:02 -0700 (PDT) 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 S1729106AbeH3BJp (ORCPT + 99 others); Wed, 29 Aug 2018 21:09:45 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38238 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728883AbeH3BJo (ORCPT ); Wed, 29 Aug 2018 21:09:44 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7TL97Qp031792 for ; Wed, 29 Aug 2018 17:11:03 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2m5y0ej812-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 29 Aug 2018 17:11:02 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Aug 2018 17:11:01 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 29 Aug 2018 17:10:57 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7TLAukj24510570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 29 Aug 2018 21:10:56 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 74A2CB205F; Wed, 29 Aug 2018 17:09:52 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5700EB206C; Wed, 29 Aug 2018 17:09:52 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.159]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 29 Aug 2018 17:09:52 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 5A7E316C025C; Wed, 29 Aug 2018 14:10:56 -0700 (PDT) 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 RFC LKMM 6/7] EXP tools/memory-model: Make scripts take "-j" abbreviation for "--jobs" Date: Wed, 29 Aug 2018 14:10:52 -0700 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829211018.GA19646@linux.vnet.ibm.com> References: <20180829211018.GA19646@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18082921-0060-0000-0000-000002A65C1A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009636; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01080715; UDB=6.00557480; IPR=6.00860700; MB=3.00023001; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-29 21:11:00 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18082921-0061-0000-0000-000046558D73 Message-Id: <20180829211053.20531-6-paulmck@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-29_04:,, 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-1807170000 definitions=main-1808290206 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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