Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6111416imu; Mon, 21 Jan 2019 03:26:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN6cxvUctZeU4jklFElQdMwcmT+/9557EF594vDvY1V9D62/Ubp+uSVB9HcSbT2/2RCoJLB5 X-Received: by 2002:a62:8add:: with SMTP id o90mr29142899pfk.210.1548069998488; Mon, 21 Jan 2019 03:26:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548069998; cv=none; d=google.com; s=arc-20160816; b=ylojRl3SPWMOM/Bm3wzeOSImLkd+MIe5XhxYGE27oq7wpw5jBVYjN6oGTbTbZ5ogFK lKi5vkh5VfFygTpCnRRwq8f5iqTGUDRrJ/WPBslu/FskY0eBltZnIgdR5vV+mGM0riVO hmoTaQ/XVL4eBZy3jiy1VEiRdgQuVPXivSAOJQfVh049HprHxYtugfWli580Ub/KuBwA ihKFkfAA/ZJABKf82wVcmLOOs84oCfNj1b+GaKFm2XZp/TLhGtQTckggX/DJNUywzDad cstu4JG7I1wk40QI8zLTRqjeY2B4h2WKcMxK/5+sICrO4KV1A5ev5bMA5dGTZRE5OIwD LMcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=WKkaDADlyvlBzrCW6aMl3t8I/EIIn5v8pUSMz7KyIsc=; b=cC8xGElmK/1TAU2kLKr8TbRSG0Kz+VFUT+LSlzsTvXOpDwGJC7LFTJQ9FeIf6wBs+7 afhsSjtJ6ES2tUqTMDqKFmJ06ZkjhJAh5vAnygxCMCXu101xzBT7LdnZKCL3Gi9xDLE8 bIBUtLWBbPZpGoNzXWMQzUHKkDiHJN8WmMjn9LmnJyR5W+Fdm95HH9L/xLyi6RfKwA03 djPA1FJU0IVLwghpzjAPuCYBzz33ZTbuP2DtiEe4NvRf/r+8e6NlTjXMIzAQxoBbvSIb 4G2xUl3LSknZXGwaEk7b+hmuKjxnO/1SyUIpsxl1j52hkaJ8Rt9cHvfmQLP5ivDxRt/h uUNg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si12046060pfj.276.2019.01.21.03.26.22; Mon, 21 Jan 2019 03:26:38 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727976AbfAULZU (ORCPT + 99 others); Mon, 21 Jan 2019 06:25:20 -0500 Received: from terminus.zytor.com ([198.137.202.136]:44175 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727665AbfAULZU (ORCPT ); Mon, 21 Jan 2019 06:25:20 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x0LBP7qC2495659 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 21 Jan 2019 03:25:07 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x0LBP6p42495656; Mon, 21 Jan 2019 03:25:06 -0800 Date: Mon, 21 Jan 2019 03:25:06 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: "tip-bot for Paul E. McKenney" Message-ID: Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, stern@rowland.harvard.edu, hpa@zytor.com, torvalds@linux-foundation.org, peterz@infradead.org, paulmck@linux.vnet.ibm.com, tglx@linutronix.de Reply-To: peterz@infradead.org, tglx@linutronix.de, paulmck@linux.vnet.ibm.com, stern@rowland.harvard.edu, mingo@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, hpa@zytor.com In-Reply-To: <20181203230451.28921-3-paulmck@linux.ibm.com> References: <20181203230451.28921-3-paulmck@linux.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] tools/memory-model: Make scripts take "-j" abbreviation for "--jobs" Git-Commit-ID: 910cc9591d1433c2e26bd1c210844b09c699dd89 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 910cc9591d1433c2e26bd1c210844b09c699dd89 Gitweb: https://git.kernel.org/tip/910cc9591d1433c2e26bd1c210844b09c699dd89 Author: Paul E. McKenney AuthorDate: Mon, 3 Dec 2018 15:04:51 -0800 Committer: Ingo Molnar CommitDate: Mon, 21 Jan 2019 11:07:04 +0100 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 Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner 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 --- 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 100644 --- 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 ;;