Commit dc5c827847

mlugg <mlugg@mlugg.co.uk>
2025-02-03 10:12:20
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.
1 parent 13c6eb0
Changed files (1)
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();