From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 762CD383D02A for ; Thu, 13 May 2021 08:02:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 762CD383D02A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8150EAEBB for ; Thu, 13 May 2021 08:02:00 +0000 (UTC) Subject: Re: [PATCH] Fail if dwz fails. From: =?UTF-8?Q?Martin_Li=c5=a1ka?= To: debugedit@sourceware.org Cc: Tom de Vries References: <0c4f9c78-ee2b-fb6f-a0f9-20c3731bfa0e@suse.cz> Message-ID: Date: Thu, 13 May 2021 10:01:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <0c4f9c78-ee2b-fb6f-a0f9-20c3731bfa0e@suse.cz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: debugedit@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: debugedit development mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2021 08:02:02 -0000 PING^1 On 4/22/21 1:11 PM, Martin Liška wrote: > Right now, dwz return code is 0 or a small integer value (<= 3) > for situations like: > > - dwz: Too few files for multifile optimization > - dwz: Multi-file optimization not allowed for different pointer sizes or endianity > > These are not fatal errors and the script should continue. On the other > hand abort or segfault error values should cause failure of the script. > > Let's reserve values 1-16 for a recoverable dwz exit codes. > --- > scripts/find-debuginfo.sh | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh > index 3d736e0..7fb9b62 100755 > --- a/scripts/find-debuginfo.sh > +++ b/scripts/find-debuginfo.sh > @@ -556,6 +556,10 @@ if $run_dwz \ > && dwz_opts="${dwz_opts} -L ${dwz_max_die_limit}" > if type dwz >/dev/null 2>&1; then > ( cd "${RPM_BUILD_ROOT}/usr/lib/debug" && dwz $dwz_opts ${dwz_files[@]} ) > + if [ $? -gt 16 ]; then > + echo >&2 "*** ERROR: DWARF compression failed" > + exit 3 > + fi > else > echo >&2 "*** ERROR: DWARF compression requested, but no dwz installed" > exit 2 >