From 222ea6992de2b3edf23e332b68aa163599096216 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 6 Jul 2022 15:57:36 -0700 Subject: std: disable aarch64 tests that regressed from LLVM 14 See #12012 --- lib/std/math.zig | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'lib/std/math.zig') diff --git a/lib/std/math.zig b/lib/std/math.zig index de77663d5b..6076f0e4e7 100644 --- a/lib/std/math.zig +++ b/lib/std/math.zig @@ -1,3 +1,4 @@ +const builtin = @import("builtin"); const std = @import("std.zig"); const assert = std.debug.assert; const mem = std.mem; @@ -506,6 +507,12 @@ pub fn shl(comptime T: type, a: T, shift_amt: anytype) T { } test "shl" { + if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and + builtin.cpu.arch == .aarch64) + { + // https://github.com/ziglang/zig/issues/12012 + return error.SkipZigTest; + } try testing.expect(shl(u8, 0b11111111, @as(usize, 3)) == 0b11111000); try testing.expect(shl(u8, 0b11111111, @as(usize, 8)) == 0); try testing.expect(shl(u8, 0b11111111, @as(usize, 9)) == 0); @@ -546,6 +553,12 @@ pub fn shr(comptime T: type, a: T, shift_amt: anytype) T { } test "shr" { + if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and + builtin.cpu.arch == .aarch64) + { + // https://github.com/ziglang/zig/issues/12012 + return error.SkipZigTest; + } try testing.expect(shr(u8, 0b11111111, @as(usize, 3)) == 0b00011111); try testing.expect(shr(u8, 0b11111111, @as(usize, 8)) == 0); try testing.expect(shr(u8, 0b11111111, @as(usize, 9)) == 0); @@ -578,6 +591,12 @@ pub fn rotr(comptime T: type, x: T, r: anytype) T { } test "rotr" { + if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and + builtin.cpu.arch == .aarch64) + { + // https://github.com/ziglang/zig/issues/12012 + return error.SkipZigTest; + } try testing.expect(rotr(u8, 0b00000001, @as(usize, 0)) == 0b00000001); try testing.expect(rotr(u8, 0b00000001, @as(usize, 9)) == 0b10000000); try testing.expect(rotr(u8, 0b00000001, @as(usize, 8)) == 0b00000001); @@ -606,6 +625,12 @@ pub fn rotl(comptime T: type, x: T, r: anytype) T { } test "rotl" { + if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and + builtin.cpu.arch == .aarch64) + { + // https://github.com/ziglang/zig/issues/12012 + return error.SkipZigTest; + } try testing.expect(rotl(u8, 0b00000001, @as(usize, 0)) == 0b00000001); try testing.expect(rotl(u8, 0b00000001, @as(usize, 9)) == 0b00000010); try testing.expect(rotl(u8, 0b00000001, @as(usize, 8)) == 0b00000001); @@ -1622,6 +1647,12 @@ fn testSign() !void { } test "sign" { + if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and + builtin.cpu.arch == .aarch64) + { + // https://github.com/ziglang/zig/issues/12012 + return error.SkipZigTest; + } try testSign(); comptime try testSign(); } -- cgit v1.2.3 From 31281a7d14a843f25156a731dd2108a7018680ad Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 9 Jul 2022 15:43:33 -0700 Subject: disable regressed math.sign test case see #12012 --- lib/std/math.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/std/math.zig') diff --git a/lib/std/math.zig b/lib/std/math.zig index 6076f0e4e7..c249ae04e8 100644 --- a/lib/std/math.zig +++ b/lib/std/math.zig @@ -1653,6 +1653,10 @@ test "sign" { // https://github.com/ziglang/zig/issues/12012 return error.SkipZigTest; } + if ((builtin.zig_backend == .stage1) and builtin.cpu.arch == .x86_64) { + // https://github.com/ziglang/zig/issues/12012 + return error.SkipZigTest; + } try testSign(); comptime try testSign(); } -- cgit v1.2.3 From f9bf4889264aee387639bb8a35fdf594236b1283 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 9 Jul 2022 17:35:14 -0700 Subject: two more regressed test cases; same cause as last two commits --- lib/std/fmt.zig | 4 ++++ lib/std/math.zig | 8 +------- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'lib/std/math.zig') diff --git a/lib/std/fmt.zig b/lib/std/fmt.zig index 45452bb61f..90e70a7c41 100644 --- a/lib/std/fmt.zig +++ b/lib/std/fmt.zig @@ -2311,6 +2311,10 @@ test "float.decimal" { } test "float.libc.sanity" { + if (builtin.zig_backend == .stage1 and builtin.os.tag == .windows) { + // https://github.com/ziglang/zig/issues/12063 + return error.SkipZigTest; + } try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @bitCast(f32, @as(u32, 916964781)))}); try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @bitCast(f32, @as(u32, 925353389)))}); try expectFmt("f64: 0.10000", "f64: {d:.5}", .{@as(f64, @bitCast(f32, @as(u32, 1036831278)))}); diff --git a/lib/std/math.zig b/lib/std/math.zig index c249ae04e8..0487ef2d3c 100644 --- a/lib/std/math.zig +++ b/lib/std/math.zig @@ -1647,13 +1647,7 @@ fn testSign() !void { } test "sign" { - if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and - builtin.cpu.arch == .aarch64) - { - // https://github.com/ziglang/zig/issues/12012 - return error.SkipZigTest; - } - if ((builtin.zig_backend == .stage1) and builtin.cpu.arch == .x86_64) { + if (builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) { // https://github.com/ziglang/zig/issues/12012 return error.SkipZigTest; } -- cgit v1.2.3