From 57c0a8c9b4eb13b4633842f0cee499243ab2d0e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 7 Oct 2026 03:48:50 +0200 Subject: [PATCH] std.crypto.ml_dsa: disable tests affected by an llvm 23 powerpc regression https://github.com/llvm/llvm-project/issues/229620 --- lib/std/crypto/ml_dsa.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/std/crypto/ml_dsa.zig b/lib/std/crypto/ml_dsa.zig index 80572be99b1b8d7bcd9db1a64859960a0de7bded..dc465af09e384f695e6930ad2c4cbf4edfed0ab8 100644 --- a/lib/std/crypto/ml_dsa.zig +++ b/lib/std/crypto/ml_dsa.zig @@ -2497,6 +2497,8 @@ test "polyPackT1 / polyUnpackT1 roundtrip" { } test "polyPackT0 / polyUnpackT0 roundtrip" { + if (builtin.zig_backend == .stage2_llvm and builtin.target.cpu.arch.isPowerpc64()) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/229620 + // Create a test polynomial with coefficients in (Q-2^12, Q+2^12] // This is the range (-2^12, 2^12] represented as unsigned around Q const bound = 1 << 12; // 2^(D-1) where D=13 @@ -2846,6 +2848,8 @@ fn testKeyGenerationBasic(comptime MlDsa: type, seed: [32]u8) !void { } test "Key generation basic - all variants" { + if (builtin.zig_backend == .stage2_llvm and builtin.target.cpu.arch.isPowerpc64()) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/229620 + inline for (.{ .{ .variant = MLDSA44, .seed_byte = 0x44 }, .{ .variant = MLDSA65, .seed_byte = 0x65 }, @@ -2857,6 +2861,8 @@ test "Key generation basic - all variants" { } test "Key generation determinism" { + if (builtin.zig_backend == .stage2_llvm and builtin.target.cpu.arch.isPowerpc64()) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/229620 + const seed = [_]u8{ 0x12, 0x34, 0x56, 0x78 } ++ @as([28]u8, @splat(0xAB)); // Generate two key pairs from the same seed -- 2.54.0