Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7899932imu; Mon, 3 Dec 2018 22:38:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/W2dHFLg3dgijacZ6cBFotmc5bZh7LQaVkMMFAydP0ADBBYfJMp7OckElV0iAscU4/IlrLi X-Received: by 2002:a63:d904:: with SMTP id r4mr15945256pgg.207.1543905497716; Mon, 03 Dec 2018 22:38:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543905497; cv=none; d=google.com; s=arc-20160816; b=JsQYSNxyeEHPA2BoF++otDaew9OVXZXW0Agsxw9CNa6g8NXno5k7HeBE/lHBZBmpoC li0G1iUC1SABF7gJ+M+nJH4EO1OuJY1CH2awpWcfOojUGFja/FdD1QYDt/1FKXVcc7b7 xhvv7kf0KhNRZguSWVVcAt8eN77+o84RtyqtFKicVCEFYZuNGVj0YiS67B1Lw9yGqIyZ XF/j/gefSPdas96/X1cGkYGCrrG2NUhNDXBjzzkg5hKqiUBDXbC098o18Z7uYrcxVRFu Y5SjbuKr6t9n4FDpCQSGXachA7uX6OHRDxOSx3cf5Vh84OMKWqj1vXDRb/vEsDjv8zqW 5Icw== 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=dWaeJghJQMqyIuHe0gtaGrNKWVUm6jMdJ63kEQqjnY8=; b=HK7XQVzxhIojEUoWxw+9z0J1CMSdsyZfupDZqY7xZUXYVpsgTtTHJAutHtFYqFHYJZ BbcU9UlVjFA5Hff/g58O+MbXkwRgrLdJlDICkAkezrIJfGeOE24PP7Nm3rZi9N+K/RVX AUXEM9ihTxLn7SNZ01U6XbqAoX7Lm6z08NhHHOBYQU+4RDGyfU1Ok1H8BWxrztCDhLlY z5FTv7HagAdynxRQlSfXB4eOJtM82vyDD2rEbzuMzmqzYj3RjQf1uUKdSl8yDddINocO pQZumSu2UPizFEtb1bj5ds30RhGhkmMvKNDRXHGRllvM6K4bYWZK4qJa5MEQvl3KRslp Pv+w== 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 t4si13326911pgg.110.2018.12.03.22.38.02; Mon, 03 Dec 2018 22:38:17 -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 S1726111AbeLDGfb (ORCPT + 99 others); Tue, 4 Dec 2018 01:35:31 -0500 Received: from terminus.zytor.com ([198.137.202.136]:52333 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbeLDGfa (ORCPT ); Tue, 4 Dec 2018 01:35:30 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wB46Z9lG757691 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 3 Dec 2018 22:35:09 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wB46Z9Mf757684; Mon, 3 Dec 2018 22:35:09 -0800 Date: Mon, 3 Dec 2018 22:35:09 -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: torvalds@linux-foundation.org, stern@rowland.harvard.edu, linux-kernel@vger.kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, paulmck@linux.vnet.ibm.com Reply-To: mingo@kernel.org, hpa@zytor.com, paulmck@linux.vnet.ibm.com, peterz@infradead.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, stern@rowland.harvard.edu 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: a6f1de04276d036b61c4d1dbd0367e6b430d8783 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=-0.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=no 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: a6f1de04276d036b61c4d1dbd0367e6b430d8783 Gitweb: https://git.kernel.org/tip/a6f1de04276d036b61c4d1dbd0367e6b430d8783 Author: Paul E. McKenney AuthorDate: Mon, 3 Dec 2018 15:04:51 -0800 Committer: Ingo Molnar CommitDate: Tue, 4 Dec 2018 07:29:52 +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 ;;