diff --git a/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs b/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs index b2ee63c4e8..e63ecbc8d7 100644 --- a/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs +++ b/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs @@ -5,35 +5,16 @@ use wasi_tests::open_scratch_directory; unsafe fn test_dangling_fd(dir_fd: wasi::Fd) { // Create a file, open it, delete it without closing the handle, // and then try creating it again - let fd = wasi::path_open( - dir_fd, - 0, - "file", - wasi::OFLAGS_CREAT, - wasi::RIGHTS_FD_WRITE, - 0, - 0, - ) - .unwrap(); + let fd = wasi::path_open(dir_fd, 0, "file", wasi::OFLAGS_CREAT, 0, 0, 0).unwrap(); wasi::fd_close(fd).unwrap(); - let file_fd = - wasi::path_open(dir_fd, 0, "file", 0, wasi::RIGHTS_FD_READ, 0, 0).expect("failed to open"); + let file_fd = wasi::path_open(dir_fd, 0, "file", 0, 0, 0, 0).expect("failed to open"); assert_gt!( file_fd, libc::STDERR_FILENO as wasi::Fd, "file descriptor range check", ); wasi::path_unlink_file(dir_fd, "file").expect("failed to unlink"); - let fd = wasi::path_open( - dir_fd, - 0, - "file", - wasi::OFLAGS_CREAT, - wasi::RIGHTS_FD_WRITE, - 0, - 0, - ) - .unwrap(); + let fd = wasi::path_open(dir_fd, 0, "file", wasi::OFLAGS_CREAT, 0, 0, 0).unwrap(); wasi::fd_close(fd).unwrap(); // Now, repeat the same process but for a directory