From fc56124fac85355124723e369d466adaa4b6ce55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sun, 26 Apr 2026 08:47:02 +0200 Subject: [PATCH] std: re-enable some tests on s390x closes https://github.com/ziglang/zig/issues/25957 --- lib/std/crypto/ml_kem.zig | 9 --------- lib/std/math/modf.zig | 2 +- lib/std/zon/parse.zig | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/std/crypto/ml_kem.zig b/lib/std/crypto/ml_kem.zig index ea75d6ec8f24f2b2e282074498630281521520ee..16f0e3071023fb1c1880b08e793308778bb0ed6c 100644 --- a/lib/std/crypto/ml_kem.zig +++ b/lib/std/crypto/ml_kem.zig @@ -1456,8 +1456,6 @@ fn randPolyNormalized(rnd: anytype) Poly { } test "MulHat" { - if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest; - var rnd = RndGen.init(0); for (0..100) |_| { @@ -1612,8 +1610,6 @@ test "Polynomial packing" { } test "Test inner PKE" { - if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest; - var seed: [32]u8 = undefined; var pt: [32]u8 = undefined; for (&seed, &pt, 0..) |*s, *p, i| { @@ -1635,8 +1631,6 @@ test "Test inner PKE" { } test "Test happy flow" { - if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest; - var seed: [64]u8 = undefined; for (&seed, 0..) |*s, i| { s.* = @as(u8, @intCast(i)); @@ -1662,21 +1656,18 @@ test "Test happy flow" { test "NIST KAT test d00.Kyber512" { if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest; - if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest; try testNistKat(d00.Kyber512, "e9c2bd37133fcb40772f81559f14b1f58dccd1c816701be9ba6214d43baf4547"); } test "NIST KAT test d00.Kyber1024" { if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest; - if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest; try testNistKat(d00.Kyber1024, "89248f2f33f7f4f7051729111f3049c409a933ec904aedadf035f30fa5646cd5"); } test "NIST KAT test d00.Kyber768" { if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest; - if (comptime builtin.cpu.has(.s390x, .vector)) return error.SkipZigTest; try testNistKat(d00.Kyber768, "a1e122cad3c24bc51622e4c242d8b8acbcd3f618fee4220400605ca8f9ea02c2"); } diff --git a/lib/std/math/modf.zig b/lib/std/math/modf.zig index 00ca26b01f39da42aac72d6dc1938a07936dd495..15515cde204a727d0191db34ace8adc68feb39e3 100644 --- a/lib/std/math/modf.zig +++ b/lib/std/math/modf.zig @@ -86,7 +86,7 @@ fn ModfTests(comptime T: type) type { } test "vector" { if (builtin.os.tag.isDarwin() and builtin.cpu.arch == .aarch64) return error.SkipZigTest; - if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .s390x) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/194256 const widths = [_]comptime_int{ 1, 2, 3, 4, 8, 16 }; diff --git a/lib/std/zon/parse.zig b/lib/std/zon/parse.zig index 9f492ddbea6eafdf1841d86cb0d9f383c42b8638..4ae46ccb0143b351d0f601e64290a1c75bee9ac7 100644 --- a/lib/std/zon/parse.zig +++ b/lib/std/zon/parse.zig @@ -3129,7 +3129,7 @@ test "std.zon free on error" { test "std.zon vector" { if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/15330 - if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .s390x) return error.SkipZigTest; // github.com/ziglang/zig/issues/25957 + if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .s390x) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/25957 const gpa = std.testing.allocator; -- 2.54.0