From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed][testsuite] Fix tcl error in dwz-tests.exp
Date: Tue, 9 Feb 2021 23:41:31 +0100 [thread overview]
Message-ID: <20210209224130.GA4827@delia> (raw)
Hi,
When running:
...
$ make check CC="clang -gdwarf-5"
...
I run into:
...
ERROR: tcl error sourcing testsuite/dwz.tests/dwz-tests.exp.
ERROR: 2
readelf: Warning: DIE at offset 0xe6 refers to abbreviation number 8 \
which does not exist while executing
"exec readelf -wi min | grep DW_AT_name | grep -c / "
...
Fix this by wrapping the exec in a catch.
Committed to trunk.
Thanks,
- Tom
[testsuite] Fix tcl error in dwz-tests.exp
2021-02-09 Tom de Vries <tdevries@suse.de>
* testsuite/dwz.tests/dwz-tests.exp: Wrap "exec readelf" in catch.
---
testsuite/dwz.tests/dwz-tests.exp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/testsuite/dwz.tests/dwz-tests.exp b/testsuite/dwz.tests/dwz-tests.exp
index 2e5d19a..48c0015 100644
--- a/testsuite/dwz.tests/dwz-tests.exp
+++ b/testsuite/dwz.tests/dwz-tests.exp
@@ -24,11 +24,16 @@ foreach test $tests {
lappend required_execs "py-section-script"
}
if { $basename == "pr24341.sh" } {
- # The exec min is used for the regression test for pr24341, but it only
- # functions as such if the DWARF only contains the CUs of the test-case
- # itself.
- set matches [exec readelf -wi min | grep DW_AT_name | grep -c / ]
+ if { [catch {exec readelf -wi min | grep DW_AT_name | grep -c / } matches] } {
+ # Some error occurred in the supported test, f.i. DWARF in min
+ # unsupported by readelf.
+ unsupported "$test"
+ continue
+ }
if { $matches != 2 } {
+ # The exec min is used for the regression test for pr24341, but it
+ # only functions as such if the DWARF only contains the CUs of the
+ # test-case itself.
unsupported "$test"
continue
}
reply other threads:[~2021-02-09 22:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210209224130.GA4827@delia \
--to=tdevries@suse.de \
--cc=dwz@sourceware.org \
--cc=jakub@redhat.com \
/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).