From a15dddae2a497e6540feca5c6adc7e86edd59adb Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 9 Aug 2026 14:05:18 -0700 Subject: [PATCH] TinyIo: fix failing tests in CI --- src/lib/TinyIo.zig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/TinyIo.zig b/src/lib/TinyIo.zig index b81648d1a..f89278070 100644 --- a/src/lib/TinyIo.zig +++ b/src/lib/TinyIo.zig @@ -1402,11 +1402,12 @@ test "dirClose closes the descriptor" { const dir: Dir = .{ .handle = opened.handle }; test_io.vtable.dirClose(test_io.userdata, &.{dir}); - // Verify with a raw fstat that the fd is gone. We check the errno + // Verify with a raw dup that the fd is gone. We check the errno // directly rather than going through our Io so no error path prints - // "unexpected errno" diagnostics in debug test builds. - var st = std.mem.zeroes(posix.Stat); - try testing.expectEqual(posix.E.BADF, posix.errno(fstat_sym(dir.handle, &st))); + // "unexpected errno" diagnostics in debug test builds. `dup` rather + // than `fstat` because glibc has no LFS64 `fstat` symbol, so + // `fstat_sym` doesn't exist on Linux. + try testing.expectEqual(posix.E.BADF, posix.errno(posix.system.dup(dir.handle))); } test "cancel protection operations are benign" {