From dc5c8278474f998360bc48e3dd0fe9a2929b4374 Mon Sep 17 00:00:00 2001 From: mlugg Date: Mon, 3 Feb 2025 09:12:20 +0000 Subject: [PATCH] std.heap.GeneralPurposeAllocator: disable some tests on wasm32-wasi The ZON PR (#20271) is causing these tests to inexplicably fail. It doesn't seem like that PR is what's breaking GPA, so these tests are now disabled. This is tracked by #22731. --- lib/std/heap/general_purpose_allocator.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/std/heap/general_purpose_allocator.zig b/lib/std/heap/general_purpose_allocator.zig index 6f1adad8fb..c23f8dcd79 100644 --- a/lib/std/heap/general_purpose_allocator.zig +++ b/lib/std/heap/general_purpose_allocator.zig @@ -1235,6 +1235,8 @@ test "shrink large object to large object" { } test "shrink large object to large object with larger alignment" { + if (!builtin.link_libc and builtin.os.tag == .wasi) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22731 + var gpa = GeneralPurposeAllocator(test_config){}; defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); const allocator = gpa.allocator(); @@ -1307,6 +1309,8 @@ test "non-page-allocator backing allocator" { } test "realloc large object to larger alignment" { + if (!builtin.link_libc and builtin.os.tag == .wasi) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/22731 + var gpa = GeneralPurposeAllocator(test_config){}; defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); const allocator = gpa.allocator();