From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.connected.by.freedominter.net [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 7E01B385840B for ; Tue, 5 Oct 2021 16:55:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7E01B385840B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id ED33930007DF; Tue, 5 Oct 2021 18:55:36 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 6E591413CEBD; Tue, 5 Oct 2021 18:55:34 +0200 (CEST) Message-ID: Subject: Re: PATCH: testsuite debuginfod From: Mark Wielaard To: "Frank Ch. Eigler" , elfutils-devel@sourceware.org Date: Tue, 05 Oct 2021 18:55:34 +0200 In-Reply-To: <20210930145030.GC11484@redhat.com> References: <20210930145030.GC11484@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2021 16:55:39 -0000 Hi Frank, On Thu, 2021-09-30 at 10:50 -0400, Frank Ch. Eigler via Elfutils-devel wrote: > commit 85602ff68179053f19a2005df4fc653a69757584 (HEAD -> master) > Author: Frank Ch. Eigler > Date: Thu Sep 30 10:48:00 2021 -0400 >=20 > debuginfod testsuite: Use ! CMD syntax. > =20 > Previously, we had a mishmash of iffy && || constructs to > reverse the rc of a subprocess that we expected to fail. > Now use > ! CMD > or > ! (CMD | CMD) > more systematically where possible. > =20 > Signed-off-by: Frank Ch. Eigler Thanks, the && || conditionals do make my head hurt (I am not as logical as I like). This looks much simpler. I wish we can use this. But we use -e to make any failing command (pipeline) fail the script/test. And man bash says (under -e Exit immediately): The shell does not exit if the command that fails is part of the command list immediately following a while or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except the command following the final && or ||, any command in a pipeline but the last, or if the command's return value is being inverted with !. So I am afraid any '! should_fail_but_does_not' will not actually exit and so doesn't FAIL the test. Could you double check that? Thanks, Mark