coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

Stty: implemented hex and octal parsing for rows and columns

Open ChrisDryden opened this issue 3 weeks ago • 9 comments

3 out of the 5 stty GNU tests are now passing and was taking a look at why the stty-row-col test was now failing. The issue was that the row and column options are able to accept hex and oct values and the parser we were using did not support the parsing of those values. This change makes the stty-row-col tests now pass.

I have modified the parser helper function and added tests that compare the output of the uutils implementation to the gnu implementation.

ChrisDryden avatar Nov 28 '25 21:11 ChrisDryden

I'd mentioned here do this in an utility file and re-use it in all the places we should parse such integers

3v1n0 avatar Nov 29 '25 03:11 3v1n0

Good idea, I added a helper in the parser folder to be able to reuse that logic

ChrisDryden avatar Nov 29 '25 05:11 ChrisDryden

GNU testsuite comparison:

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

github-actions[bot] avatar Nov 29 '25 05:11 github-actions[bot]

GNU testsuite comparison:

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

github-actions[bot] avatar Dec 02 '25 16:12 github-actions[bot]

GNU testsuite comparison:

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

github-actions[bot] avatar Dec 03 '25 06:12 github-actions[bot]

GNU testsuite comparison:

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

github-actions[bot] avatar Dec 07 '25 18:12 github-actions[bot]

CodSpeed Performance Report

Merging #9516 will not alter performance

Comparing ChrisDryden:hex_octal_parsing (5a3fb2e) with main (2000af8)

Summary

✅ 127 untouched
⏩ 6 skipped[^skipped]

[^skipped]: 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.

codspeed-hq[bot] avatar Dec 07 '25 21:12 codspeed-hq[bot]

GNU testsuite comparison:

Congrats! The gnu test tests/stty/stty-row-col is no longer failing!

github-actions[bot] avatar Dec 07 '25 21:12 github-actions[bot]

The benchmark change is unrelated, should be good for another round of reviews

ChrisDryden avatar Dec 07 '25 21:12 ChrisDryden

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/stty/stty-row-col is no longer failing!

github-actions[bot] avatar Dec 14 '25 20:12 github-actions[bot]

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/stty/stty-row-col is no longer failing!

github-actions[bot] avatar Dec 14 '25 21:12 github-actions[bot]

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/stty/stty-row-col is no longer failing!

github-actions[bot] avatar Dec 14 '25 21:12 github-actions[bot]

I ended up reverting back to the approach of using the existing parsing helper function since it reduces the amount of new code, and IMO makes it cleaner. Now that its down to ~40 lines should be easier to review

ChrisDryden avatar Dec 17 '25 15:12 ChrisDryden

GNU testsuite comparison:

Congrats! The gnu test tests/stty/stty-row-col is no longer failing!
Congrats! The gnu test tests/tail/inotify-dir-recreate is now passing!

github-actions[bot] avatar Dec 17 '25 16:12 github-actions[bot]