Skip to content

perms.rs: replace rustix with std - #16452

Merged
cakebaker merged 1 commit into
uutils:mainfrom
oech3:chfake
Nov 14, 2026
Merged

cakebaker merged 1 commit into
uutils:mainfrom
oech3:chfake

Conversation

@oech3

@oech3 oech3 commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Closes #16339
I'd like to avoid confliction with #16403 . So tests can be added after one of them was merged, or coinsider this PR as mere refactoring.

We did not have CWD before #15509 .

@oech3 oech3 changed the title replace rustix with std perms.rs: replace rustix with std Nov 14, 2026
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/misc/usage_vs_getopt (fails in this run but passes in the 'main' branch)

@codspeed

codspeed Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning, 1 note

⚠️ 123 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

ℹ️ 1 benchmark has no flamegraph

The flamegraph wasn't generated: most of the time was spent in runtime internals, which would leave nothing useful to analyze.

See affected benchmarks

✅ 405 untouched benchmarks
⏩ 70 skipped benchmarks1


Comparing oech3:chfake (9b16607) with main (f02f4bc)2

Open in CodSpeed

Footnotes

  1. 70 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. ↩

  2. No successful run was found on main (aa68999) during the generation of this report, so f02f4bc was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@xtqqczze

Copy link
Copy Markdown
Collaborator

Well spotted, std::os::unix::fs::lchown has been available since Rust 1.73.

Comment thread src/uucore/src/lib/features/perms.rs Resolved
@xtqqczze

Copy link
Copy Markdown
Collaborator

Could you push another commit to remove libc dependency from perms, we can use u32 instead of importing gid_t and uid_t.

Comment thread src/uucore/src/lib/features/perms.rs Resolved
@oech3
oech3 force-pushed the chfake branch 2 times, most recently from 80c2977 to 9b16607 Compare November 14, 2026 11:09
@cakebaker
cakebaker merged commit d5d0df6 into uutils:main Nov 14, 2026
195 of 196 checks passed
@cakebaker

Copy link
Copy Markdown
Contributor

Thanks!

@oech3
oech3 deleted the chfake branch November 14, 2026 14:30
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.

chown, chgrp: ownership changes bypass fakeroot

3 participants