Skip to content

Commit 271aad4

Browse files
committed
dragonfly: pass test: lib/std/std.zig
1 parent 9e8c625 commit 271aad4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/std/fs/test.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ test "file operations on directories" {
446446
try testing.expectError(error.IsDir, tmp_dir.dir.createFile(test_dir_name, .{}));
447447
try testing.expectError(error.IsDir, tmp_dir.dir.deleteFile(test_dir_name));
448448
switch (builtin.os.tag) {
449-
// NetBSD does not error when reading a directory.
450-
.netbsd => {},
449+
// no error when reading a directory.
450+
.dragonfly, .netbsd => {},
451451
// Currently, WASI will return error.Unexpected (via ENOTCAPABLE) when attempting fd_read on a directory handle.
452452
// TODO: Re-enable on WASI once https://github.com/bytecodealliance/wasmtime/issues/1935 is resolved.
453453
.wasi => {},

lib/std/os.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,6 +2696,8 @@ pub fn mkdiratZ(dir_fd: fd_t, sub_dir_path: [*:0]const u8, mode: u32) MakeDirErr
26962696
.NOSPC => return error.NoSpaceLeft,
26972697
.NOTDIR => return error.NotDir,
26982698
.ROFS => return error.ReadOnlyFileSystem,
2699+
// dragonfly: when dir_fd is unlinked from filesystem
2700+
.NOTCONN => return error.FileNotFound,
26992701
else => |err| return unexpectedErrno(err),
27002702
}
27012703
}

0 commit comments

Comments
 (0)