Repository navigation
refactor: use proc macro for wasi ignore reasons - #14964
eduardomourar wants to merge 1 commit into
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
There was a problem hiding this comment.
Maybe we can remove this whole file and add those as comments in tests/uutests_procs/src/lib.rs
bd1bf06 to
9dba18a
Compare
a72b7ce to
aebb327
Compare
aebb327 to
ca94dbf
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.
ca94dbf to
8a50254
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.