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) {...@@ -2846,6 +2846,7 @@ void run_c_tests(void) {
2846#if !defined(__mips64)2846#if !defined(__mips64)
2847#if !defined(ZIG_PPC32)2847#if !defined(ZIG_PPC32)
2848#if !defined(__s390x__)2848#if !defined(__s390x__)
2849#if !(defined(_WIN32) && defined(__i386__))
2849 {2850 {
2850 struct Struct_u8 s = zig_ret_struct_u8();2851 struct Struct_u8 s = zig_ret_struct_u8();
2851 assert_or_panic(s.a == 1);2852 assert_or_panic(s.a == 1);
...@@ -2854,10 +2855,12 @@ void run_c_tests(void) {...@@ -2854,10 +2855,12 @@ void run_c_tests(void) {
2854#endif2855#endif
2855#endif2856#endif
2856#endif2857#endif
2858#endif
28572859
2858#if !defined(__mips64)2860#if !defined(__mips64)
2859#if !defined(ZIG_PPC32)2861#if !defined(ZIG_PPC32)
2860#if !defined(__s390x__)2862#if !defined(__s390x__)
2863#if !(defined(_WIN32) && defined(__i386__))
2861 {2864 {
2862 struct Struct_u16 s = zig_ret_struct_u16();2865 struct Struct_u16 s = zig_ret_struct_u16();
2863 assert_or_panic(s.a == 7);2866 assert_or_panic(s.a == 7);
...@@ -2866,10 +2869,12 @@ void run_c_tests(void) {...@@ -2866,10 +2869,12 @@ void run_c_tests(void) {
2866#endif2869#endif
2867#endif2870#endif
2868#endif2871#endif
2872#endif
28692873
2870#if !defined(__mips64)2874#if !defined(__mips64)
2871#if !defined(ZIG_PPC32)2875#if !defined(ZIG_PPC32)
2872#if !defined(__s390x__)2876#if !defined(__s390x__)
2877#if !(defined(_WIN32) && defined(__i386__))
2873 {2878 {
2874 struct Struct_u32 s = zig_ret_struct_u32();2879 struct Struct_u32 s = zig_ret_struct_u32();
2875 assert_or_panic(s.a == 13);2880 assert_or_panic(s.a == 13);
...@@ -2878,10 +2883,12 @@ void run_c_tests(void) {...@@ -2878,10 +2883,12 @@ void run_c_tests(void) {
2878#endif2883#endif
2879#endif2884#endif
2880#endif2885#endif
2886#endif
28812887
2882#if !defined(ZIG_PPC32)2888#if !defined(ZIG_PPC32)
2883#if !defined(ZIG_RISCV32)2889#if !defined(ZIG_RISCV32)
2884#if !defined(__s390x__)2890#if !defined(__s390x__)
2891#if !(defined(_WIN32) && defined(__i386__))
2885 {2892 {
2886 struct Struct_u64 s = zig_ret_struct_u64();2893 struct Struct_u64 s = zig_ret_struct_u64();
2887 assert_or_panic(s.a == 19);2894 assert_or_panic(s.a == 19);
...@@ -2890,6 +2897,7 @@ void run_c_tests(void) {...@@ -2890,6 +2897,7 @@ void run_c_tests(void) {
2890#endif2897#endif
2891#endif2898#endif
2892#endif2899#endif
2900#endif
28932901
2894#if !defined(ZIG_PPC32) && !defined(__hexagon__) && !defined(__s390x__)2902#if !defined(ZIG_PPC32) && !defined(__hexagon__) && !defined(__s390x__)
2895 {2903 {
...@@ -2908,15 +2916,18 @@ void run_c_tests(void) {...@@ -2908,15 +2916,18 @@ void run_c_tests(void) {
2908 }2916 }
29092917
2910#if !defined(__mips64__)2918#if !defined(__mips64__)
2919#if !(defined(_WIN32) && defined(__i386__))
2911 {2920 {
2912 struct Struct_f32 s = zig_ret_struct_f32();2921 struct Struct_f32 s = zig_ret_struct_f32();
2913 assert_or_panic(s.a == 2.5f);2922 assert_or_panic(s.a == 2.5f);
2914 zig_struct_f32((struct Struct_f32){ .a = 2.5f });2923 zig_struct_f32((struct Struct_f32){ .a = 2.5f });
2915 }2924 }
2916#endif2925#endif
2926#endif
29172927
2918#if !(defined(__arm__) && defined(__SOFTFP__))2928#if !(defined(__arm__) && defined(__SOFTFP__))
2919#if !defined(ZIG_RISCV32)2929#if !defined(ZIG_RISCV32)
2930#if !(defined(_WIN32) && defined(__i386__))
2920 {2931 {
2921 struct Struct_f64 s = zig_ret_struct_f64();2932 struct Struct_f64 s = zig_ret_struct_f64();
2922 assert_or_panic(s.a == 2.5);2933 assert_or_panic(s.a == 2.5);
...@@ -2924,6 +2935,7 @@ void run_c_tests(void) {...@@ -2924,6 +2935,7 @@ void run_c_tests(void) {
2924 }2935 }
2925#endif2936#endif
2926#endif2937#endif
2938#endif
29272939
2928#if !defined(__arm__)2940#if !defined(__arm__)
2929#if !defined(__loongarch__)2941#if !defined(__loongarch__)
...@@ -2987,6 +2999,7 @@ void run_c_tests(void) {...@@ -2987,6 +2999,7 @@ void run_c_tests(void) {
2987#endif2999#endif
29883000
2989#if !defined(__powerpc__) && !defined(__loongarch__) && !defined(__mips64__)3001#if !defined(__powerpc__) && !defined(__loongarch__) && !defined(__mips64__)
3002#if !(defined(_WIN32) && defined(__i386__))
2990 {3003 {
2991 struct Struct_u32_Union_u32_u32u32 s = zig_ret_struct_u32_union_u32_u32u32();3004 struct Struct_u32_Union_u32_u32u32 s = zig_ret_struct_u32_union_u32_u32u32();
2992 assert_or_panic(s.a == 1);3005 assert_or_panic(s.a == 1);
...@@ -3000,6 +3013,7 @@ void run_c_tests(void) {...@@ -3000,6 +3013,7 @@ void run_c_tests(void) {
3000 zig_struct_i32_i32(s);3013 zig_struct_i32_i32(s);
3001 }3014 }
3002#endif3015#endif
3016#endif
30033017
3004#if !defined(__powerpc64__) && !defined(__loongarch__) && !defined(__mips64__)3018#if !defined(__powerpc64__) && !defined(__loongarch__) && !defined(__mips64__)
3005 {3019 {
test/c_abi/main.zig+12
...@@ -291,6 +291,7 @@ test "C ABI struct u8" {...@@ -291,6 +291,7 @@ test "C ABI struct u8" {
291 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;291 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
292 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;292 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
293 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;293 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
294 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
294295
295 const s = c_ret_struct_u8();296 const s = c_ret_struct_u8();
296 try expect(s.a == 4);297 try expect(s.a == 4);
...@@ -318,6 +319,7 @@ test "C ABI struct u16" {...@@ -318,6 +319,7 @@ test "C ABI struct u16" {
318 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;319 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
319 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;320 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
320 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;321 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
322 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
321323
322 const s = c_ret_struct_u16();324 const s = c_ret_struct_u16();
323 try expect(s.a == 10);325 try expect(s.a == 10);
...@@ -345,6 +347,7 @@ test "C ABI struct u32" {...@@ -345,6 +347,7 @@ test "C ABI struct u32" {
345 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;347 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
346 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;348 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
347 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;349 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
350 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
348351
349 const s = c_ret_struct_u32();352 const s = c_ret_struct_u32();
350 try expect(s.a == 16);353 try expect(s.a == 16);
...@@ -372,6 +375,7 @@ test "C ABI struct u64" {...@@ -372,6 +375,7 @@ test "C ABI struct u64" {
372 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;375 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
373 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;376 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;
374 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;377 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
378 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
375379
376 const s = c_ret_struct_u64();380 const s = c_ret_struct_u64();
377 try expect(s.a == 22);381 try expect(s.a == 22);
...@@ -485,6 +489,7 @@ test "C ABI struct f32" {...@@ -485,6 +489,7 @@ test "C ABI struct f32" {
485 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;489 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
486 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;490 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
487 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;491 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
492 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
488493
489 const s = c_ret_struct_f32();494 const s = c_ret_struct_f32();
490 try expect(s.a == 2.5);495 try expect(s.a == 2.5);
...@@ -513,6 +518,7 @@ test "C ABI struct f64" {...@@ -513,6 +518,7 @@ test "C ABI struct f64" {
513 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;518 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;
514 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;519 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;
515 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;520 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
521 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
516522
517 const s = c_ret_struct_f64();523 const s = c_ret_struct_f64();
518 try expect(s.a == 2.5);524 try expect(s.a == 2.5);
...@@ -705,6 +711,7 @@ test "C ABI struct i32 i32" {...@@ -705,6 +711,7 @@ test "C ABI struct i32 i32" {
705 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;711 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;
706 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;712 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
707 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;713 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
714 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
708715
709 const s: Struct_i32_i32 = .{716 const s: Struct_i32_i32 = .{
710 .a = 1,717 .a = 1,
...@@ -5681,6 +5688,7 @@ test "C ABI pointer sized float struct" {...@@ -5681,6 +5688,7 @@ test "C ABI pointer sized float struct" {
5681 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;5688 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;
5682 if (builtin.cpu.arch.isLoongArch() and builtin.abi.float() == .soft) return error.SkipZigTest;5689 if (builtin.cpu.arch.isLoongArch() and builtin.abi.float() == .soft) return error.SkipZigTest;
5683 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;5690 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
5691 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
56845692
5685 c_ptr_size_float_struct(.{ .x = 1, .y = 2 });5693 c_ptr_size_float_struct(.{ .x = 1, .y = 2 });
56865694
...@@ -5812,6 +5820,7 @@ test "PD: Zig passes to C" {...@@ -5812,6 +5820,7 @@ test "PD: Zig passes to C" {
5812 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;5820 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
5813 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;5821 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5814 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;5822 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
5823 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
5815 try expectOk(c_assert_PD(.{ .v1 = null, .v2 = 0.5 }));5824 try expectOk(c_assert_PD(.{ .v1 = null, .v2 = 0.5 }));
5816}5825}
5817test "PD: Zig returns to C" {5826test "PD: Zig returns to C" {
...@@ -5827,6 +5836,7 @@ test "PD: C passes to Zig" {...@@ -5827,6 +5836,7 @@ test "PD: C passes to Zig" {
5827 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;5836 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
5828 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;5837 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5829 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;5838 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
5839 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
5830 try expectOk(c_send_PD());5840 try expectOk(c_send_PD());
5831}5841}
5832test "PD: C returns to Zig" {5842test "PD: C returns to Zig" {
...@@ -5936,6 +5946,7 @@ test "f16 struct" {...@@ -5936,6 +5946,7 @@ test "f16 struct" {
5936 if (builtin.target.cpu.arch.isPowerPC32()) return error.SkipZigTest;5946 if (builtin.target.cpu.arch.isPowerPC32()) return error.SkipZigTest;
5937 if (builtin.cpu.arch.isArm() and builtin.mode != .Debug) return error.SkipZigTest;5947 if (builtin.cpu.arch.isArm() and builtin.mode != .Debug) return error.SkipZigTest;
5938 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;5948 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
5949 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
59395950
5940 const a = c_f16_struct(.{ .a = 12 });5951 const a = c_f16_struct(.{ .a = 12 });
5941 try expect(a.a == 34);5952 try expect(a.a == 34);
...@@ -6045,6 +6056,7 @@ test "Stdcall ABI structs" {...@@ -6045,6 +6056,7 @@ test "Stdcall ABI structs" {
6045 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;6056 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
6046 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;6057 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
6047 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;6058 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
6059 if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest;
60486060
6049 const res = stdcall_coord2(6061 const res = stdcall_coord2(
6050 .{ .x = 0x1111, .y = 0x2222 },6062 .{ .x = 0x1111, .y = 0x2222 },
test/tests.zig+7-8
...@@ -1995,14 +1995,13 @@ const c_abi_targets = blk: {...@@ -1995,14 +1995,13 @@ const c_abi_targets = blk: {
19951995
1996 // Windows Targets1996 // Windows Targets
19971997
1998 // https://codeberg.org/ziglang/zig/issues/355211998 .{
1999 //.{1999 .target = .{
2000 // .target = .{2000 .cpu_arch = .x86,
2001 // .cpu_arch = .x86,2001 .os_tag = .windows,
2002 // .os_tag = .windows,2002 .abi = .gnu,
2003 // .abi = .gnu,2003 },
2004 // },2004 },
2005 //},
2006 .{2005 .{
2007 .target = .{2006 .target = .{
2008 .cpu_arch = .x86_64,2007 .cpu_arch = .x86_64,