Skip to content

refactor: use proc macro for wasi ignore reasons - #14964

Open
eduardomourar wants to merge 2 commits into
uutils:mainfrom
eduardomourar:refactor/wasi-ignore-reasons
Open

eduardomourar wants to merge 2 commits into
uutils:mainfrom
eduardomourar:refactor/wasi-ignore-reasons

Conversation

@eduardomourar

@eduardomourar eduardomourar commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Centralizes the ~400 #[cfg_attr(wasi_runner, ignore = "...")] annotations across the integration tests behind #[uutests::wasi_ignore(ReasonKey)], a proc-macro attribute defined in a new tests/uutests_procs crate.

Context: As per PR 14884 and PR 13687 flagged wasi_runner as a noisy, ad hoc cfg. It can't be replaced with target_os, since the tests always compile for the host (WASI can't spawn the child process they launch) — wasi_runner is the only signal a run is driving a wasm32-wasip1/wasm32-wasip2 binary via wasmtime. This doesn't remove the cfg, just the string-literal duplication around it: every reason is now defined once, alphabetically, in tests/uutests_procs/src/lib.rs 42 keys, down from an initial 57 after merging duplicates), including several that previously had no explanation at all.

#[uutests::wasi_ignore(Reason)] can also be applied to a mod { ... } block instead of one #[test] fn at a time; it recurses into nested modules and attaches the reason to every test inside. tee's linux_only module (21 tests) and truncate's fifo module (3 tests) use this instead of repeating the same key on every test.

Not touched: structural gates that aren't ignore-reasons (feat_diagnostics module gating, #[cfg(wasi_runner)] branches selecting alternate passing assertions).

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/id/setgid. tests/id/setgid is passing on 'main'. Maybe you have to rebase?

@eduardomourar
eduardomourar force-pushed the refactor/wasi-ignore-reasons branch from 2a36443 to 088a962 Compare September 29, 2026 17:21
@codspeed

codspeed Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 5.08%

⚡ 5 improved benchmarks
❌ 3 regressed benchmarks
✅ 391 untouched benchmarks
⏩ 54 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation three_39_bit_primes 371.3 ms 801.5 ms -53.67%
❌ Simulation thirteen_39_bit_primes 9 s 9.5 s -5.37%
❌ Simulation five_38_bit_primes 1.7 s 1.8 s -4.97%
⚡ Simulation false_consecutive_calls 350.2 ns 294.7 ns +18.85%
⚡ Simulation tsort_complex_dag[50000] 97.2 ms 87.6 ms +10.86%
⚡ Simulation tsort_tree_dag[(10, 3)] 39.4 ms 36.5 ms +7.92%
⚡ Simulation tsort_wide_dag[100000] 167 ms 157.6 ms +5.98%
⚡ Simulation tsort_linear_chain[1000000] 2 s 1.9 s +4.99%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing eduardomourar:refactor/wasi-ignore-reasons (7fc1254) with main (8cf2e4f)

Open in CodSpeed

Footnotes

  1. 54 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Comment thread Cargo.toml
Comment thread tests/by-util/test_ln.rs Outdated
Comment thread tests/uutests_procs/src/lib.rs Outdated
Comment thread tests/uutests_procs/src/lib.rs Outdated
Comment thread tests/uutests_procs/src/lib.rs Outdated
Comment thread tests/uutests_procs/src/lib.rs Outdated
@eduardomourar
eduardomourar force-pushed the refactor/wasi-ignore-reasons branch 3 times, most recently from d5235e5 to 5353ad6 Compare October 6, 2026 00:50
@eduardomourar
eduardomourar force-pushed the refactor/wasi-ignore-reasons branch from 5353ad6 to 7fc1254 Compare October 6, 2026 20:45

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants