[Bug debugedit/32321] New: Bashisms in test suite (5.1 release)
mgorny at gentoo dot org
sourceware-bugzilla@sourceware.org
Tue Oct 29 16:52:13 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=32321
Bug ID: 32321
Summary: Bashisms in test suite (5.1 release)
Product: debugedit
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: debugedit
Assignee: unassigned at sourceware dot org
Reporter: mgorny at gentoo dot org
CC: debugedit at sourceware dot org
Target Milestone: ---
When running the test suite of debugedit 5.1 release, I'm getting the following
failure (from testsuite.log):
```
## ---------------------- ##
## Detailed failed tests. ##
## ---------------------- ##
# -*- compilation -*-
35. debugedit.at:888: testing debugedit build-id recompute ...
./debugedit.at:894: $READELF -n main | grep Build.ID: | awk '{print $3}'
stderr:
stdout:
a36cda9a8297933830fbdc93cd5ac7a971d9ea10
./debugedit.at:896: expr "$bid" : '[0-9a-f]*'
stdout:
40
./debugedit.at:899: debugedit -i -s deadbeef main
stdout:
af3fd78b4368fd3ca887b5898fce7e7b71d9ea10
./debugedit.at:901: expr "$bid2a" : '[0-9a-f]*'
stdout:
40
./debugedit.at:902: test "$bid" != "$bid2a"
./debugedit.at:905: $READELF -n main | grep Build.ID: | awk '{print $3}'
stderr:
stdout:
af3fd78b4368fd3ca887b5898fce7e7b71d9ea10
./debugedit.at:907: expr "$bid2b" : '[0-9a-f]*'
stdout:
40
./debugedit.at:908: test "$bid2a" == "$bid2b"
--- /dev/null 2024-10-29 06:16:10.049924004 +0100
+++
/tmp/portage/dev-util/debugedit-5.1/work/debugedit-5.1/tests/testsuite.dir/at-groups/35/stderr
2024-10-29 17:46:02.610089180 +0100
@@ -0,0 +1 @@
+./testsuite: 114: test: af3fd78b4368fd3ca887b5898fce7e7b71d9ea10: unexpected
operator
./debugedit.at:908: exit code was 2, expected 0
35. debugedit.at:888: 35. debugedit build-id recompute (debugedit.at:888):
FAILED (debugedit.at:908)
```
The problem is that "==" test operator is a bashism, and doesn't work in
non-bash shells.
I can confirm that replacing '==' with '=' fixes the test, i.e.:
sed -i -e '/test/s:==:=:' tests/debugedit.at
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Debugedit
mailing list