authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-06-01 10:45:00+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-06-01 14:46:00+02:00
logf1dbf830e225c47189f71d2952512a81e18b8651
tree056ecc26fe55cc28484e26b36000edda9c260b08
parent9bd82fd51ee77a4033d726f3ade94c7964f5beed
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

test: disable failing C ABI tests for x86-windows

ref https://codeberg.org/ziglang/zig/issues/35521

3 files changed, 33 insertions(+), 8 deletions(-)

test/c_abi/cfuncs.c+14
......@@ -2846,6 +2846,7 @@ void run_c_tests(void) {
28462846#if !defined(__mips64)
28472847#if !defined(ZIG_PPC32)
28482848#if !defined(__s390x__)
2849#if !(defined(_WIN32) && defined(__i386__))
28492850 {
28502851 struct Struct_u8 s = zig_ret_struct_u8();
28512852 assert_or_panic(s.a == 1);
......@@ -2854,10 +2855,12 @@ void run_c_tests(void) {
28542855#endif
28552856#endif
28562857#endif
2858#endif
28572859
28582860#if !defined(__mips64)
28592861#if !defined(ZIG_PPC32)
28602862#if !defined(__s390x__)
2863#if !(defined(_WIN32) && defined(__i386__))
28612864 {
28622865 struct Struct_u16 s = zig_ret_struct_u16();
28632866 assert_or_panic(s.a == 7);
......@@ -2866,10 +2869,12 @@ void run_c_tests(void) {
28662869#endif
28672870#endif
28682871#endif
2872#endif
28692873
28702874#if !defined(__mips64)
28712875#if !defined(ZIG_PPC32)
28722876#if !defined(__s390x__)
2877#if !(defined(_WIN32) && defined(__i386__))
28732878 {
28742879 struct Struct_u32 s = zig_ret_struct_u32();
28752880 assert_or_panic(s.a == 13);
......@@ -2878,10 +2883,12 @@ void run_c_tests(void) {
28782883#endif
28792884#endif
28802885#endif
2886#endif
28812887
28822888#if !defined(ZIG_PPC32)
28832889#if !defined(ZIG_RISCV32)
28842890#if !defined(__s390x__)
2891#if !(defined(_WIN32) && defined(__i386__))
28852892 {
28862893 struct Struct_u64 s = zig_ret_struct_u64();
28872894 assert_or_panic(s.a == 19);
......@@ -2890,6 +2897,7 @@ void run_c_tests(void) {
28902897#endif
28912898#endif
28922899#endif
2900#endif
28932901
28942902#if !defined(ZIG_PPC32) && !defined(__hexagon__) && !defined(__s390x__)
28952903 {
......@@ -2908,15 +2916,18 @@ void run_c_tests(void) {
29082916 }
29092917
29102918#if !defined(__mips64__)
2919#if !(defined(_WIN32) && defined(__i386__))
29112920 {
29122921 struct Struct_f32 s = zig_ret_struct_f32();
29132922 assert_or_panic(s.a == 2.5f);
29142923 zig_struct_f32((struct Struct_f32){ .a = 2.5f });
29152924 }
29162925#endif
2926#endif
29172927
29182928#if !(defined(__arm__) && defined(__SOFTFP__))
29192929#if !defined(ZIG_RISCV32)
2930#if !(defined(_WIN32) && defined(__i386__))
29202931 {
29212932 struct Struct_f64 s = zig_ret_struct_f64();
29222933 assert_or_panic(s.a == 2.5);
......@@ -2924,6 +2935,7 @@ void run_c_tests(void) {
29242935 }
29252936#endif
29262937#endif
2938#endif
29272939
29282940#if !defined(__arm__)
29292941#if !defined(__loongarch__)
......@@ -2987,6 +2999,7 @@ void run_c_tests(void) {
29872999#endif
29883000
29893001#if !defined(__powerpc__) && !defined(__loongarch__) && !defined(__mips64__)
3002#if !(defined(_WIN32) && defined(__i386__))
29903003 {
29913004 struct Struct_u32_Union_u32_u32u32 s = zig_ret_struct_u32_union_u32_u32u32();
29923005 assert_or_panic(s.a == 1);
......@@ -3000,6 +3013,7 @@ void run_c_tests(void) {
30003013 zig_struct_i32_i32(s);
30013014 }
30023015#endif
3016#endif
30033017
30043018#if !defined(__powerpc64__) && !defined(__loongarch__) && !defined(__mips64__)
30053019 {
test/c_abi/main.zig+12
......@@ -291,6 +291,7 @@ test "C ABI struct u8" {
291291 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
292292 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
293293 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
294 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
294295
295296 const s = c_ret_struct_u8();
296297 try expect(s.a == 4);
......@@ -318,6 +319,7 @@ test "C ABI struct u16" {
318319 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
319320 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
320321 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
322 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
321323
322324 const s = c_ret_struct_u16();
323325 try expect(s.a == 10);
......@@ -345,6 +347,7 @@ test "C ABI struct u32" {
345347 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
346348 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
347349 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
350 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
348351
349352 const s = c_ret_struct_u32();
350353 try expect(s.a == 16);
......@@ -372,6 +375,7 @@ test "C ABI struct u64" {
372375 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
373376 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;
374377 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
378 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
375379
376380 const s = c_ret_struct_u64();
377381 try expect(s.a == 22);
......@@ -485,6 +489,7 @@ test "C ABI struct f32" {
485489 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
486490 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
487491 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
492 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
488493
489494 const s = c_ret_struct_f32();
490495 try expect(s.a == 2.5);
......@@ -513,6 +518,7 @@ test "C ABI struct f64" {
513518 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;
514519 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;
515520 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
521 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
516522
517523 const s = c_ret_struct_f64();
518524 try expect(s.a == 2.5);
......@@ -705,6 +711,7 @@ test "C ABI struct i32 i32" {
705711 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;
706712 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
707713 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
714 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
708715
709716 const s: Struct_i32_i32 = .{
710717 .a = 1,
......@@ -5681,6 +5688,7 @@ test "C ABI pointer sized float struct" {
56815688 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;
56825689 if (builtin.cpu.arch.isLoongArch() and builtin.abi.float() == .soft) return error.SkipZigTest;
56835690 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
5691 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
56845692
56855693 c_ptr_size_float_struct(.{ .x = 1, .y = 2 });
56865694
......@@ -5812,6 +5820,7 @@ test "PD: Zig passes to C" {
58125820 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
58135821 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
58145822 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
5823 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
58155824 try expectOk(c_assert_PD(.{ .v1 = null, .v2 = 0.5 }));
58165825}
58175826test "PD: Zig returns to C" {
......@@ -5827,6 +5836,7 @@ test "PD: C passes to Zig" {
58275836 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
58285837 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
58295838 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
5839 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
58305840 try expectOk(c_send_PD());
58315841}
58325842test "PD: C returns to Zig" {
......@@ -5936,6 +5946,7 @@ test "f16 struct" {
59365946 if (builtin.target.cpu.arch.isPowerPC32()) return error.SkipZigTest;
59375947 if (builtin.cpu.arch.isArm() and builtin.mode != .Debug) return error.SkipZigTest;
59385948 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
5949 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
59395950
59405951 const a = c_f16_struct(.{ .a = 12 });
59415952 try expect(a.a == 34);
......@@ -6045,6 +6056,7 @@ test "Stdcall ABI structs" {
60456056 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
60466057 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
60476058 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
6059 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
60486060
60496061 const res = stdcall_coord2(
60506062 .{ .x = 0x1111, .y = 0x2222 },
test/tests.zig+7-8
......@@ -1995,14 +1995,13 @@ const c_abi_targets = blk: {
19951995
19961996 // Windows Targets
19971997
1998 // https://codeberg.org/ziglang/zig/issues/35521
1999 //.{
2000 // .target = .{
2001 // .cpu_arch = .x86,
2002 // .os_tag = .windows,
2003 // .abi = .gnu,
2004 // },
2005 //},
1998 .{
1999 .target = .{
2000 .cpu_arch = .x86,
2001 .os_tag = .windows,
2002 .abi = .gnu,
2003 },
2004 },
20062005 .{
20072006 .target = .{
20082007 .cpu_arch = .x86_64,