Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/by-util/test_mktemp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ fn test_respect_template_directory() {
}

#[cfg(unix)]
#[uutests::wasi_ignore(PathCreateDirectoryNoModeParam)]
#[uutests::wasi_ignore(NoPermissionBits)]
#[test]
fn test_directory_permissions() {
let (at, mut ucmd) = at_and_ucmd!();
Expand Down Expand Up @@ -1318,6 +1318,7 @@ fn test_mktemp_hidden_file_single_dot() {

// When the name cannot be printed the caller never learns it, so the file must
// not be left behind for nothing to clean up.
#[uutests::wasip2_ignore(StreamWriteGenericIoError)]
#[test]
#[cfg(target_os = "linux")]
fn test_write_error_removes_the_temporary_file() {
Expand All @@ -1336,6 +1337,7 @@ fn test_write_error_removes_the_temporary_file() {
assert!(leftovers.is_empty(), "left behind: {leftovers:?}");
}

#[uutests::wasip2_ignore(StreamWriteGenericIoError)]
#[test]
#[cfg(target_os = "linux")]
fn test_write_error_removes_the_temporary_directory() {
Expand Down
3 changes: 1 addition & 2 deletions tests/by-util/test_mv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ fn test_mv_verbose() {
));
}

#[uutests::wasi_ignore(PathCreateDirectoryNoModeParam)]
#[uutests::wasi_ignore(NoPermissionBits)]
#[test]
#[cfg(any(target_os = "linux", target_os = "android"))] // mkdir does not support -m on windows. Freebsd doesn't return a permission error either.
#[cfg(feature = "mkdir")]
Expand Down Expand Up @@ -1766,7 +1766,6 @@ fn test_mv_seen_multiple_files_to_directory() {
assert!(at.plus("c").join("g").exists());
}

#[uutests::wasi_ignore(ErrnoMessageMismatch)]
#[test]
fn test_mv_dir_into_file_where_both_are_files() {
let scene = TestScenario::new(util_name!());
Expand Down
5 changes: 1 addition & 4 deletions tests/uutests_procs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn wasi_reason(key: &str) -> Option<&'static str> {
"WASI: no locale data; every locale (even one requested via LC_ALL or other locale env vars) behaves as C"
}
"NoPermissionBits" => {
"WASI: no permission bits/chmod syscall, so file mode cannot be restricted or observed, and explicit mode/ownership preservation always fails"
"WASI: no permission bits/chmod syscall and no mkdir mode parameter, so file and directory modes cannot be restricted or observed, and explicit mode/ownership preservation always fails"
}
"NoPipeSignalSupport" => "WASI: no pipe/signal support",
"NoRlimitSetrlimitSupport" => "WASI: rlimit/setrlimit not supported",
Expand All @@ -94,9 +94,6 @@ fn wasi_reason(key: &str) -> Option<&'static str> {
"NonUtf8ArgsUnsupported" => {
"WASI: argv, env values, and paths must be valid UTF-8; wasmtime cannot pass non-UTF-8 data through the sandboxed binary or the spawned test harness"
}
"PathCreateDirectoryNoModeParam" => {
"WASI: path_create_directory has no mode parameter and chmod returns ENOSYS, so directories can't be created with restricted permissions"
}
"PermissionErrorsSurfaceAsEnoent" => {
"WASI: filesystem permission errors surface as ENOENT rather than EACCES"
}
Expand Down
Loading