Skip to content

fix(wasi): cp attribute preservation and symlink handling - #13685

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

fix(wasi): cp attribute preservation and symlink handling#13685
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:wasi-cp-fixes

Conversation

@eduardomourar

Copy link
Copy Markdown
Contributor

cp treats ENOSYS like EOPNOTSUPP when skipping optional attribute preservation (WASI has no chmod/chown at all), reads timestamps via Metadata::accessed/modified instead of the filetime crate (which panics there), creates symlinks via rustix::fs::symlink, and only errors out of --reflink when explicitly requested rather than whenever it isn't Never.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/symlink (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/tail/pipe-f is now being skipped but was previously passing.
Note: The gnu test tests/tail/tail-n0f is now being skipped but was previously passing.

Comment thread src/uu/cp/src/cp.rs Outdated
cp treats ENOSYS like EOPNOTSUPP when skipping optional attribute
preservation (WASI has no chmod/chown at all), reads timestamps via
Metadata::accessed/modified instead of the filetime crate (which
panics there), creates symlinks via rustix::fs::symlink, and only
errors out of --reflink when explicitly requested rather than
whenever it isn't Never.
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