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

test/c: disable some tests on *-windows-msvc when the symbols don't exist

closes https://codeberg.org/ziglang/zig/issues/35517

4 files changed, 8 insertions(+), 6 deletions(-)

test/c/math.zig+3
...@@ -61,10 +61,13 @@ test "modf" {...@@ -61,10 +61,13 @@ test "modf" {
61}61}
6262
63test "modff" {63test "modff" {
64 if (builtin.cpu.arch == .x86 and builtin.target.os.tag == .windows and builtin.target.abi != .gnu) return; // mingw-only
65
64 try testModf(f32);66 try testModf(f32);
65}67}
6668
67test "modfl" {69test "modfl" {
70 if (builtin.cpu.arch.isX86() and builtin.target.os.tag == .windows and builtin.target.abi != .gnu) return; // mingw-only
68 if (builtin.target.cpu.arch.isPowerPC()) return error.SkipZigTest; // TODO: see https://codeberg.org/ziglang/zig/issues/3097671 if (builtin.target.cpu.arch.isPowerPC()) return error.SkipZigTest; // TODO: see https://codeberg.org/ziglang/zig/issues/30976
6972
70 try testModf(c_longdouble);73 try testModf(c_longdouble);
test/c/pthread.zig+1
...@@ -7,6 +7,7 @@ const testing = std.testing;...@@ -7,6 +7,7 @@ const testing = std.testing;
77
8test "pthread_spinlock_t" {8test "pthread_spinlock_t" {
9 if (builtin.target.os.tag.isDarwin()) return; // Darwin doesn't have `pthread_spin_*`9 if (builtin.target.os.tag.isDarwin()) return; // Darwin doesn't have `pthread_spin_*`
10 if (builtin.target.os.tag == .windows and builtin.target.abi != .gnu) return; // winpthreads-only
1011
11 var spin: c.pthread_spinlock_t = undefined;12 var spin: c.pthread_spinlock_t = undefined;
12 _ = c.pthread_spin_init(&spin, c.PTHREAD_PROCESS_PRIVATE);13 _ = c.pthread_spin_init(&spin, c.PTHREAD_PROCESS_PRIVATE);
test/c/strings.zig+4
...@@ -48,6 +48,8 @@ test "ffs" {...@@ -48,6 +48,8 @@ test "ffs" {
48}48}
4949
50test "strcasecmp" {50test "strcasecmp" {
51 if (builtin.target.os.tag == .windows and builtin.target.abi != .gnu) return; // mingw-only
52
51 try testing.expect(c.strcasecmp(@ptrCast("a"), @ptrCast("b")) < 0);53 try testing.expect(c.strcasecmp(@ptrCast("a"), @ptrCast("b")) < 0);
52 try testing.expect(c.strcasecmp(@ptrCast("b"), @ptrCast("a")) > 0);54 try testing.expect(c.strcasecmp(@ptrCast("b"), @ptrCast("a")) > 0);
53 try testing.expect(c.strcasecmp(@ptrCast("A"), @ptrCast("b")) < 0);55 try testing.expect(c.strcasecmp(@ptrCast("A"), @ptrCast("b")) < 0);
...@@ -58,6 +60,8 @@ test "strcasecmp" {...@@ -58,6 +60,8 @@ test "strcasecmp" {
58}60}
5961
60test "strncasecmp" {62test "strncasecmp" {
63 if (builtin.target.os.tag == .windows and builtin.target.abi != .gnu) return; // mingw-only
64
61 try testing.expect(c.strncasecmp(@ptrCast("a"), @ptrCast("b"), 1) < 0);65 try testing.expect(c.strncasecmp(@ptrCast("a"), @ptrCast("b"), 1) < 0);
62 try testing.expect(c.strncasecmp(@ptrCast("b"), @ptrCast("a"), 1) > 0);66 try testing.expect(c.strncasecmp(@ptrCast("b"), @ptrCast("a"), 1) > 0);
63 try testing.expect(c.strncasecmp(@ptrCast("A"), @ptrCast("b"), 1) < 0);67 try testing.expect(c.strncasecmp(@ptrCast("A"), @ptrCast("b"), 1) < 0);
test/tests.zig-6
...@@ -1611,8 +1611,6 @@ const module_test_targets = blk: {...@@ -1611,8 +1611,6 @@ const module_test_targets = blk: {
1611 .abi = .msvc,1611 .abi = .msvc,
1612 },1612 },
1613 .link_libc = true,1613 .link_libc = true,
1614 // https://codeberg.org/ziglang/zig/issues/35517
1615 .skip_modules = &.{"libc"},
1616 },1614 },
1617 .{1615 .{
1618 .target = .{1616 .target = .{
...@@ -1628,8 +1626,6 @@ const module_test_targets = blk: {...@@ -1628,8 +1626,6 @@ const module_test_targets = blk: {
1628 .abi = .gnu,1626 .abi = .gnu,
1629 },1627 },
1630 .link_libc = true,1628 .link_libc = true,
1631 // https://codeberg.org/ziglang/zig/issues/35517
1632 .skip_modules = &.{"libc"},
1633 },1629 },
16341630
1635 .{1631 .{
...@@ -1657,8 +1653,6 @@ const module_test_targets = blk: {...@@ -1657,8 +1653,6 @@ const module_test_targets = blk: {
1657 .abi = .msvc,1653 .abi = .msvc,
1658 },1654 },
1659 .link_libc = true,1655 .link_libc = true,
1660 // https://codeberg.org/ziglang/zig/issues/35517
1661 .skip_modules = &.{"libc"},
1662 },1656 },
1663 .{1657 .{
1664 .target = .{1658 .target = .{