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>
This commit is contained in:
parent
6e1c3ff132
commit
032619b82b
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user