Skip to content

Commit

Permalink
dragonfly: pass test: lib/std/std.zig
Browse files Browse the repository at this point in the history
  • Loading branch information
mikdusan committed Dec 31, 2022
1 parent 9e8c625 commit 271aad4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/std/fs/test.zig
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ test "file operations on directories" {
try testing.expectError(error.IsDir, tmp_dir.dir.createFile(test_dir_name, .{}));
try testing.expectError(error.IsDir, tmp_dir.dir.deleteFile(test_dir_name));
switch (builtin.os.tag) {
// NetBSD does not error when reading a directory.
.netbsd => {},
// no error when reading a directory.
.dragonfly, .netbsd => {},
// Currently, WASI will return error.Unexpected (via ENOTCAPABLE) when attempting fd_read on a directory handle.
// TODO: Re-enable on WASI once https://github.com/bytecodealliance/wasmtime/issues/1935 is resolved.
.wasi => {},
Expand Down
2 changes: 2 additions & 0 deletions lib/std/os.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2696,6 +2696,8 @@ pub fn mkdiratZ(dir_fd: fd_t, sub_dir_path: [*:0]const u8, mode: u32) MakeDirErr
.NOSPC => return error.NoSpaceLeft,
.NOTDIR => return error.NotDir,
.ROFS => return error.ReadOnlyFileSystem,
// dragonfly: when dir_fd is unlinked from filesystem
.NOTCONN => return error.FileNotFound,
else => |err| return unexpectedErrno(err),
}
}
Expand Down

0 comments on commit 271aad4

Please sign in to comment.