Skip to content

Conversation

@karlmcdowall
Copy link
Contributor

@karlmcdowall karlmcdowall commented Feb 1, 2025

Head tool now ensures that stdin is set to the last character that was output by the tool. This ensures that if any subsequent tools are run from the same input stream they will start at the correct point in the stream.

These changes should fix the head-pos.sh GNU test. This is tracked by issue #7028.

@github-actions
Copy link

github-actions bot commented Feb 2, 2025

GNU testsuite comparison:

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

@karlmcdowall
Copy link
Contributor Author

Will un-bork the non-unix build and post an update...

@github-actions
Copy link

github-actions bot commented Feb 2, 2025

GNU testsuite comparison:

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

@github-actions
Copy link

github-actions bot commented Feb 5, 2025

GNU testsuite comparison:

GNU test failed: tests/head/head. tests/head/head is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/misc/usage_vs_getopt (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/head/head-pos is no longer failing!

@karlmcdowall karlmcdowall force-pushed the head_stdio_file branch 2 times, most recently from f48b315 to 3cd59f0 Compare February 5, 2025 03:29
@karlmcdowall karlmcdowall marked this pull request as ready for review February 5, 2025 03:54
@github-actions
Copy link

github-actions bot commented Feb 5, 2025

GNU testsuite comparison:

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

@github-actions
Copy link

github-actions bot commented Feb 7, 2025

GNU testsuite comparison:

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

@github-actions
Copy link

GNU testsuite comparison:

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

@karlmcdowall karlmcdowall marked this pull request as draft February 20, 2025 16:14
@karlmcdowall karlmcdowall force-pushed the head_stdio_file branch 3 times, most recently from e09cc93 to bfccf75 Compare February 20, 2025 16:34
@karlmcdowall karlmcdowall marked this pull request as ready for review February 20, 2025 16:35
@github-actions
Copy link

GNU testsuite comparison:

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

@github-actions
Copy link

GNU testsuite comparison:

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

@github-actions
Copy link

GNU testsuite comparison:

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

Copy link
Collaborator

@jfinkels jfinkels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code itself makes sense, I just have a question about the tests

Fix issue uutils#7028
Head tool now ensures that stdin is set to the last character
that was output by the tool. This ensures that if any subsequent
tools are run from the same input stream they will start at the
correct point in the stream.
@github-actions
Copy link

GNU testsuite comparison:

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

@RenjiSann RenjiSann merged commit 76ad604 into uutils:main Feb 28, 2025
65 checks passed
@RenjiSann
Copy link
Collaborator

Thank you for your contribution ! 🥳

@karlmcdowall karlmcdowall deleted the head_stdio_file branch July 5, 2025 20:27
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.

head: fails to leave remaining bytes of file available for subsequent commands

3 participants