-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
stty: Implemented saved state parser for stty #9480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
GNU testsuite comparison: |
…lity checks and documentation
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
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. |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
… from a LIBC value
|
GNU testsuite comparison: |
CodSpeed Performance ReportMerging #9480 will not alter performanceComparing Summary
Footnotes
|
|
GNU testsuite comparison: |
|
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 |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
* 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
* 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
* 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
* 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
A missing feature in the implementation currently is the ability to read values that look like the format:
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.