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 (e46cdbb) with main (33df181)

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.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cat/splice is no longer failing!
Congrats! The gnu test tests/cut/mb-non-utf8 is no longer failing!
Congrats! The gnu test tests/mv/dir2dir is no longer failing!
Congrats! The gnu test tests/mv/mv-exchange is no longer failing!
Congrats! The gnu test tests/nl/multibyte is no longer failing!
Congrats! The gnu test tests/od/od-j is no longer failing!
Note: The gnu test tests/cp/link-heap is now being skipped but was previously passing.
Note: The gnu test tests/tail/tail-n0f is now being skipped but was previously passing.
Congrats! The gnu test tests/dd/no-allocate is now passing!
Note: The gnu test tests/misc/write-errors was skipped on 'main' but is now failing.

- 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

Copy link
Copy Markdown

Binary size comparison:

Individual binary size comparison VS main (threshold: >=5% AND >=4 KB).

Total size of compared binaries: 148.93 MB (+320 KB, +0.21%)

Significant per-binary changes:
  install     1.24 MB ->    1.32 MB  (+80 KB, +6.29%)
  mkdir       1.09 MB ->    1.17 MB  (+80 KB, +7.14%)
  mkfifo      1.09 MB ->    1.16 MB  (+76 KB, +6.83%)
  mknod       1.09 MB ->    1.17 MB  (+76 KB, +6.79%)

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