From d46f118f52820147fbd32212d583ec6e7bafbce8 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 8 Jan 2024 20:50:21 +0900 Subject: [PATCH] dir_fd_op_failures.rs: use non-zero len to match the comment above Note: on posix, len=0 may fail with EINVAL. --- tests/rust/src/bin/dir_fd_op_failures.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rust/src/bin/dir_fd_op_failures.rs b/tests/rust/src/bin/dir_fd_op_failures.rs index 9ac1ce20..a9d314ca 100644 --- a/tests/rust/src/bin/dir_fd_op_failures.rs +++ b/tests/rust/src/bin/dir_fd_op_failures.rs @@ -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