authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-27 06:40:15+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-27 06:40:15+02:00
log11fbf78cb317e9a7a8fe4c8412f87a13d9982e26
treede6c53d4d3e3cd5e0f82300ccbc97127f781056c
parentc47c05386eab5982b0fb20aa58ab80e202e97393
parent19fd87fff19ef4325100446b439941536662de24

Merge pull request 'std: re-enable some tests on loongarch64 and s390x' (#32079) from alexrp/zig:reenable-tests into master

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/32079

4 files changed, 11 insertions(+), 26 deletions(-)

lib/std/crypto/ml_kem.zig-15
...@@ -1456,8 +1456,6 @@ fn randPolyNormalized(rnd: anytype) Poly {...@@ -1456,8 +1456,6 @@ fn randPolyNormalized(rnd: anytype) Poly {
1456}1456}
14571457
1458test "MulHat" {1458test "MulHat" {
1459 if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest;
1460
1461 var rnd = RndGen.init(0);1459 var rnd = RndGen.init(0);
14621460
1463 for (0..100) |_| {1461 for (0..100) |_| {
...@@ -1612,8 +1610,6 @@ test "Polynomial packing" {...@@ -1612,8 +1610,6 @@ test "Polynomial packing" {
1612}1610}
16131611
1614test "Test inner PKE" {1612test "Test inner PKE" {
1615 if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest;
1616
1617 var seed: [32]u8 = undefined;1613 var seed: [32]u8 = undefined;
1618 var pt: [32]u8 = undefined;1614 var pt: [32]u8 = undefined;
1619 for (&seed, &pt, 0..) |*s, *p, i| {1615 for (&seed, &pt, 0..) |*s, *p, i| {
...@@ -1635,8 +1631,6 @@ test "Test inner PKE" {...@@ -1635,8 +1631,6 @@ test "Test inner PKE" {
1635}1631}
16361632
1637test "Test happy flow" {1633test "Test happy flow" {
1638 if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest;
1639
1640 var seed: [64]u8 = undefined;1634 var seed: [64]u8 = undefined;
1641 for (&seed, 0..) |*s, i| {1635 for (&seed, 0..) |*s, i| {
1642 s.* = @as(u8, @intCast(i));1636 s.* = @as(u8, @intCast(i));
...@@ -1661,23 +1655,14 @@ test "Test happy flow" {...@@ -1661,23 +1655,14 @@ test "Test happy flow" {
1661// Code to test NIST Known Answer Tests (KAT), see PQCgenKAT.c.1655// Code to test NIST Known Answer Tests (KAT), see PQCgenKAT.c.
16621656
1663test "NIST KAT test d00.Kyber512" {1657test "NIST KAT test d00.Kyber512" {
1664 if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest;
1665 if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest;
1666
1667 try testNistKat(d00.Kyber512, "e9c2bd37133fcb40772f81559f14b1f58dccd1c816701be9ba6214d43baf4547");1658 try testNistKat(d00.Kyber512, "e9c2bd37133fcb40772f81559f14b1f58dccd1c816701be9ba6214d43baf4547");
1668}1659}
16691660
1670test "NIST KAT test d00.Kyber1024" {1661test "NIST KAT test d00.Kyber1024" {
1671 if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest;
1672 if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest;
1673
1674 try testNistKat(d00.Kyber1024, "89248f2f33f7f4f7051729111f3049c409a933ec904aedadf035f30fa5646cd5");1662 try testNistKat(d00.Kyber1024, "89248f2f33f7f4f7051729111f3049c409a933ec904aedadf035f30fa5646cd5");
1675}1663}
16761664
1677test "NIST KAT test d00.Kyber768" {1665test "NIST KAT test d00.Kyber768" {
1678 if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest;
1679 if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest;
1680
1681 try testNistKat(d00.Kyber768, "a1e122cad3c24bc51622e4c242d8b8acbcd3f618fee4220400605ca8f9ea02c2");1666 try testNistKat(d00.Kyber768, "a1e122cad3c24bc51622e4c242d8b8acbcd3f618fee4220400605ca8f9ea02c2");
1682}1667}
16831668
lib/std/http/test.zig+9-9
...@@ -34,7 +34,7 @@ test "content length reader state update" {...@@ -34,7 +34,7 @@ test "content length reader state update" {
34}34}
3535
36test "trailers" {36test "trailers" {
37 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/17187937 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194257
38 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/3080638 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806
3939
40 const io = std.testing.io;40 const io = std.testing.io;
...@@ -121,7 +121,7 @@ test "trailers" {...@@ -121,7 +121,7 @@ test "trailers" {
121}121}
122122
123test "HTTP server handles a chunked transfer coding request" {123test "HTTP server handles a chunked transfer coding request" {
124 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171879124 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194257
125 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806125 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806
126126
127 const io = std.testing.io;127 const io = std.testing.io;
...@@ -190,7 +190,7 @@ test "HTTP server handles a chunked transfer coding request" {...@@ -190,7 +190,7 @@ test "HTTP server handles a chunked transfer coding request" {
190}190}
191191
192test "echo content server" {192test "echo content server" {
193 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171879193 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194257
194 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806194 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806
195195
196 const io = std.testing.io;196 const io = std.testing.io;
...@@ -281,7 +281,7 @@ test "echo content server" {...@@ -281,7 +281,7 @@ test "echo content server" {
281}281}
282282
283test "Server.Request.respondStreaming non-chunked, unknown content-length" {283test "Server.Request.respondStreaming non-chunked, unknown content-length" {
284 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171879284 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194257
285 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806285 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806
286286
287 const io = std.testing.io;287 const io = std.testing.io;
...@@ -360,7 +360,7 @@ test "Server.Request.respondStreaming non-chunked, unknown content-length" {...@@ -360,7 +360,7 @@ test "Server.Request.respondStreaming non-chunked, unknown content-length" {
360}360}
361361
362test "receiving arbitrary http headers from the client" {362test "receiving arbitrary http headers from the client" {
363 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171879363 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194257
364 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806364 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806
365365
366 const io = std.testing.io;366 const io = std.testing.io;
...@@ -426,7 +426,7 @@ test "receiving arbitrary http headers from the client" {...@@ -426,7 +426,7 @@ test "receiving arbitrary http headers from the client" {
426}426}
427427
428test "general client/server API coverage" {428test "general client/server API coverage" {
429 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171879429 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194257
430 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806430 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806
431431
432 const io = std.testing.io;432 const io = std.testing.io;
...@@ -922,7 +922,7 @@ test "general client/server API coverage" {...@@ -922,7 +922,7 @@ test "general client/server API coverage" {
922}922}
923923
924test "Server streams both reading and writing" {924test "Server streams both reading and writing" {
925 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171879925 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194257
926 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806926 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806
927927
928 const io = std.testing.io;928 const io = std.testing.io;
...@@ -1192,7 +1192,7 @@ fn createTestServer(io: Io, S: type) !*TestServer {...@@ -1192,7 +1192,7 @@ fn createTestServer(io: Io, S: type) !*TestServer {
1192}1192}
11931193
1194test "redirect to different connection" {1194test "redirect to different connection" {
1195 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/1718791195 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194257
1196 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/308061196 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806
11971197
1198 const io = std.testing.io;1198 const io = std.testing.io;
...@@ -1280,7 +1280,7 @@ test "redirect to different connection" {...@@ -1280,7 +1280,7 @@ test "redirect to different connection" {
1280}1280}
12811281
1282test "boot failed connections from the pool" {1282test "boot failed connections from the pool" {
1283 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/1718791283 if (builtin.cpu.arch.isPowerPC64() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194257
1284 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/308061284 if (builtin.os.tag == .openbsd) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30806
12851285
1286 const io = std.testing.io;1286 const io = std.testing.io;
lib/std/math/modf.zig+1-1
...@@ -86,7 +86,7 @@ fn ModfTests(comptime T: type) type {...@@ -86,7 +86,7 @@ fn ModfTests(comptime T: type) type {
86 }86 }
87 test "vector" {87 test "vector" {
88 if (builtin.os.tag.isDarwin() and builtin.cpu.arch == .aarch64) return error.SkipZigTest;88 if (builtin.os.tag.isDarwin() and builtin.cpu.arch == .aarch64) return error.SkipZigTest;
89 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;89 if (builtin.cpu.arch == .s390x) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194256
9090
91 const widths = [_]comptime_int{ 1, 2, 3, 4, 8, 16 };91 const widths = [_]comptime_int{ 1, 2, 3, 4, 8, 16 };
9292
lib/std/zon/parse.zig+1-1
...@@ -3129,7 +3129,7 @@ test "std.zon free on error" {...@@ -3129,7 +3129,7 @@ test "std.zon free on error" {
31293129
3130test "std.zon vector" {3130test "std.zon vector" {
3131 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/153303131 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/15330
3132 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .s390x) return error.SkipZigTest; // github.com/ziglang/zig/issues/259573132 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .s390x) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/25957
31333133
3134 const gpa = std.testing.allocator;3134 const gpa = std.testing.allocator;
31353135