Repository navigation
refactor: use proc macro for wasi ignore reasons - #14964
Conversation
|
GNU testsuite comparison: |
2a36443 to
088a962
Compare
Merging this PR will not alter performance1 warning, 1 note
Comparing Footnotes
|
088a962 to
ab95f3f
Compare
7fc1254 to
764dc3f
Compare
bd1bf06 to
9dba18a
Compare
a72b7ce to
aebb327
Compare
8a50254 to
8cee82b
Compare
8cee82b to
0720764
Compare
c6f238e to
87fba1b
Compare
The PR also converts some `#[cfg_attr(wasi_runner, ignore = ...)]` annotations to `#[cfg(not(wasi_runner))]`, and the reverse in a few places, where the test is genuinely platform-specific under WASI. This gate change affects cp, mv, truncate and shuf, and rides along with the reason-string centralization.
87fba1b to
1467832
Compare
Centralizes the ~460
#[cfg_attr(wasi_runner, ignore = "...")]annotations behind#[uutests::wasi_ignore(ReasonKey)], a proc-macro attribute in the newtests/uutests_procscrate.Context: PR 14884 and PR 13687 flagged
wasi_runneras acfgduplicated across the suite as free-text strings. The tests always compile for the host, because WASI cannot spawn thechild process they launch. So
target_oscannot replace thecfg.wasi_runneris the only signal that a run drives awasm32-wasip1/wasm32-wasip2binary throughwasmtime. This change keeps thecfgand removes the string duplication. Every reason is now defined once, alphabetically, intests/uutests_procs/src/lib.rs: 40 keys, down from 57 after merging duplicates. Several keys previously had no explanation.#[uutests::wasi_ignore(Reason)]also applies to amod { ... }block. It recurses into nested modules and attaches the reason to every test inside.tee'slinux_onlymodule andtruncate'sfifomodule use this.Not touched: structural gates that are not ignore-reasons (
feat_diagnosticsmodule gating,#[cfg(wasi_runner)]branches that select alternate passing assertions).Ignore gates converted to compile-time gates
The PR also changes some annotations between the two WASI skip mechanisms.
#[cfg_attr(wasi_runner, ignore = "...")]still compiles the test under the WASI runner and skips it at runtime.#[cfg(not(wasi_runner))]drops the test from the build under the WASI runner. The second form fits a test that is genuinely platform-specific under WASI, where no WASI API could make it pass. This change converts some annotations from the first form to the second, and the reverse in a few places. It affectscp,mv,truncateandshuf. The gate change rides along with the reason-string centralization rather than a separate PR.