Skip to content

stty: support any baud on Linux, replace nix with rustix - #15299

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:stty-unsafe
Open

oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:stty-unsafe

Conversation

@oech3

@oech3 oech3 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

@codspeed

codspeed Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 64 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

✅ 119 untouched benchmarks
⏩ 360 skipped benchmarks1


Comparing oech3:stty-unsafe (8094bc8) with main (c44859c)2

Open in CodSpeed

Footnotes

  1. 360 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 (36079aa) during the generation of this report, so c44859c was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

Comment thread src/uu/stty/Cargo.toml Resolved
Comment thread src/uu/stty/src/stty.rs Resolved
Comment thread src/uu/stty/src/stty.rs Resolved
Comment thread src/uu/stty/src/stty.rs Resolved
@oech3
oech3 marked this pull request as draft October 13, 2026 16:36
Comment thread src/uu/stty/src/stty.rs Resolved
@oech3
oech3 force-pushed the stty-unsafe branch 5 times, most recently from 8c0b529 to 39bc936 Compare October 13, 2026 17:09
@oech3 oech3 changed the title stty: remove unsafe & cfg stty: replace nix with rustix Oct 13, 2026
@oech3 oech3 changed the title stty: replace nix with rustix stty: support any baud on Linux, replace nix with rustix Oct 13, 2026
@oech3
oech3 force-pushed the stty-unsafe branch 2 times, most recently from ff11e70 to f100d7d Compare October 13, 2026 17:47
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/id/smack is no longer failing!
Congrats! The gnu test tests/mkdir/smack-no-root is no longer failing!
Congrats! The gnu test tests/mkdir/smack-root is no longer failing!
Congrats! The gnu test tests/df/skip-rootfs is now passing!

@oech3
oech3 force-pushed the stty-unsafe branch 2 times, most recently from 9be3124 to d420658 Compare October 13, 2026 18:30
@oech3

This comment was marked as outdated.

@xtqqczze

Copy link
Copy Markdown
Collaborator

Would it be possible to separate the refactor replacing nix with rustix from the fix for #8719 into separate PRs?

@oech3

oech3 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

It is very difficult since rustix automatically supports any baud and nix and rustix cannot be mixed.

@oech3

This comment was marked as resolved.

@oech3

This comment was marked as outdated.

@xtqqczze

Copy link
Copy Markdown
Collaborator

fuzz failures tracked by #15567.

@xtqqczze

Copy link
Copy Markdown
Collaborator

Switching to rustix has enabled support for AIX targets. Could you consider pushing a commit removing the cfg exclusion in this PR, or addressing it in a follow-up PR?

@oech3

oech3 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

I cannot much care about minor targets. I'd like to keep diff minimal at here.

@oech3 oech3 mentioned this pull request Oct 21, 2026
@xtqqczze

Copy link
Copy Markdown
Collaborator

There will be follow-up work in any case for OUTPUT_FLAGS target cfg's, so fine for now.

@oech3

This comment was marked as duplicate.

@oech3

This comment was marked as resolved.

@xtqqczze

This comment was marked as resolved.

@oech3

This comment was marked as resolved.

@xtqqczze

This comment was marked as resolved.

@oech3

This comment was marked as duplicate.

@oech3

This comment was marked as resolved.

Comment thread src/uu/stty/src/stty.rs Resolved
Comment thread util/build-gnu.sh Resolved
@oech3

oech3 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@sylvestre Would you review (& merge) this? There is not part which can be separated to different PR.

@oech3

oech3 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

bad-speed hangs. But I think it is CI itself's issue which was masked by bypassing ioctl using injection previously.
Patch is correct.

@oech3

oech3 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

I worked around about hang. But it can be fixed at GNU side.

@oech3

This comment was marked as outdated.

@oech3

oech3 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

#16218 was unrelated and script workaround cannot be dropped. This PR is ready.

@oech3

oech3 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

It seems this was sometimes rebased by @sylvestre . Is this OK to merge?

@oech3

oech3 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Last nix dep is here: #15978

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
@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: 155.49 MB (+104 KB, +0.07%)

Significant per-binary changes:
  env     1.20 MB ->    1.28 MB  (+80 KB, +6.51%)

1 similar comment
@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: 155.49 MB (+104 KB, +0.07%)

Significant per-binary changes:
  env     1.20 MB ->    1.28 MB  (+80 KB, +6.51%)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants