From patchwork Sun Mar 3 14:44:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 10837047 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6BF331390 for ; Sun, 3 Mar 2019 14:45:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A28D29EB5 for ; Sun, 3 Mar 2019 14:45:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E59929EBB; Sun, 3 Mar 2019 14:45:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E19D429EB5 for ; Sun, 3 Mar 2019 14:45:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726338AbfCCOo7 (ORCPT ); Sun, 3 Mar 2019 09:44:59 -0500 Received: from mail-ed1-f43.google.com ([209.85.208.43]:42459 "EHLO mail-ed1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726217AbfCCOo6 (ORCPT ); Sun, 3 Mar 2019 09:44:58 -0500 Received: by mail-ed1-f43.google.com with SMTP id j89so2122734edb.9 for ; Sun, 03 Mar 2019 06:44:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=/JId50HUn/LvrL2rTAb2NpNI3oTuO9EqUM8/UESUYdg=; b=LNrzEv5KhgReBYTZOdmHTusnAnRhO9nWo0bH24RZAHwXEw6SlJ6LHfsoDxraHFChIW V51Db2KblYvlXSk2mrURa+3/Ctl9Be8GoVA6G/9gY1CpxFBQaCSzCdH+y13877VzLzBF sjHJMG8Y8AjJf1BWXNoVJSs7bZznlMwhkh4yG3ZOc4TepH1PTNEu7b6hnDYiK1+WYsDF UZw28bk6EUdKLMtUY1rJrkKQdUrQoidkjjYd9eH5OknBj2KxXVB9soUbwYPOANAirU83 xsxoZ7a0iuxSyHnMx3TRnhgLDy6MueFKlg6LmaFgmfYzxmQdeypz8fHt88pJLPHYdREV EaHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=/JId50HUn/LvrL2rTAb2NpNI3oTuO9EqUM8/UESUYdg=; b=PNzzDgZ/vVj7lvIwjJIrNDl2ouhKdL/w8T7z9lugiIBKUi8ubTQyakzlNvDoRbsYSd t1cBI63vcyYNaNerMHXgzH0WPiJCTjYhGsDLu0tIZ8JS8eROA2aZF8fxpi5vYwkJuOmd lZBJw+j4sXHQrqlmLz/9SqQ/q6F29Cx4ZZ9ZqwMjgKzwzYgJV5GWvfH2u911vHcVDQan rSP6Dw1wgZiTwOgFaD67RKYiKTijLA27MSdqRyhhccG4OUIEyApDggMNLj0BqesN9Y3h foAx8S5VdFuQh7s3CKos5cQ/w9/3hhiWjnHyUqNyykPppgBklNXCImSR9r2Qjld6uzr9 NmBw== X-Gm-Message-State: APjAAAWUzfSgVIVpqkedHlKGf+ul4WkJNayzdpWW0sGHBoi5EGuAl4zQ 2drdh6waiyckHi+WTS72RfPp+J0M X-Google-Smtp-Source: APXvYqzIiHvd87UBzzbjuzgl44hwgbpB3Bf/5rZCjBeOTzQ/SOMopU6QscGKZoG+IfrlACjXlSzK2w== X-Received: by 2002:a50:baab:: with SMTP id x40mr11620945ede.244.1551624296169; Sun, 03 Mar 2019 06:44:56 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 31sm1265250edr.7.2019.03.03.06.44.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Mar 2019 06:44:55 -0800 (PST) Date: Sun, 03 Mar 2019 06:44:55 -0800 (PST) X-Google-Original-Date: Sun, 03 Mar 2019 14:44:53 GMT Message-Id: <074628c22b2df82280b06db604196f25300e8f87.1551624293.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH v2 2/2] tests: introduce --stress-jobs= Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Schindelin The --stress option currently accepts an argument, but it is confusing to at least this user that the argument does not define the maximal number of stress iterations, but instead the number of jobs to run in parallel per stress iteration. Let's introduce a separate option for that, whose name makes it more obvious what it is about, and let --stress= error out with a helpful suggestion about the two options tha could possibly have been meant. Signed-off-by: Johannes Schindelin --- t/README | 6 ++++-- t/test-lib.sh | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/t/README b/t/README index b61bc930c4..a496be56ef 100644 --- a/t/README +++ b/t/README @@ -187,11 +187,10 @@ appropriately before running "make". variable to "1" or "0", respectively. --stress:: ---stress=:: Run the test script repeatedly in multiple parallel jobs until one of them fails. Useful for reproducing rare failures in flaky tests. The number of parallel jobs is, in order of - precedence: , or the value of the GIT_TEST_STRESS_LOAD + precedence: the value of the GIT_TEST_STRESS_LOAD environment variable, or twice the number of available processors (as shown by the 'getconf' utility), or 8. Implies `--verbose -x --immediate` to get the most information @@ -202,6 +201,9 @@ appropriately before running "make". '.stress-' suffix, and the trash directory of the failed test job is renamed to end with a '.stress-failed' suffix. +--stress-jobs=:: + Override the number of parallel jobs. Implies `--stress`. + --stress-limit=:: When combined with --stress run the test script repeatedly this many times in each of the parallel jobs or until one of diff --git a/t/test-lib.sh b/t/test-lib.sh index ab7f27ec6a..6e557982a2 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -142,10 +142,16 @@ do --stress) stress=t ;; --stress=*) + echo "error: --stress does not accept an argument: '$opt'" >&2 + echo "did you mean --stress-jobs=${opt#*=} or --stress-limit=${opt#*=}?" >&2 + exit 1 + ;; + --stress-jobs=*) + stress=t; stress=${opt#--*=} case "$stress" in *[!0-9]*|0*|"") - echo "error: --stress= requires the number of jobs to run" >&2 + echo "error: --stress-jobs= requires the number of jobs to run" >&2 exit 1 ;; *) # Good.