Skip to content

Commit

Permalink
dir_fd_op_failures.rs: use non-zero len to match the comment above
Browse files Browse the repository at this point in the history
Note: on posix, len=0 may fail with EINVAL.
  • Loading branch information
yamt authored and loganek committed Jan 30, 2024
1 parent 7ec16c2 commit 047a002
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/rust/src/bin/dir_fd_op_failures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ unsafe fn test_fd_dir_ops(dir_fd: wasi::Fd) {
// fallocate(dirfd, FALLOC_FL_ZERO_RANGE, 0, 1) will fail with errno EBADF on linux.
// not available on mac os.
assert_errno!(
wasi::fd_allocate(dir_fd, 0, 0).expect_err("fd_allocate error"),
wasi::fd_allocate(dir_fd, 0, 1).expect_err("fd_allocate error"),
wasi::ERRNO_ISDIR,
wasi::ERRNO_BADF,
wasi::ERRNO_NOTCAPABLE
Expand Down

0 comments on commit 047a002

Please sign in to comment.