* [committed][testsuite] Fix handling of missing section in smaller-than.sh
@ 2021-04-07 4:16 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-04-07 4:16 UTC (permalink / raw)
To: dwz, jakub, mark
Hi,
On openSUSE Tumbleweed I run into:
...
Running testsuite/dwz.tests/dwz-tests.exp ...
testsuite/scripts/smaller-than.sh: line 18: 16#: \
invalid integer constant (error token is "16#")
...
FAIL: testsuite/dwz.tests/dwz.sh
...
The relevant line in smaller-than.sh is:
...
s=$(printf "%d" $((16#$s)))
...
This seems to be due bash (version 5.1.4), which gives:
...
$ echo $((16#))
bash: 16#: invalid integer constant (error token is "16#")
...
while bash on Leap 15.2 (version 4.4.23) gives:
...
$ echo $((16#))
0
...
Fix this by explicitly handling s == "" in proc section_size.
Committed to trunk.
Thanks,
- Tom
[testsuite] Fix handling of missing section in smaller-than.sh
2021-04-07 Tom de Vries <tdevries@suse.de>
PR dwz/27694
* testsuite/scripts/smaller-than.sh (section_size): Handle s == "".
---
testsuite/scripts/smaller-than.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/testsuite/scripts/smaller-than.sh b/testsuite/scripts/smaller-than.sh
index ab06e3a..3b452dc 100755
--- a/testsuite/scripts/smaller-than.sh
+++ b/testsuite/scripts/smaller-than.sh
@@ -14,6 +14,11 @@ section_size ()
| sed 's/.*\.debug_//' \
| awk '{print $5}')
+ if [ "$s" = "" ]; then
+ echo 0
+ return
+ fi
+
# Convert hex to decimal.
s=$(printf "%d" $((16#$s)))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-07 4:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 4:16 [committed][testsuite] Fix handling of missing section in smaller-than.sh Tom de Vries
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).