From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 9BFD91F9E0 for ; Wed, 29 Apr 2020 22:13:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727768AbgD2WAi (ORCPT ); Wed, 29 Apr 2020 18:00:38 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:51649 "EHLO mail-wm1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726775AbgD2WAh (ORCPT ); Wed, 29 Apr 2020 18:00:37 -0400 Received: by mail-wm1-f48.google.com with SMTP id x4so3737040wmj.1 for ; Wed, 29 Apr 2020 15:00:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BuKwRhBtmGXof+hg/g/FrYAwJQpKD5rEWjrjAeRxKus=; b=mlzOv0uj6ZRIUv/AEn3EF+vEqlaX00zs36LweETFvo3Tk1DpGWI6zC66rtPF/04LM4 5vrunw+v+Sg7vv8fmT6COD1P7BNtUx8LQ2T4xdRdj3BzEdHx/tXGYET1Dkf9HhvgRdKV gs6D1Fks3yQQjaWHdPHWLRN4yPeiFz6aXJL+5bClSsRuD8FE99+Dfozb4PGeH9uEjUOq WNvzdQIXIL+mcQA8xLGAqmm5B7PJfuQXcP7GlHSC55cpovIPD4QgE5p01zfZYJS0GKC5 8gkidyf4B1enao3erCetOnDsp3SMCguD2kOqK3gWNIpN8Hl4HuM3+Hr63bpib9knvnXA UCFg== X-Gm-Message-State: AGi0PuaJkcvoTrspCZh0aY680g00eoYRd/TlJmNzMmZe/pnZBhHEeWJg aPjgyVCynCBYRTFPg3gbK5dwo9QQTOisvFFsVoo= X-Google-Smtp-Source: APiQypIhrQSFRrXki+bRZ80XF/UCkAycUfkgE2sZyrrHOCk2lMoGYjhxb7SJ+wb25g8DV11qLoQTtNPdPHMsbYd/o/U= X-Received: by 2002:a7b:c213:: with SMTP id x19mr5358948wmi.53.1588197634585; Wed, 29 Apr 2020 15:00:34 -0700 (PDT) MIME-Version: 1.0 References: <20200429195035.GB3920@syl.local> <90edb162-e035-bdb7-a2d2-ffc6bd075977@kdbg.org> In-Reply-To: From: Eric Sunshine Date: Wed, 29 Apr 2020 18:00:23 -0400 Message-ID: Subject: Re: Re* [PATCH 0/4] t: replace incorrect test_must_fail usage (part 5) To: Junio C Hamano Cc: Johannes Sixt , Taylor Blau , Denton Liu , Git Mailing List Content-Type: text/plain; charset="UTF-8" Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Wed, Apr 29, 2020 at 5:42 PM Junio C Hamano wrote: > Subject: [PATCH] t/README: document when not to use test_might_fail > > Signed-off-by: Junio C Hamano > --- > diff --git a/t/README b/t/README > @@ -875,7 +875,9 @@ library for your script to use. > - test_might_fail [] > > Similar to test_must_fail, but tolerate success, too. Use this > - instead of " || :" to catch failures due to segv. > + instead of " || :" to catch failures due to segv, > + but do use "{ || :; }" to ignore a failure from > + a command that is not git. This seems like a good addition and perhaps may help reduce reviewer burden (not that this comes up very often, but I've recommended it here and there when reviewing patches). Here's a possible alternate wording: Similar to test_must_fail, but tolerate success, too. Use this instead of " || :" to catch failures due to segv. To ignore failure of non-git commands, however, use "{ || :; }".