Skip to content

fix(wasi): touch timestamp handling - #13686

Open
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:wasi-touch-fixes
Open

fix(wasi): touch timestamp handling#13686
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:wasi-touch-fixes

Conversation

@eduardomourar

Copy link
Copy Markdown
Contributor

touch avoids the filetime crate's panicking WASI fallback by reading timestamps via Metadata::accessed/modified, and uses rustix::fs::utimensat for symlink timestamps since filetime::set_symlink_file_times always fails on WASI.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Note: The gnu test tests/misc/write-errors was skipped on 'main' but is now failing.
Skip an intermittent issue tests/cut/bounded-memory (was skipped on 'main', now failing)

@codspeed-hq

codspeed-hq Bot commented Aug 1, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 3.03%

⚡ 1 improved benchmark
✅ 344 untouched benchmarks
⏩ 46 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation cksum_crc32b 40.9 ms 39.7 ms +3.03%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing eduardomourar:wasi-touch-fixes (0ef5ed9) with main (66e0d60)

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.

@sylvestre

Copy link
Copy Markdown
Contributor

This is a lot of cfg. Would it be possible to refactor this a bit? Thanks

@eduardomourar

Copy link
Copy Markdown
Contributor Author

I tried simplifying a bit. I believe that the readability would really improve if we moved the wasi (or redox) cfg path to a separate file. The downside is that it will have duplicated code.

@sylvestre

Copy link
Copy Markdown
Contributor

Please fix the lint

touch avoids the filetime crate's panicking WASI fallback by reading
timestamps via Metadata::accessed/modified, and uses
rustix::fs::utimensat for symlink timestamps since
filetime::set_symlink_file_times always fails on WASI.
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