authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2023-08-26 11:32:37+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-09-23 12:36:44-07:00
log79f7481575005f9f63b5b3be8dd89b92b11b9c77
treeab44253bc9180d8947322504c78ddc5c91e01b75
parent865b2e259bf78dbf1d4c1051b5fff68b90bca65f

spirv: disable failing tests


22 files changed, 61 insertions(+), 0 deletions(-)

src/codegen/spirv.zig+1
......@@ -1242,6 +1242,7 @@ pub const DeclGen = struct {
12421242 },
12431243 .Int => {
12441244 const int_info = ty.intInfo(mod);
1245 // TODO: Integers in OpenCL kernels are always unsigned.
12451246 return try self.intType(int_info.signedness, int_info.bits);
12461247 },
12471248 .Enum => {
src/link/SpirV.zig+5
......@@ -110,6 +110,8 @@ pub fn updateFunc(self: *SpirV, module: *Module, func_index: InternPool.Index, a
110110 }
111111
112112 const func = module.funcInfo(func_index);
113 const decl = module.declPtr(func.owner_decl);
114 log.debug("lowering function {s}", .{ module.intern_pool.stringToSlice(decl.name) });
113115
114116 var decl_gen = codegen.DeclGen.init(self.base.allocator, module, &self.spv, &self.decl_link);
115117 defer decl_gen.deinit();
......@@ -124,6 +126,9 @@ pub fn updateDecl(self: *SpirV, module: *Module, decl_index: Module.Decl.Index)
124126 @panic("Attempted to compile for architecture that was disabled by build configuration");
125127 }
126128
129 const decl = module.declPtr(decl_index);
130 log.debug("lowering declaration {s}", .{ module.intern_pool.stringToSlice(decl.name) });
131
127132 var decl_gen = codegen.DeclGen.init(self.base.allocator, module, &self.spv, &self.decl_link);
128133 defer decl_gen.deinit();
129134
test/behavior/alignof.zig+2
......@@ -28,6 +28,8 @@ test "comparison of @alignOf(T) against zero" {
2828}
2929
3030test "correct alignment for elements and slices of aligned array" {
31 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
32
3133 var buf: [1024]u8 align(64) = undefined;
3234 var start: usize = 1;
3335 var end: usize = undefined;
test/behavior/array.zig+4
......@@ -763,6 +763,8 @@ test "slicing array of zero-sized values" {
763763}
764764
765765test "array init with no result pointer sets field result types" {
766 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
767
766768 const S = struct {
767769 // A function parameter has a result type, but no result pointer.
768770 fn f(arr: [1]u32) u32 {
......@@ -777,6 +779,8 @@ test "array init with no result pointer sets field result types" {
777779}
778780
779781test "runtime side-effects in comptime-known array init" {
782 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
783
780784 var side_effects: u4 = 0;
781785 const init = [4]u4{
782786 blk: {
test/behavior/bitcast.zig+4
......@@ -271,6 +271,8 @@ test "comptime bitcast used in expression has the correct type" {
271271}
272272
273273test "bitcast passed as tuple element" {
274 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
275
274276 const S = struct {
275277 fn foo(args: anytype) !void {
276278 try comptime expect(@TypeOf(args[0]) == f32);
......@@ -281,6 +283,8 @@ test "bitcast passed as tuple element" {
281283}
282284
283285test "triple level result location with bitcast sandwich passed as tuple element" {
286 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
287
284288 const S = struct {
285289 fn foo(args: anytype) !void {
286290 try comptime expect(@TypeOf(args[0]) == f64);
test/behavior/bugs/5487.zig+1
......@@ -13,5 +13,6 @@ test "crash" {
1313 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
1414 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
1515 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
16 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
1617 _ = io.multiWriter(.{writer()});
1718}
test/behavior/call_tail.zig+1
......@@ -46,6 +46,7 @@ test "arguments pointed to on stack into tailcall" {
4646 }
4747 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
4848 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
49 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
4950
5051 var data = [_]u64{ 1, 6, 2, 7, 1, 9, 3 };
5152 base = @intFromPtr(&data);
test/behavior/cast.zig+2
......@@ -1156,6 +1156,7 @@ fn foobar(func: PFN_void) !void {
11561156
11571157test "cast function with an opaque parameter" {
11581158 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
1159 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
11591160
11601161 if (builtin.zig_backend == .stage2_c) {
11611162 // https://github.com/ziglang/zig/issues/16845
......@@ -2501,6 +2502,7 @@ test "@intFromBool on vector" {
25012502test "numeric coercions with undefined" {
25022503 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
25032504 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2505 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
25042506
25052507 const from: i32 = undefined;
25062508 var to: f32 = from;
test/behavior/comptime_memory.zig+2
......@@ -425,6 +425,8 @@ test "mutate entire slice at comptime" {
425425}
426426
427427test "dereference undefined pointer to zero-bit type" {
428 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
429
428430 const p0: *void = undefined;
429431 try testing.expectEqual({}, p0.*);
430432
test/behavior/error.zig+1
......@@ -942,6 +942,7 @@ test "returning an error union containing a type with no runtime bits" {
942942test "try used in recursive function with inferred error set" {
943943 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
944944 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
945 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
945946
946947 const Value = union(enum) {
947948 values: []const @This(),
test/behavior/eval.zig+1
......@@ -729,6 +729,7 @@ fn loopNTimes(comptime n: usize) void {
729729}
730730
731731test "variable inside inline loop that has different types on different iterations" {
732 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
732733 try testVarInsideInlineLoop(.{ true, @as(u32, 42) });
733734}
734735
test/behavior/fn.zig+2
......@@ -583,6 +583,8 @@ test "lazy values passed to anytype parameter" {
583583}
584584
585585test "pass and return comptime-only types" {
586 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
587
586588 const S = struct {
587589 fn returnNull(comptime x: @Type(.Null)) @Type(.Null) {
588590 return x;
test/behavior/generics.zig+1
......@@ -288,6 +288,7 @@ test "generic function instantiation turns into comptime call" {
288288
289289test "generic function with void and comptime parameter" {
290290 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
291 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
291292
292293 const S = struct { x: i32 };
293294 const namespace = struct {
test/behavior/math.zig+2
......@@ -1289,6 +1289,8 @@ fn testShrExact(x: u8) !void {
12891289}
12901290
12911291test "shift left/right on u0 operand" {
1292 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
1293
12921294 const S = struct {
12931295 fn doTheTest() !void {
12941296 var x: u0 = 0;
test/behavior/optional.zig+2
......@@ -500,6 +500,8 @@ test "cast slice to const slice nested in error union and optional" {
500500}
501501
502502test "variable of optional of noreturn" {
503 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
504
503505 var null_opv: ?noreturn = null;
504506 try std.testing.expectEqual(@as(?noreturn, null), null_opv);
505507}
test/behavior/struct.zig+11
......@@ -137,6 +137,8 @@ test "invoke static method in global scope" {
137137const empty_global_instance = StructWithNoFields{};
138138
139139test "return empty struct instance" {
140 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
141
140142 _ = returnEmptyStructInstance();
141143}
142144fn returnEmptyStructInstance() StructWithNoFields {
......@@ -331,6 +333,7 @@ const VoidStructFieldsFoo = struct {
331333
332334test "return empty struct from fn" {
333335 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
336 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
334337
335338 _ = testReturnEmptyStructFromFn();
336339}
......@@ -893,6 +896,8 @@ test "anonymous struct literal syntax" {
893896}
894897
895898test "fully anonymous struct" {
899 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
900
896901 const S = struct {
897902 fn doTheTest() !void {
898903 try dump(.{
......@@ -915,6 +920,8 @@ test "fully anonymous struct" {
915920}
916921
917922test "fully anonymous list literal" {
923 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
924
918925 const S = struct {
919926 fn doTheTest() !void {
920927 try dump(.{ @as(u32, 1234), @as(f64, 12.34), true, "hi" });
......@@ -1715,6 +1722,8 @@ test "extern struct field pointer has correct alignment" {
17151722}
17161723
17171724test "packed struct field in anonymous struct" {
1725 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
1726
17181727 const T = packed struct {
17191728 f1: bool = false,
17201729 };
......@@ -1740,6 +1749,8 @@ test "struct init with no result pointer sets field result types" {
17401749}
17411750
17421751test "runtime side-effects in comptime-known struct init" {
1752 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
1753
17431754 var side_effects: u4 = 0;
17441755 const S = struct { a: u4, b: u4, c: u4, d: u4 };
17451756 const init = S{
test/behavior/switch.zig+2
......@@ -799,6 +799,8 @@ test "inline switch range that includes the maximum value of the switched type"
799799}
800800
801801test "nested break ignores switch conditions and breaks instead" {
802 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
803
802804 const S = struct {
803805 fn register_to_address(ident: []const u8) !u8 {
804806 const reg: u8 = if (std.mem.eql(u8, ident, "zero")) 0x00 else blk: {
test/behavior/translate_c_macros.zig+2
......@@ -233,6 +233,8 @@ test "@typeInfo on @cImport result" {
233233}
234234
235235test "Macro that uses Long type concatenation casting" {
236 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
237
236238 try expect((@TypeOf(h.X)) == c_long);
237239 try expectEqual(h.X, @as(c_long, 10));
238240}
test/behavior/type_info_only_pub_decls.zig+3
......@@ -1,3 +1,4 @@
1const builtin = @import("builtin");
12const std = @import("std");
23const other = struct {
34 const std = @import("std");
......@@ -14,6 +15,8 @@ const other = struct {
1415};
1516
1617test {
18 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
19
1720 const ti = @typeInfo(other);
1821 const decls = ti.Struct.decls;
1922
test/behavior/undefined.zig+1
......@@ -82,6 +82,7 @@ test "assign undefined to struct with method" {
8282
8383test "type name of undefined" {
8484 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
85 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
8586
8687 const x = undefined;
8788 try expect(mem.eql(u8, @typeName(@TypeOf(x)), "@TypeOf(undefined)"));
test/behavior/union.zig+2
......@@ -1669,6 +1669,8 @@ test "packed union field pointer has correct alignment" {
16691669}
16701670
16711671test "union with 128 bit integer" {
1672 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
1673
16721674 const ValueTag = enum { int, other };
16731675
16741676 const Value3 = union(ValueTag) {
test/behavior/var_args.zig+9
......@@ -14,6 +14,8 @@ fn add(args: anytype) i32 {
1414}
1515
1616test "add arbitrary args" {
17 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
18
1719 try expect(add(.{ @as(i32, 1), @as(i32, 2), @as(i32, 3), @as(i32, 4) }) == 10);
1820 try expect(add(.{@as(i32, 1234)}) == 1234);
1921 try expect(add(.{}) == 0);
......@@ -24,12 +26,15 @@ fn readFirstVarArg(args: anytype) void {
2426}
2527
2628test "send void arg to var args" {
29 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
30
2731 readFirstVarArg(.{{}});
2832}
2933
3034test "pass args directly" {
3135 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
3236 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
37 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
3338
3439 try expect(addSomeStuff(.{ @as(i32, 1), @as(i32, 2), @as(i32, 3), @as(i32, 4) }) == 10);
3540 try expect(addSomeStuff(.{@as(i32, 1234)}) == 1234);
......@@ -82,11 +87,15 @@ fn foo2(args: anytype) bool {
8287}
8388
8489test "array of var args functions" {
90 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
91
8592 try expect(foos[0](.{}));
8693 try expect(!foos[1](.{}));
8794}
8895
8996test "pass zero length array to var args param" {
97 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
98
9099 doNothingWithFirstArg(.{""});
91100}
92101