Skip to content

fix(mktemp): add wasi platform support for temporary directory handling - #13786

Open
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:fix/mktemp-wasi
Open

fix(mktemp): add wasi platform support for temporary directory handling#13786
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:fix/mktemp-wasi

Conversation

@eduardomourar

Copy link
Copy Markdown
Contributor
  • Add conditional compilation for WASI target to avoid panics from std::env::temp_dir()
  • Implement fallback logic in Options to read TMPDIR environment variable directly on WASI
  • Update get_tmpdir_env_or_default() with WASI-specific handling for temp directory resolution
  • Add #[cfg_attr] annotations to skip host path-dependent tests on WASI sandbox environment
  • Ignore 14 tests that require host filesystem access when running under wasi_runner
  • Ignore directory permission test on WASI due to lack of chmod support and mode parameter limitations

@codspeed-hq

codspeed-hq Bot commented Aug 7, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 347 untouched benchmarks
⏩ 46 skipped benchmarks1


Comparing eduardomourar:fix/mktemp-wasi (d44e481) with main (fb4904b)

Open in CodSpeed

Footnotes

  1. 46 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.

- Add conditional compilation for WASI target to avoid panics from `std::env::temp_dir()`
- Implement fallback logic in `Options` to read TMPDIR environment variable directly on WASI
- Update `get_tmpdir_env_or_default()` with WASI-specific handling for temp directory resolution
- Add `#[cfg_attr]` annotations to skip host path-dependent tests on WASI sandbox environment
- Ignore 14 tests that require host filesystem access when running under wasi_runner
- Ignore directory permission test on WASI due to lack of `chmod` support and mode parameter limitations
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/retry (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/io-errors (passes in this run but fails in the 'main' branch)
Skip an intermittent issue tests/tail/tail-n0f (was skipped on 'main', now failing)

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.

1 participant