From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 516333858D28 for ; Sun, 5 Dec 2021 17:30:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 516333858D28 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 reform (deer0x00.wildebeest.org [172.31.17.130]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 0308F300071C; Sun, 5 Dec 2021 18:30:18 +0100 (CET) Received: by reform (Postfix, from userid 1000) id B817A2E8219C; Sun, 5 Dec 2021 18:30:17 +0100 (CET) Date: Sun, 5 Dec 2021 18:30:17 +0100 From: Mark Wielaard To: "Frank Ch. Eigler" , elfutils-devel@sourceware.org Subject: Re: PATCH: testsuite debuginfod Message-ID: References: <20210930145030.GC11484@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Sun, 05 Dec 2021 17:30:21 -0000 Hi Frank, On Tue, Oct 05, 2021 at 06:55:34PM +0200, Mark Wielaard wrote: > 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 > > > > debuginfod testsuite: Use ! CMD syntax. > > > > 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. > > > > 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? Have you looked into this? Is it something we can workaround? Or should we drop this idea for now? Thanks, Mark