From 0d4f3cc675b71dd3729c7aebab5c47b405922cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Thu, 21 May 2026 20:37:11 +0200 Subject: [PATCH] re-enable some tests on RISC-V that no longer fail Miscompilations appear to have been fixed with LLVM 22. closes https://github.com/ziglang/zig/issues/24299 closes https://github.com/ziglang/zig/issues/24300 closes https://github.com/ziglang/zig/issues/24301 closes https://github.com/ziglang/zig/issues/25083 --- lib/std/bit_set.zig | 1 - lib/std/crypto/ascon.zig | 2 -- lib/std/crypto/salsa20.zig | 6 ------ lib/std/crypto/sha3.zig | 2 -- test/behavior/vector.zig | 1 - 5 files changed, 12 deletions(-) diff --git a/lib/std/bit_set.zig b/lib/std/bit_set.zig index ad4bb5317aad825d62e1250f143370fd2dbf2fea..b7920e20124d4e04f78662a14861ed7f9f6ae711 100644 --- a/lib/std/bit_set.zig +++ b/lib/std/bit_set.zig @@ -1708,7 +1708,6 @@ fn testStaticBitSet(comptime Set: type) !void { test Integer { if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; - if (comptime builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24300 try testStaticBitSet(Integer(0)); try testStaticBitSet(Integer(1)); diff --git a/lib/std/crypto/ascon.zig b/lib/std/crypto/ascon.zig index dffca76b3e8eaea128041b9d0f82364014f26dc2..3142bc0a8972c394be1e927361f8ad162780b040 100644 --- a/lib/std/crypto/ascon.zig +++ b/lib/std/crypto/ascon.zig @@ -980,8 +980,6 @@ test "Ascon-CXOF128 with customization" { } test "Ascon-AEAD128 round trip with various data sizes" { - if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; - const key = [_]u8{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 }; const nonce = [_]u8{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; diff --git a/lib/std/crypto/salsa20.zig b/lib/std/crypto/salsa20.zig index ec3334522db664e67dc83808da193f853a500087..36793eae2e755f28c4adff01eaee064414240b47 100644 --- a/lib/std/crypto/salsa20.zig +++ b/lib/std/crypto/salsa20.zig @@ -557,8 +557,6 @@ pub const SealedBox = struct { const htest = @import("test.zig"); test "(x)salsa20" { - if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299 - const key: [32]u8 = @splat(0x69); const nonce: [8]u8 = @splat(0x42); const msg: [20]u8 = @splat(0); @@ -604,8 +602,6 @@ test "xsalsa20poly1305 secretbox" { } test "xsalsa20poly1305 box" { - if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299 - const io = std.testing.io; var msg: [100]u8 = undefined; var msg2: [msg.len]u8 = undefined; @@ -621,8 +617,6 @@ test "xsalsa20poly1305 box" { } test "xsalsa20poly1305 sealedbox" { - if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299 - const io = std.testing.io; var msg: [100]u8 = undefined; var msg2: [msg.len]u8 = undefined; diff --git a/lib/std/crypto/sha3.zig b/lib/std/crypto/sha3.zig index edc4858a64a4e5e80d029bd54ba3a09994c16f91..d5e62904703c71ae685fb4b22b2062fe697179ce 100644 --- a/lib/std/crypto/sha3.zig +++ b/lib/std/crypto/sha3.zig @@ -583,8 +583,6 @@ test "sha3-384 streaming" { } test "sha3-512 single" { - if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/25083 - const h1 = "a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26"; try htest.assertEqualHash(Sha3_512, h1, ""); const h2 = "b751850b1a57168a5693cd924b6b096e08f621827444f70d884f5d0240d2712e10e116e9192af3c91a7ec57647e3934057340b4cf408d5a56592f8274eec53f0"; diff --git a/test/behavior/vector.zig b/test/behavior/vector.zig index c75d0e66e8bd8196489244a4bff64d294da5923b..69998aeb6963234c6d9611d95d70a197b06f0a86 100644 --- a/test/behavior/vector.zig +++ b/test/behavior/vector.zig @@ -529,7 +529,6 @@ test "vector division operators" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; - if (comptime builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24301 const S = struct { fn doTheTestDiv(comptime T: type, x: @Vector(4, T), y: @Vector(4, T)) !void { -- 2.54.0