Skip to content

Conversation

@ChrisDryden
Copy link
Contributor

@ChrisDryden ChrisDryden commented Nov 25, 2025

A missing feature in the implementation currently is the ability to read values that look like the format:

6d02:5:4bf:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:ff:12:f:17:16:ff:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

Apart from this, is the last feature missing for stty for the main stty test is the COLUMN env var. I implemented three integ tests for this new code that matches the types of tests that are run in the stty GNU tests.

This ended up being way more complicated than I originally envisioned after I had set up the GNU comparisons to run in the integration tests across multiple platforms. I learned that the amount of control flags is actually determined by a LIBC variable and that the GNU implementation had additional error messaging associated with the arg parsing error messages that we were not adding.

There is also still an pre-existing issue where the output of the control flag state is not being printed correctly, so for me to add an integration test to compare the printed output of the save state between GNU and the UUTILS implementation I will have to wait until that issue is addressed. Its already starting to become a long PR so was hoping to create this one to purely focus on the state saving and then can address the printing issues and flags in other PR's since it might involve upstream NIX changes.

@ChrisDryden ChrisDryden marked this pull request as ready for review November 25, 2025 05:47
@ChrisDryden ChrisDryden changed the title Implemented saved state parser for stty stty: Implemented saved state parser for stty Nov 25, 2025
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@ChrisDryden
Copy link
Contributor Author

The new testing I added brought up an issue that the GNU tests are being skipped without error if the version of GNU is not high enough, this likely causes blind spots in our CI testing and should be fixed.

I thought everything was matching the GNU implementation until I upgraded the GNU version and discovered that the messaging was quite different.

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 26, 2025

CodSpeed Performance Report

Merging #9480 will not alter performance

Comparing ChrisDryden:save_state_stty (c571552) with main (b2d1117)

Summary

✅ 126 untouched
⏩ 6 skipped1

Footnotes

  1. 6 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
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@ChrisDryden
Copy link
Contributor Author

Its a bit tough to figure out what the full scope of this PR should be, now that we have the integ tests running on many platforms I am discovering that various parts of the program are not matching the GNU implementation. I am going to try to disable the tests that are failing for reasons that aren't related to the state parsing but instead the flag printing and plan on following up on adding more testing and fixing the bugs in following PR's since this is already over 200 lines

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre merged commit 824c5c7 into uutils:main Nov 26, 2025
127 checks passed
RenjiSann pushed a commit to RenjiSann/coreutils that referenced this pull request Nov 28, 2025
* Implemented saved state parser for stty

* Add compatibility to macos flag type

* Added many example state parsing integration tests with GNU compatibility checks and documentation

* Spelling and formatting fixes

* Matching behaviour of adding the help command after invocations and spelling fixes

* GNU tests were being skipped because they were not at the sufficient version

* Fixed messaging error for invalid states to not show full path

* Normalizing the test output and reverting lib change

* Discovered that the limit depends on platform specific values derived from a LIBC value

* Spelling fixes and setting flags to 0 for cross platform compatibility

* Clippy fixes

* Disabling tests due to invalid printing of control chars and using GNU for printing

* Redisabling failing test as outside of the scope of this PR

* Adding g prefix support to normalize stderr

* Spell checker fixes

* Normalizing command for both gnu and uutils output

* removing single value from testing since it can be interpreted as Baud rate

* Fixing spelling mistake
martinkunkel2 pushed a commit to martinkunkel2/coreutils that referenced this pull request Nov 30, 2025
* Implemented saved state parser for stty

* Add compatibility to macos flag type

* Added many example state parsing integration tests with GNU compatibility checks and documentation

* Spelling and formatting fixes

* Matching behaviour of adding the help command after invocations and spelling fixes

* GNU tests were being skipped because they were not at the sufficient version

* Fixed messaging error for invalid states to not show full path

* Normalizing the test output and reverting lib change

* Discovered that the limit depends on platform specific values derived from a LIBC value

* Spelling fixes and setting flags to 0 for cross platform compatibility

* Clippy fixes

* Disabling tests due to invalid printing of control chars and using GNU for printing

* Redisabling failing test as outside of the scope of this PR

* Adding g prefix support to normalize stderr

* Spell checker fixes

* Normalizing command for both gnu and uutils output

* removing single value from testing since it can be interpreted as Baud rate

* Fixing spelling mistake
martinkunkel2 pushed a commit to martinkunkel2/coreutils that referenced this pull request Nov 30, 2025
* Implemented saved state parser for stty

* Add compatibility to macos flag type

* Added many example state parsing integration tests with GNU compatibility checks and documentation

* Spelling and formatting fixes

* Matching behaviour of adding the help command after invocations and spelling fixes

* GNU tests were being skipped because they were not at the sufficient version

* Fixed messaging error for invalid states to not show full path

* Normalizing the test output and reverting lib change

* Discovered that the limit depends on platform specific values derived from a LIBC value

* Spelling fixes and setting flags to 0 for cross platform compatibility

* Clippy fixes

* Disabling tests due to invalid printing of control chars and using GNU for printing

* Redisabling failing test as outside of the scope of this PR

* Adding g prefix support to normalize stderr

* Spell checker fixes

* Normalizing command for both gnu and uutils output

* removing single value from testing since it can be interpreted as Baud rate

* Fixing spelling mistake
romanstingler pushed a commit to romanstingler/coreutils that referenced this pull request Dec 14, 2025
* Implemented saved state parser for stty

* Add compatibility to macos flag type

* Added many example state parsing integration tests with GNU compatibility checks and documentation

* Spelling and formatting fixes

* Matching behaviour of adding the help command after invocations and spelling fixes

* GNU tests were being skipped because they were not at the sufficient version

* Fixed messaging error for invalid states to not show full path

* Normalizing the test output and reverting lib change

* Discovered that the limit depends on platform specific values derived from a LIBC value

* Spelling fixes and setting flags to 0 for cross platform compatibility

* Clippy fixes

* Disabling tests due to invalid printing of control chars and using GNU for printing

* Redisabling failing test as outside of the scope of this PR

* Adding g prefix support to normalize stderr

* Spell checker fixes

* Normalizing command for both gnu and uutils output

* removing single value from testing since it can be interpreted as Baud rate

* Fixing spelling mistake
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