From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ELxmGMqacl+EdAAA0tVLHw (envelope-from ) for ; Tue, 29 Sep 2020 02:24:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CLwdFMqacl+vQQAAB5/wlQ (envelope-from ) for ; Tue, 29 Sep 2020 02:24:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BF82D9400C7 for ; Tue, 29 Sep 2020 02:24:09 +0000 (UTC) Received: from localhost ([::1]:35164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kN5JI-0005pn-PE for larch@yhetil.org; Mon, 28 Sep 2020 22:24:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kN5JC-0005pP-4d for guix-patches@gnu.org; Mon, 28 Sep 2020 22:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kN5JB-0005ow-Rm for guix-patches@gnu.org; Mon, 28 Sep 2020 22:24:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kN5JB-0003dd-Oh for guix-patches@gnu.org; Mon, 28 Sep 2020 22:24:01 -0400 Subject: bug#43616: [PATCH] tests: Simplify shell exit status negation; Resent-From: Eric Bavier Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Tue, 29 Sep 2020 02:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 43616 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 43616-done@debbugs.gnu.org Mail-Followup-To: 43616@debbugs.gnu.org, bavier@posteo.net, bavier@posteo.net Received: via spool by 43616-done@debbugs.gnu.org id=D43616.160134622113956 (code D ref 43616); Tue, 29 Sep 2020 02:24:01 +0000 Received: (at 43616-done) by debbugs.gnu.org; 29 Sep 2020 02:23:41 +0000 Received: from localhost ([127.0.0.1]:54445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kN5Ir-0003d2-FB for submit@debbugs.gnu.org; Mon, 28 Sep 2020 22:23:41 -0400 Received: from mout02.posteo.de ([185.67.36.66]:49385) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kN5Io-0003ch-KX for 43616-done@debbugs.gnu.org; Mon, 28 Sep 2020 22:23:39 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 36AFD2400FB for <43616-done@debbugs.gnu.org>; Tue, 29 Sep 2020 04:23:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1601346212; bh=w22VNppcXOyiYeyB8fJusK0ah3mEMXMAQm0oxQid0Xc=; h=Subject:From:To:Cc:Date:From; b=YPEI3QkyuFJngEbLvTOs4Ur7z4WI9I67HOi8aurFgLBZL7OfeRDIzU11oPRu9r8mH 1jQiGIWWmDddchAHe+BTLO7Huclt5Y4JObmynLcDDv2uKfln9GB9yBhCfVXOCoBI6i CfPmdaIscIkHKjcx58PtlWC28W5TCDzEnmlGztDuV9eeS1lHJj/yebb0Ro4PmhJpNe cuF1ntOELKxolQW4gAv2ppXdYrUd8yEayuDSIYJYecS89vWwITZbc2G4ZTiNDo3jIu 3+KrEpi3JmzU6gdgycyc624JfahXSDkIfT8t0cvRl0YVxmwqfeVroBu28tDHHtYCGr OVbpOzVSU6hQw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4C0jqR0zs5z6tmF; Tue, 29 Sep 2020 04:23:30 +0200 (CEST) Message-ID: <525ad162f05ce43bda03a723f0faaf9385e93e77.camel@posteo.net> From: Eric Bavier Date: Mon, 28 Sep 2020 21:23:26 -0500 In-Reply-To: <87sgb4fdj3.fsf@gnu.org> References: <20200925180004.26836-1-bavier@posteo.net> <87sgb4fdj3.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=posteo.net header.s=2017 header.b=YPEI3Qky; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: 5KdBB2l42YXS On Sat, 2020-09-26 at 23:12 +0200, Ludovic Courtès wrote: > Hi Eric, > > bavier@posteo.net skribis: > > > From: Eric Bavier > > > > * tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix- > > build.sh, > > tests/guix-daemon.sh, tests/guix-download.sh, tests/guix- > > environment.sh, > > tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix- > > graph.sh, > > tests/guix-hash.sh, tests/guix-lint.sh, tests/guix-pack- > > relocatable.sh, > > tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix- > > package-net.sh, > > tests/guix-package.sh: Use the shell '!' keyword to negate command > > exit status > > in place of 'if ...; then false; else true; fi' > > [...] > > > -if guix archive something-that-does-not-exist > > -then false; else true; fi > > +! guix archive something-that-does-not-exist > > I have a vague recollection that I came to the conclusion that the > ‘if’ > was needed, but now I don’t see why. > > If you’re confident please go ahead! It’s never too late for me to > improve my shell knowledge. :-) I've used the same in other project test suites for a while now, and have successfully run Guix's tests with this patch several times. Pushed in d8934360d2453a403b5433e71d09188e4ed23b57 Thanks for the review, `~Eric