Skip to content

Commit 0bdca75

Browse files
committed
ci(wasi): run ln integration tests
Adds test_ln:: to the wasmtime integration test list and drops ln from the pending-tools TODO. Documents the read_link-on-absolute-paths gap in wasi-test-gaps.md.
1 parent 5fb92fb commit 0bdca75

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/wasi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
# Tests incompatible with WASI are annotated with
5151
# #[cfg_attr(wasi_runner, ignore)] in the test source files.
5252
# TODO: add integration tests for these tools as WASI support is extended:
53-
# arch b2sum cat cksum cp csplit date dir dircolors fmt join ln
53+
# arch b2sum cat cksum cp csplit date dir dircolors fmt join
5454
# ls md5sum mkdir mv nproc pathchk pr printenv ptx pwd readlink
5555
# realpath rm rmdir seq sha1sum sha224sum sha256sum sha384sum
5656
# sha512sum shred sleep sort split tail touch tsort uname uniq
@@ -61,7 +61,7 @@ jobs:
6161
test_base32:: test_base64:: test_basenc:: test_basename:: \
6262
test_comm:: test_cut:: test_dirname:: test_echo:: \
6363
test_expand:: test_factor:: test_false:: test_fold:: \
64-
test_head:: test_link:: test_nl:: test_numfmt:: \
64+
test_head:: test_link:: test_ln:: test_nl:: test_numfmt:: \
6565
test_od:: test_paste:: test_printf:: test_shuf:: test_sum:: \
6666
test_tee:: test_tr:: test_true:: test_truncate:: \
6767
test_unexpand:: test_unlink:: test_wc::

docs/src/wasi-test-gaps.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ To find all annotated tests: `grep -rn 'wasi_runner, ignore' tests/`
66

77
## Tools not yet covered by integration tests
88

9-
arch, b2sum, cat, cksum, cp, csplit, date, dir, dircolors, fmt, join, ln, ls, md5sum, mkdir, mv, nproc, pathchk, pr, printenv, ptx, pwd, readlink, realpath, rm, rmdir, seq, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, shred, sleep, sort, split, tail, touch, tsort, uname, uniq, vdir, yes
9+
arch, b2sum, cat, cksum, cp, csplit, date, dir, dircolors, fmt, join, ls, md5sum, mkdir, mv, nproc, pathchk, pr, printenv, ptx, pwd, readlink, realpath, rm, rmdir, seq, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, shred, sleep, sort, split, tail, touch, tsort, uname, uniq, vdir, yes
1010

1111
## WASI sandbox: host paths not visible
1212

@@ -31,3 +31,7 @@ WASI does not support spawning child processes. Tests that shell out to other co
3131
## WASI: stdin file position not preserved through wasmtime
3232

3333
When stdin is a seekable file, wasmtime does not preserve the file position between the host and guest. Tests that validate stdin offset behavior after `head` reads are skipped.
34+
35+
## WASI: read_link on absolute paths fails under wasmtime via spawned test harness
36+
37+
`fs::read_link` on an absolute path inside the sandbox (e.g. `/file2`) returns `EPERM` when the WASI binary is launched through `std::process::Command` from the test harness, even though the same call works when wasmtime is invoked directly. This breaks `uucore::fs::canonicalize` for symlink sources, so tests that rely on following a symlink to compute a relative path are skipped.

0 commit comments

Comments
 (0)