authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-17 09:20:14+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-18 12:42:24+02:00
logabd73083e423fa1422aa64575e357b85c17a5101
tree83d203c4e6b3ef62d506d891500ced286190225b
parente06bcd74c3d7287dfb458130cde0c72c7ef97698
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

test: skip dumpCurrentStackTrace test on architectures with no unwind support


2 files changed, 12 insertions(+), 0 deletions(-)

test/src/StackTrace.zig+2
...@@ -15,6 +15,7 @@ const Config = struct {...@@ -15,6 +15,7 @@ const Config = struct {
1515
16 const PerMode = struct {16 const PerMode = struct {
17 expect: []const u8,17 expect: []const u8,
18 exclude_arch: []const std.Target.Cpu.Arch = &.{},
18 exclude_os: []const std.Target.Os.Tag = &.{},19 exclude_os: []const std.Target.Os.Tag = &.{},
19 error_tracing: ?bool = null,20 error_tracing: ?bool = null,
20 };21 };
...@@ -59,6 +60,7 @@ fn addExpect(...@@ -59,6 +60,7 @@ fn addExpect(
59 use_llvm: bool,60 use_llvm: bool,
60 mode_config: Config.PerMode,61 mode_config: Config.PerMode,
61) void {62) void {
63 for (mode_config.exclude_arch) |tag| if (tag == builtin.cpu.arch) return;
62 for (mode_config.exclude_os) |tag| if (tag == builtin.os.tag) return;64 for (mode_config.exclude_os) |tag| if (tag == builtin.os.tag) return;
6365
64 const b = self.b;66 const b = self.b;
test/stack_traces.zig+10
...@@ -792,6 +792,16 @@ pub fn addCases(cases: *tests.StackTracesContext) void {...@@ -792,6 +792,16 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
792 \\}792 \\}
793 ,793 ,
794 .Debug = .{794 .Debug = .{
795 // std.debug.sys_can_stack_trace
796 .exclude_arch = &.{
797 .loongarch32,
798 .loongarch64,
799 .mips,
800 .mipsel,
801 .mips64,
802 .mips64el,
803 .s390x,
804 },
795 .exclude_os = &.{805 .exclude_os = &.{
796 .openbsd, // integer overflow806 .openbsd, // integer overflow
797 .windows, // TODO intermittent failures807 .windows, // TODO intermittent failures