coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

stty: columns env support and integration testing

Open ChrisDryden opened this issue 1 month ago • 10 comments

This PR takes the commit from @3v1n0 to split it from the rest of his PR to add the feature of reading from the COLUMNS variable to determine how long the lines are in the output. This is because the changes in that PR related to the flags are separate and it might be a while until some upstream changes related to that change are merged.

I added tests that cover that when printing, ideally once we expect the output of the --all command to be matching we should be able to add GNU matching testing to the COLUMNS tests. These integ tests match how the GNU integ tests validate that this env variable is working properly

https://github.com/uutils/coreutils/pull/9432 this is the PR where the COLUMNS support is added from

When reviewing this, an important thing to note is that the COLUMNS environment variable is only used when piping output.

ChrisDryden avatar Nov 26 '25 02:11 ChrisDryden

CodSpeed Performance Report

Merging #9490 will not alter performance

Comparing ChrisDryden:columns_env_support (8c9287e) 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 Nov 26 '25 02:11 codspeed-hq[bot]

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 26 '25 02: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 Nov 26 '25 03: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 Nov 26 '25 03:11 github-actions[bot]

Am so glad that we now have the integ tests running on the CI for this binary, it spotted a bunch of stuff.

ChrisDryden avatar Nov 26 '25 04:11 ChrisDryden

GNU testsuite comparison:

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

github-actions[bot] avatar Nov 26 '25 10:11 github-actions[bot]

Moved the libc to a helper function with comments and added some comments to the main wrapped printer class

ChrisDryden avatar Nov 28 '25 20:11 ChrisDryden

The only errors are coming from this PR: https://github.com/uutils/coreutils/pull/9471

ChrisDryden avatar Nov 28 '25 21:11 ChrisDryden

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 05:12 github-actions[bot]

GNU testsuite comparison:

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

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

@sylvestre mind if I get a second review on this one?

ChrisDryden avatar Dec 14 '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 is no longer failing!

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