Skip to content

Conversation

bvinc
Copy link
Contributor

@bvinc bvinc commented Jul 6, 2025

The option ---presume-input-pipe is debug option that should disable the seeking optimization, not force it to read stdin. This fixes the GNU test head-elide-tail.

@bvinc
Copy link
Contributor Author

bvinc commented Jul 6, 2025

The GNU test head/head-elide-tail was failing because it was running head on a file with the option ---presume-input-pipe. This misinterpretation of the meaning of the option was causing head to erroneously read from stdin, which was causing the process to be suspended with signal SIGTTIN which is what happens when a background process tries to read from stdin.

Copy link

github-actions bot commented Jul 7, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/usage_vs_getopt (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/head/head-elide-tail is no longer failing!

@cakebaker
Copy link
Contributor

Can you please add a test so that we don't regress in the future? Thanks!

The option ---presume-input-pipe is debug option that should
disable the seeking optimization, not force it to read stdin.
This fixes the GNU test head-elide-tail.
@bvinc bvinc force-pushed the head_elide_tail branch from e423619 to 20d26aa Compare July 8, 2025 01:38
@bvinc
Copy link
Contributor Author

bvinc commented Jul 8, 2025

It's interesting to add a test for an argument that is not supposed to change behavior at all. But I've added a simple one that would have failed previously.

Copy link

github-actions bot commented Jul 8, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/head/head-elide-tail is no longer failing!

@cakebaker cakebaker merged commit f5a862c into uutils:main Jul 8, 2025
73 checks passed
@cakebaker
Copy link
Contributor

Congrats! The gnu test tests/head/head-elide-tail is no longer failing!

Great, thanks!

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