Skip to content

Commit e8e2574

Browse files
committed
Check for libbacktrace before checking for musl, so Alpine with libbacktrace returns 1 instead of 0
Signed-off-by: Hanxi Zhang <hanxizh@amazon.com>
1 parent da95b5b commit e8e2574

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tests/support/util.tcl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,15 @@ proc system_backtrace_supported {} {
12231223
return 0
12241224
}
12251225

1226-
# libmusl does not support backtrace. Also return 0 on
1226+
# Check if built with USE_LIBBACKTRACE (for musl/Alpine)
1227+
catch {
1228+
set buildinfo [exec grep -a "USE_LIBBACKTRACE" $::VALKEY_SERVER_BIN]
1229+
if {$buildinfo ne ""} {
1230+
return 1
1231+
}
1232+
}
1233+
1234+
# libmusl does not support backtrace natively. Also return 0 on
12271235
# static binaries (ldd exit code 1) where we can't detect libmusl
12281236
catch {
12291237
set ldd [exec ldd $::VALKEY_SERVER_BIN]

0 commit comments

Comments
 (0)