public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: debugedit@sourceware.org
Cc: Tom de Vries <tdevries@suse.de>
Subject: [PATCH] Fail if dwz fails.
Date: Thu, 22 Apr 2021 13:11:56 +0200	[thread overview]
Message-ID: <0c4f9c78-ee2b-fb6f-a0f9-20c3731bfa0e@suse.cz> (raw)

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
-- 
2.31.1


             reply	other threads:[~2021-04-22 11:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 11:11 Martin Liška [this message]
2021-05-13  8:01 ` Martin Liška
2021-05-13 14:07   ` Mark Wielaard
2021-05-14 10:46     ` Martin Liška
2021-05-16 20:14       ` Mark Wielaard
2021-05-17 10:06         ` Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c4f9c78-ee2b-fb6f-a0f9-20c3731bfa0e@suse.cz \
    --to=mliska@suse.cz \
    --cc=debugedit@sourceware.org \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).