Skip to content

Commit 047a002

Browse files
yamtloganek
authored andcommitted
dir_fd_op_failures.rs: use non-zero len to match the comment above
Note: on posix, len=0 may fail with EINVAL.
1 parent 7ec16c2 commit 047a002

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/rust/src/bin/dir_fd_op_failures.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ unsafe fn test_fd_dir_ops(dir_fd: wasi::Fd) {
104104
// fallocate(dirfd, FALLOC_FL_ZERO_RANGE, 0, 1) will fail with errno EBADF on linux.
105105
// not available on mac os.
106106
assert_errno!(
107-
wasi::fd_allocate(dir_fd, 0, 0).expect_err("fd_allocate error"),
107+
wasi::fd_allocate(dir_fd, 0, 1).expect_err("fd_allocate error"),
108108
wasi::ERRNO_ISDIR,
109109
wasi::ERRNO_BADF,
110110
wasi::ERRNO_NOTCAPABLE

0 commit comments

Comments
 (0)