From 89ea67aee2aeb4c041f55625f22fb9a1c56cf9ea Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Tue, 12 Sep 2023 17:35:32 -0700 Subject: [PATCH] Disable flaky part of Dir.rename directories test on Windows See https://github.com/ziglang/zig/issues/17134 --- lib/std/fs/test.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/std/fs/test.zig b/lib/std/fs/test.zig index 2c3de6b405..495caa8ce6 100644 --- a/lib/std/fs/test.zig +++ b/lib/std/fs/test.zig @@ -722,6 +722,12 @@ test "Dir.rename directories" { try testing.expectError(error.FileNotFound, ctx.dir.openDir(test_dir_path, .{})); var dir = try ctx.dir.openDir(test_dir_renamed_path, .{}); + // The next rename in this test can hit intermittent AccessDenied + // errors when certain conditions are true about the host system. + // For now, return early when the path type is UNC to avoid them. + // See https://github.com/ziglang/zig/issues/17134 + if (ctx.path_type == .unc) return; + // Put a file in the directory var file = try dir.createFile("test_file", .{ .read = true }); file.close();