authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-07-01 18:21:55+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-07-01 23:03:15+02:00
log8e511e031f72ef2bf236d498f32bf1013cacb882
treec593c3feb81eec5d27ba5460793c9e33f259d485
parent1c9d9b70ec10dce3d85d7ae44297b33d42afa848
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.crypto.salsa20: Disable some tests on RISC-V with vector support

https://github.com/ziglang/zig/issues/24299

1 files changed, 6 insertions(+), 0 deletions(-)

lib/std/crypto/salsa20.zig+6
...@@ -557,6 +557,8 @@ pub const SealedBox = struct {...@@ -557,6 +557,8 @@ pub const SealedBox = struct {
557const htest = @import("test.zig");557const htest = @import("test.zig");
558558
559test "(x)salsa20" {559test "(x)salsa20" {
560 if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299
561
560 const key = [_]u8{0x69} ** 32;562 const key = [_]u8{0x69} ** 32;
561 const nonce = [_]u8{0x42} ** 8;563 const nonce = [_]u8{0x42} ** 8;
562 const msg = [_]u8{0} ** 20;564 const msg = [_]u8{0} ** 20;
...@@ -600,6 +602,8 @@ test "xsalsa20poly1305 secretbox" {...@@ -600,6 +602,8 @@ test "xsalsa20poly1305 secretbox" {
600}602}
601603
602test "xsalsa20poly1305 box" {604test "xsalsa20poly1305 box" {
605 if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299
606
603 var msg: [100]u8 = undefined;607 var msg: [100]u8 = undefined;
604 var msg2: [msg.len]u8 = undefined;608 var msg2: [msg.len]u8 = undefined;
605 var nonce: [Box.nonce_length]u8 = undefined;609 var nonce: [Box.nonce_length]u8 = undefined;
...@@ -614,6 +618,8 @@ test "xsalsa20poly1305 box" {...@@ -614,6 +618,8 @@ test "xsalsa20poly1305 box" {
614}618}
615619
616test "xsalsa20poly1305 sealedbox" {620test "xsalsa20poly1305 sealedbox" {
621 if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299
622
617 var msg: [100]u8 = undefined;623 var msg: [100]u8 = undefined;
618 var msg2: [msg.len]u8 = undefined;624 var msg2: [msg.len]u8 = undefined;
619 var boxed: [msg.len + SealedBox.seal_length]u8 = undefined;625 var boxed: [msg.len + SealedBox.seal_length]u8 = undefined;