From patchwork Thu Mar 26 08:27:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11459593 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C804417EA for ; Thu, 26 Mar 2020 08:28:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A645B2078E for ; Thu, 26 Mar 2020 08:28:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WuJY6+F8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727702AbgCZI2R (ORCPT ); Thu, 26 Mar 2020 04:28:17 -0400 Received: from mail-qv1-f46.google.com ([209.85.219.46]:33623 "EHLO mail-qv1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727682AbgCZI2R (ORCPT ); Thu, 26 Mar 2020 04:28:17 -0400 Received: by mail-qv1-f46.google.com with SMTP id p19so2506853qve.0 for ; Thu, 26 Mar 2020 01:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=4jymsQpxanrvM7CdWabBQETlbYp4h+uHC9F0qbhN6ag=; b=WuJY6+F8IVmCLd5/Ffd7xClODXp12dBbURgKQXiP7Ak2M09AOmfjeijijlq74nM1PB TgiqCdHDCNg9sAtqSU3b5kVGmzq2prhcay+8ZdOo0JipZBoYPHpR9NPGIOHoTSEUOnx4 RSiVa5v7xmIGq1Cvppj/KcpsgCsExXs6OXLoo6L4g2X9LFR1gNZfoUTBJZqFmUWFkTrJ zJ6tIfUy0TRF3irkdzc2fQn9KDYyfidP5c70RQH2eQSuCsRjH615CLQ+uQB/x9GnSg/8 Jt0xTyPivxiQBZh/ZgemnbIGUeQZgT3xI4q5VIB3EAqr+iUzihjC1+VcZmJOX5ZZYRUh s1ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4jymsQpxanrvM7CdWabBQETlbYp4h+uHC9F0qbhN6ag=; b=BjZARNFjNvH8ivK4wtD//aLeB0s6ClhRpVu97IDcF8j7SJQJApvGfG1hfef3V+K31a +DQtJWffncWen8d/uqhTbKrTNclzKLZ5pWnai0HpnHaUwz04t7IL5GbmN3h4RE9VZUuL v3SPr7uhg9Rpw0SLtaV9SMqEGcST9QYGvg3v/nUKNFWTA3M7wbtRh/esZUyZTPStfKj7 09Zyjh0RGz+dSQplC6qJPjDcvlFNdsp36QZy5YKEbiYiskC8DzI3yyhLOIQfYNmCDssW hiOK9JyekwsUm2Hl6mPeNHpM4/jqVIXyWUYBZcPN+/TDnR+KlU25Rmbo0bxzJmqeAhfy qjuQ== X-Gm-Message-State: ANhLgQ3VmqH67HGZp33w5GbZvokv3JMML4kDensKxNgNo4YLV5GvUv32 Lp8Xw/r6mnHEd+NHtxKXiE1HKxuq X-Google-Smtp-Source: ADFU+vuvtniglwUq4Y1sfdjfe4tGBH61XCeZvLJtU3VHrLV86FujIsY/I970ySooE29g5/cveWvPhA== X-Received: by 2002:ad4:5a05:: with SMTP id ei5mr7106492qvb.127.1585211295959; Thu, 26 Mar 2020 01:28:15 -0700 (PDT) Received: from archbookpro.lan ([199.249.110.29]) by smtp.gmail.com with ESMTPSA id g187sm935789qkf.115.2020.03.26.01.28.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 01:28:15 -0700 (PDT) From: Denton Liu To: Git Mailing List Subject: [PATCH v2 1/8] t5512: don't use `test_must_fail test_cmp` Date: Thu, 26 Mar 2020 04:27:48 -0400 Message-Id: <3d7dc8428d1992d3bc2802f5c828e8d77fe4de3b.1585209554.git.liu.denton@gmail.com> X-Mailer: git-send-email 2.26.0.159.g23e2136ad0 In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The test_must_fail function should only be used for git commands since we should assume that external commands work sanely. Since test_cmp() just wraps an external command, replace `test_must_fail test_cmp` with `! test_cmp`. Signed-off-by: Denton Liu --- t/t5512-ls-remote.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh index 04b35402c7..08b98f12b8 100755 --- a/t/t5512-ls-remote.sh +++ b/t/t5512-ls-remote.sh @@ -92,7 +92,7 @@ test_expect_success 'use "origin" when no remote specified' ' test_expect_success 'suppress "From " with -q' ' git ls-remote -q 2>actual_err && - test_must_fail test_cmp exp_err actual_err + ! test_cmp exp_err actual_err ' test_expect_success 'use branch..remote if possible' '