Skip to content

Commit 5fb92fb

Browse files
committed
tests/ln: skip WASI-incompatible cases
- test_symlink_to_dir_2args uses an absolute host tmpdir path that isn't visible inside the WASI sandbox. - test_ln_non_utf8_paths requires non-UTF-8 filenames, which WASI forbids. - test_relative_src_already_symlink hits a read_link-on-absolute-path failure specific to wasmtime launched through cargo test's spawn.
1 parent ab44c39 commit 5fb92fb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/by-util/test_ln.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ fn test_symlink_implicit_target_dir() {
501501
}
502502

503503
#[test]
504+
#[cfg_attr(wasi_runner, ignore = "WASI sandbox: host paths not visible")]
504505
fn test_symlink_to_dir_2args() {
505506
let (at, mut ucmd) = at_and_ucmd!();
506507
let filename = "test_symlink_to_dir_2args_file";
@@ -754,6 +755,10 @@ fn test_relative_dst_already_symlink() {
754755
}
755756

756757
#[test]
758+
#[cfg_attr(
759+
wasi_runner,
760+
ignore = "WASI: read_link on absolute paths fails under wasmtime via spawned test harness"
761+
)]
757762
fn test_relative_src_already_symlink() {
758763
let (at, mut ucmd) = at_and_ucmd!();
759764
at.touch("file1");
@@ -967,6 +972,7 @@ fn test_ln_seen_file() {
967972

968973
#[test]
969974
#[cfg(target_os = "linux")]
975+
#[cfg_attr(wasi_runner, ignore = "WASI: argv/filenames must be valid UTF-8")]
970976
fn test_ln_non_utf8_paths() {
971977
use std::ffi::OsStr;
972978
use std::os::unix::ffi::OsStrExt;

0 commit comments

Comments
 (0)