WASI integration tests fail when the test host is macOS
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with the named date, tail, and touch tests, checking how their platform conditions and rstest ignore attributes behave under wasi_runner. Then read src/uu/touch/src/platform/wasi.rs and the macOS job in wasi.yml. Done means the listed tests pass on macOS with the WASI runner while the macOS job remains in place.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The WASI integration tests run only on ubuntu-latest. When the same tests run on macos-latest, 6 tests fail.
CI run with a macOS job: https://github.com/uutils/coreutils/actions/runs/41220415692/job/124593786020?pr=16082
Result: 3485 passed; 6 failed; 405 ignored.
The job uses macos-26-arm64, wasmtime v50.0.1 and wasm32-wasip1 with --cfg wasi_runner.
Failing tests
| Test | Actual output (WASI binary) | Expected by the test |
|---|---|---|
test_date::test_date_format_locale_ampm_markers::case_2_spanish_upper |
PM |
P. M. |
test_date::test_date_format_locale_ampm_markers::case_3_spanish_time |
08:17:48 PM |
08:17:48 p. m. |
test_date::test_date_format_locale_ampm_markers::case_4_british_lower |
pm |
p.m. |
test_date::test_date_format_locale_ampm_markers::case_5_japanese |
PM |
午後 |
test_tail::test_stdin_redirect_dir_when_target_os_is_macos |
tail: Is a directory |
tail: cannot open 'standard input' for reading: No such file or directory |
test_touch::test_touch_set_time_on_unreadable_unwritable_file |
touch: setting times of 'no_rights': Not supported (exit code 1) |
success |
Cause
The test crate runs on the host. The binary under test is the WASI guest.
- date and tail: the tests use
#[cfg(target_vendor = "apple")]. That condition is true for the host, so the tests expect native macOS output. The WASI guest does not see the host locale database. It also reports a directory read asIs a directory. - date: the test has
#[cfg_attr(wasi_runner, ignore = "...")], but cases 2 to 5 still ran. Case 1 did not fail. - touch: the test creates a file with mode
000and callstouch -d ... -c. On a macOS host, wasmtime returnsNot supportedforutimensaton that file. The same test passes on the Linux job. This was reproduced locally on macOS.
Reproduce
Run on a macOS host:
export RUSTFLAGS="--cfg wasi_runner"
cargo build --target wasm32-wasip1 --no-default-features --features feat_wasm
UUTESTS_BINARY_PATH="$(pwd)/target/wasm32-wasip1/debug/coreutils.wasm" \
UUTESTS_WASM_RUNNER=wasmtime \
cargo test --test tests --features nproc -- \
test_date::test_date_format_locale_ampm_markers \
test_tail::test_stdin_redirect_dir_when_target_os_is_macos \
test_touch::test_touch_set_time_on_unreadable_unwritable_file
Proposed fix
- Add
not(wasi_runner)to thetarget_vendor = "apple"conditions in the date and tail tests. - Make sure the
wasi_runnerignore applies to everyrstestcase in the date test. - For touch, either ignore the test on macOS under
wasi_runner, or retryutimensatwithSYMLINK_NOFOLLOWinsrc/uu/touch/src/platform/wasi.rswhen the path is not a symlink. - Keep the macOS job in
wasi.ymlso these differences stay covered.
- Lenguaje dominante
- Rust
- Estrellas
- 24.3k
- Forks
- 2.1k
- Merge medio
- 2 d 7 h
- PR fusionados (30 d)
- 397
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de uutils/coreutils
-
Unhelpful manual page(s)Abierto
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
nl: section delimiters reset --join-blank-lines groupingPosiblemente ocupada @coracoracora la tomó hace 1 día. AbiertoU - nl
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
uutils/coreutils#16130 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
uniq: overflowing -f/-s/-w values with trailing garbage are silently acceptedPosiblemente ocupada @huuan26 la tomó hace 2 días. AbiertoU - uniq
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
README: Rust version is outdatedAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
fold: tab after an 8 KiB buffer flush exceeds the requested widthPosiblemente ocupada @gibkim la tomó hace 4 días. AbiertoU - fold
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
Todos los issues de uutils/coreutils
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
nervosnetwork/fiber#1723 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Los mantenedores suelen responder en 1 día
-
needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
pbakaus/impeccable#1314 ·
Los mantenedores suelen responder en 1 día
-
marmite skill: `curl ... | sh` is the first install method, bypassing review and integrity checksAbierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
rochacbruno/marmite#565 ·