From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 31D463858C31; Wed, 27 Mar 2024 13:58:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31D463858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711547910; bh=w8D/StC02Rzk8/xjfQ+RR6xiF5P8MwynOWUmJ7/adLE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jzpuMjYEIAxiLWMhH4A2Z8eRtqDLqREleMHoGyczwdnvUNS7CG74ztar519LHXtXC /Mv9U9mCBGjEQpch+TejlZcbRb1KANNfIynqipJ9Ql626/qq5oCHimtlBEvIoF/ukW 92j3tel7iRbe/vE83w6omQ7egZitJ54e3Xs4QS+o= From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: [Bug debuginfod/31562] profile.sh might fail with set -o pipefail Date: Wed, 27 Mar 2024 13:58:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: debuginfod X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: amerey at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31562 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Mark Wielaard --- commit 0ba2e4aa9945019a8c6db95d27d142b660a63a79 Author: Mark Wielaard Date: Tue Mar 26 21:42:39 2024 +0100 config: Make sure profile.sh succeeds with set -e and set -o pipefail profile.sh might fail with set -o pipefail because: cat /dev/null "${prefix}/etc/debuginfod"/*.urls 2>/dev/null | tr '\n' '= ' might fail when there isn't an *.urls file the first command in the pipe fails (the 2>/dev/null is there to hide that failure). This can be fixed by adding || : at the end. This works because : always succeeds and produces no outpur which is what the script expects when the command would fail. Also add a new testcase that runs profile.sh with bout set -e and set -o pipefail. * config/profile.sh.in: Add || : at end of pipe. * tests/run-debuginfod-client-profile.sh: New test. * tests/Makefile.am (TESTS): Add run-debuginfod-client-profile.= sh. (EXTRA_DIST): Likewise. https://sourceware.org/bugzilla/show_bug.cgi?id=3D31562 Signed-off-by: Mark Wielaard --=20 You are receiving this mail because: You are on the CC list for the bug.=