From abd73083e423fa1422aa64575e357b85c17a5101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 17 Sep 2025 09:20:14 +0200 Subject: [PATCH] test: skip dumpCurrentStackTrace test on architectures with no unwind support --- test/src/StackTrace.zig | 2 ++ test/stack_traces.zig | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/test/src/StackTrace.zig b/test/src/StackTrace.zig index d956e27cd7..061df37e3a 100644 --- a/test/src/StackTrace.zig +++ b/test/src/StackTrace.zig @@ -15,6 +15,7 @@ const Config = struct { const PerMode = struct { expect: []const u8, + exclude_arch: []const std.Target.Cpu.Arch = &.{}, exclude_os: []const std.Target.Os.Tag = &.{}, error_tracing: ?bool = null, }; @@ -59,6 +60,7 @@ fn addExpect( use_llvm: bool, mode_config: Config.PerMode, ) void { + for (mode_config.exclude_arch) |tag| if (tag == builtin.cpu.arch) return; for (mode_config.exclude_os) |tag| if (tag == builtin.os.tag) return; const b = self.b; diff --git a/test/stack_traces.zig b/test/stack_traces.zig index 40a6168297..9e815e032f 100644 --- a/test/stack_traces.zig +++ b/test/stack_traces.zig @@ -792,6 +792,16 @@ pub fn addCases(cases: *tests.StackTracesContext) void { \\} , .Debug = .{ + // std.debug.sys_can_stack_trace + .exclude_arch = &.{ + .loongarch32, + .loongarch64, + .mips, + .mipsel, + .mips64, + .mips64el, + .s390x, + }, .exclude_os = &.{ .openbsd, // integer overflow .windows, // TODO intermittent failures