Unverified Commit 032619b8 authored by Christian Krieg's avatar Christian Krieg Committed by GitHub
Browse files

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: default avatarYossi Gottlieb <yossigo@gmail.com>
parent 6e1c3ff1
...@@ -8,9 +8,12 @@ if {$system_name eq {darwin}} { ...@@ -8,9 +8,12 @@ if {$system_name eq {darwin}} {
set backtrace_supported 1 set backtrace_supported 1
} elseif {$system_name eq {linux}} { } elseif {$system_name eq {linux}} {
# Avoid the test on libmusl, which does not support backtrace # Avoid the test on libmusl, which does not support backtrace
set ldd [exec ldd src/redis-server] # and on static binaries (ldd exit code 1) where we can't detect libmusl
if {![string match {*libc.*musl*} $ldd]} { catch {
set backtrace_supported 1 set ldd [exec ldd src/redis-server]
if {![string match {*libc.*musl*} $ldd]} {
set backtrace_supported 1
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment