| author | |
| committer | |
| log | bd12a5a6e146a257ad98f5fabde18c312560ec38 |
| tree | d683a2cf27dee7a96a8dcdc0213fabf5a6b7ab88 |
| parent | 1af476d5d8568dac9d62983e3b619877a8fa22ac |
| signature |
closes https://github.com/ziglang/zig/issues/21893
closes https://github.com/ziglang/zig/issues/23806
closes https://github.com/ziglang/zig/issues/23807
closes https://github.com/ziglang/zig/issues/24191
closes https://codeberg.org/ziglang/zig/issues/302206 files changed, 5 insertions(+), 35 deletions(-)
lib/std/Io/test.zig-1| ... | ... | @@ -137,7 +137,6 @@ test "File.setLength" { |
| 137 | 137 | test "legacy setLength" { |
| 138 | 138 | // https://github.com/ziglang/zig/issues/20747 (open fd does not have write permission) |
| 139 | 139 | if (builtin.os.tag == .wasi and builtin.link_libc) return error.SkipZigTest; |
| 140 | if (builtin.cpu.arch.isMIPS64() and (builtin.abi == .gnuabin32 or builtin.abi == .muslabin32)) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23806 | |
| 141 | 140 | |
| 142 | 141 | const io = testing.io; |
| 143 | 142 |
lib/std/hash/xxhash.zig-6| ... | ... | @@ -780,8 +780,6 @@ fn testExpect(comptime H: type, seed: anytype, input: []const u8, expected: u64) |
| 780 | 780 | } |
| 781 | 781 | |
| 782 | 782 | test "xxhash3" { |
| 783 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23807 | |
| 784 | ||
| 785 | 783 | const H = XxHash3; |
| 786 | 784 | // Non-Seeded Tests |
| 787 | 785 | try testExpect(H, 0, "", 0x2d06800538d394c2); |
| ... | ... | @@ -813,8 +811,6 @@ test "xxhash3" { |
| 813 | 811 | } |
| 814 | 812 | |
| 815 | 813 | test "xxhash3 smhasher" { |
| 816 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23807 | |
| 817 | ||
| 818 | 814 | const Test = struct { |
| 819 | 815 | fn do() !void { |
| 820 | 816 | try expectEqual(verify.smhasher(XxHash3.hash), 0x9a636405); |
| ... | ... | @@ -826,8 +822,6 @@ test "xxhash3 smhasher" { |
| 826 | 822 | } |
| 827 | 823 | |
| 828 | 824 | test "xxhash3 iterative api" { |
| 829 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23807 | |
| 830 | ||
| 831 | 825 | const Test = struct { |
| 832 | 826 | fn do() !void { |
| 833 | 827 | try verify.iterativeApi(XxHash3); |
lib/std/math/big/int_test.zig+1-3| ... | ... | @@ -484,7 +484,7 @@ fn toFloat(comptime Float: type) !void { |
| 484 | 484 | ); |
| 485 | 485 | } |
| 486 | 486 | test toFloat { |
| 487 | if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24191 | |
| 487 | if (builtin.cpu.arch == .x86) return error.SkipZigTest; | |
| 488 | 488 | try toFloat(f16); |
| 489 | 489 | try toFloat(f32); |
| 490 | 490 | try toFloat(f64); |
| ... | ... | @@ -2801,8 +2801,6 @@ test "bitNotWrap more than two limbs" { |
| 2801 | 2801 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 2802 | 2802 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 2803 | 2803 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 2804 | // LLVM: unexpected runtime library name: __umodei4 | |
| 2805 | if (builtin.zig_backend == .stage2_llvm and comptime builtin.target.cpu.arch.isWasm()) return error.SkipZigTest; // TODO | |
| 2806 | 2804 | |
| 2807 | 2805 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); |
| 2808 | 2806 | defer a.deinit(); |
lib/std/math/log10.zig-2| ... | ... | @@ -139,8 +139,6 @@ test log10_int { |
| 139 | 139 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 140 | 140 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 141 | 141 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 142 | if (builtin.zig_backend == .stage2_llvm and comptime builtin.target.cpu.arch.isWasm()) return error.SkipZigTest; // TODO | |
| 143 | if (builtin.zig_backend == .stage2_llvm and comptime builtin.target.cpu.arch == .hexagon) return error.SkipZigTest; | |
| 144 | 142 | |
| 145 | 143 | inline for ( |
| 146 | 144 | .{ u8, u16, u32, u64, u128, u256, u512 }, |
lib/std/os/linux/test.zig-2| ... | ... | @@ -10,8 +10,6 @@ const expectEqual = std.testing.expectEqual; |
| 10 | 10 | const fs = std.fs; |
| 11 | 11 | |
| 12 | 12 | test "fallocate" { |
| 13 | if (builtin.cpu.arch.isMIPS64() and (builtin.abi == .gnuabin32 or builtin.abi == .muslabin32)) return error.SkipZigTest; // https://codeberg.org/ziglang/zig/issues/30220 | |
| 14 | ||
| 15 | 13 | const io = std.testing.io; |
| 16 | 14 | |
| 17 | 15 | var tmp = std.testing.tmpDir(.{}); |
lib/std/simd.zig+4-21| ... | ... | @@ -157,13 +157,6 @@ pub fn join(a: anytype, b: anytype) @Vector(vectorLength(@TypeOf(a)) + vectorLen |
| 157 | 157 | /// Returns a vector whose elements alternates between those of each input vector. |
| 158 | 158 | /// For example, `interlace(.{[4]u32{11, 12, 13, 14}, [4]u32{21, 22, 23, 24}})` returns a vector containing `.{11, 21, 12, 22, 13, 23, 14, 24}`. |
| 159 | 159 | pub fn interlace(vecs: anytype) @Vector(vectorLength(@TypeOf(vecs[0])) * vecs.len, std.meta.Child(@TypeOf(vecs[0]))) { |
| 160 | // interlace doesn't work on MIPS, for some reason. | |
| 161 | // Notes from earlier debug attempt: | |
| 162 | // The indices are correct. The problem seems to be with the @shuffle builtin. | |
| 163 | // On MIPS, the test that interlaces small_base gives { 0, 2, 0, 0, 64, 255, 248, 200, 0, 0 }. | |
| 164 | // Calling this with two inputs seems to work fine, but I'll let the compile error trigger for all inputs, just to be safe. | |
| 165 | if (builtin.cpu.arch.isMIPS()) @compileError("TODO: Find out why interlace() doesn't work on MIPS"); | |
| 166 | ||
| 167 | 160 | const VecType = @TypeOf(vecs[0]); |
| 168 | 161 | const vecs_arr = @as([vecs.len]VecType, vecs); |
| 169 | 162 | const Child = std.meta.Child(@TypeOf(vecs_arr[0])); |
| ... | ... | @@ -247,13 +240,11 @@ test "vector patterns" { |
| 247 | 240 | try std.testing.expectEqual([8]u32{ 10, 20, 30, 40, 55, 66, 77, 88 }, join(base, other_base)); |
| 248 | 241 | try std.testing.expectEqual([2]u32{ 20, 30 }, extract(base, 1, 2)); |
| 249 | 242 | |
| 250 | if (!builtin.cpu.arch.isMIPS()) { | |
| 251 | try std.testing.expectEqual([8]u32{ 10, 55, 20, 66, 30, 77, 40, 88 }, interlace(.{ base, other_base })); | |
| 243 | try std.testing.expectEqual([8]u32{ 10, 55, 20, 66, 30, 77, 40, 88 }, interlace(.{ base, other_base })); | |
| 252 | 244 | |
| 253 | const small_braid = interlace(small_bases); | |
| 254 | try std.testing.expectEqual([10]u8{ 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 }, small_braid); | |
| 255 | try std.testing.expectEqual(small_bases, deinterlace(small_bases.len, small_braid)); | |
| 256 | } | |
| 245 | const small_braid = interlace(small_bases); | |
| 246 | try std.testing.expectEqual([10]u8{ 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 }, small_braid); | |
| 247 | try std.testing.expectEqual(small_bases, deinterlace(small_bases.len, small_braid)); | |
| 257 | 248 | } |
| 258 | 249 | |
| 259 | 250 | /// Joins two vectors, shifts them leftwards (towards lower indices) and extracts the leftmost elements into a vector the length of a and b. |
| ... | ... | @@ -384,9 +375,6 @@ pub fn prefixScanWithFunc( |
| 384 | 375 | /// For example, this should be 0 for addition or 1 for multiplication. |
| 385 | 376 | comptime identity: std.meta.Child(@TypeOf(vec)), |
| 386 | 377 | ) if (ErrorType == void) @TypeOf(vec) else ErrorType!@TypeOf(vec) { |
| 387 | // I haven't debugged this, but it might be a cousin of sorts to what's going on with interlace. | |
| 388 | if (builtin.cpu.arch.isMIPS()) @compileError("TODO: Find out why prefixScan doesn't work on MIPS"); | |
| 389 | ||
| 390 | 378 | const len = vectorLength(@TypeOf(vec)); |
| 391 | 379 | |
| 392 | 380 | if (hop == 0) @compileError("hop can not be 0; you'd be going nowhere forever!"); |
| ... | ... | @@ -456,11 +444,6 @@ pub fn prefixScan(comptime op: std.builtin.ReduceOp, comptime hop: isize, vec: a |
| 456 | 444 | } |
| 457 | 445 | |
| 458 | 446 | test "vector prefix scan" { |
| 459 | if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21893 | |
| 460 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .hexagon) return error.SkipZigTest; | |
| 461 | ||
| 462 | if (builtin.cpu.arch.isMIPS()) return error.SkipZigTest; | |
| 463 | ||
| 464 | 447 | const int_base = @Vector(4, i32){ 11, 23, 9, -21 }; |
| 465 | 448 | const float_base = @Vector(4, f32){ 2, 0.5, -10, 6.54321 }; |
| 466 | 449 | const bool_base = @Vector(4, bool){ true, false, true, false }; |