Skip to content

Commit 9db9d16

Browse files
committed
Allow some more errors on Windows
1 parent d62df17 commit 9db9d16

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

crates/test-programs/src/bin/p1_file_write.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ unsafe fn test_file_long_write(dir_fd: wasip1::Fd, filename: &str) {
106106
}],
107107
);
108108
assert!(
109-
res == Err(wasip1::ERRNO_BADF) || res == Err(wasip1::ERRNO_PERM),
109+
res == Err(wasip1::ERRNO_BADF)
110+
|| res == Err(wasip1::ERRNO_PERM)
111+
|| res == Err(wasip1::ERRNO_ACCES),
110112
"bad result {res:?}"
111113
)
112114
}

crates/test-programs/src/bin/p1_path_open_read_write.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ unsafe fn test_path_open_read_write(dir_fd: wasip1::Fd) {
4040
.err()
4141
.expect("read of writeonly fails"),
4242
wasip1::ERRNO_PERM,
43-
wasip1::ERRNO_BADF
43+
wasip1::ERRNO_BADF,
44+
wasip1::ERRNO_ACCES
4445
);
4546

4647
wasip1::fd_close(f_readonly).expect("close readonly");
@@ -69,7 +70,8 @@ unsafe fn test_path_open_read_write(dir_fd: wasip1::Fd) {
6970
.err()
7071
.expect("read of writeonly fails"),
7172
wasip1::ERRNO_PERM,
72-
wasip1::ERRNO_BADF
73+
wasip1::ERRNO_BADF,
74+
wasip1::ERRNO_ACCES
7375
);
7476
let bytes_written = wasip1::fd_write(f_writeonly, &[ciovec]).expect("write to writeonly");
7577
assert_eq!(bytes_written, write_buffer.len());

0 commit comments

Comments
 (0)