diff options
author | Christian Krieg <33391204+christian-krieg@users.noreply.github.com> | 2022-06-09 11:59:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 12:59:33 +0300 |
commit | 032619b82b6c9b882dc99c22bdab020a865489fa (patch) | |
tree | 53d695a20763186518c3bd2bcaf97e86c6845e7b /tests | |
parent | 6e1c3ff132ab99602e4e71c1ccaa5795b0d996e7 (diff) | |
download | redis-032619b82b6c9b882dc99c22bdab020a865489fa.tar.gz |
Fixing test to consider statically linked binaries (#10835)
The test calls `ldd` on `redis-server` in order to find out whether the binary
was linked against `libmusl`; However, `ldd` returns a value different from `0`
when statically linking the binaries agains libc-musl, because `redis-server` is
not a dynamic executable (as given by the exception thrown by the failing test),
and `make test` terminates with an error::
$ ldd src/redis-server
not a dynamic executable
$ echo $?
1
This commit fixes the test by ignoring such failures.
Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/logging.tcl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/integration/logging.tcl b/tests/integration/logging.tcl index ef74ef498..8617ed2fc 100644 --- a/tests/integration/logging.tcl +++ b/tests/integration/logging.tcl @@ -8,9 +8,12 @@ if {$system_name eq {darwin}} { set backtrace_supported 1 } elseif {$system_name eq {linux}} { # Avoid the test on libmusl, which does not support backtrace - set ldd [exec ldd src/redis-server] - if {![string match {*libc.*musl*} $ldd]} { - set backtrace_supported 1 + # and on static binaries (ldd exit code 1) where we can't detect libmusl + catch { + set ldd [exec ldd src/redis-server] + if {![string match {*libc.*musl*} $ldd]} { + set backtrace_supported 1 + } } } |