Skip to content

fix(seq): handle BrokenPipe like GNU - #9471

Merged
sylvestre merged 4 commits into
uutils:mainfrom
mattsu2020:seq-broken-pipe
Nov 26, 2025
Merged

fix(seq): handle BrokenPipe like GNU#9471
sylvestre merged 4 commits into
uutils:mainfrom
mattsu2020:seq-broken-pipe

Conversation

@mattsu2020

@mattsu2020 mattsu2020 commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

Align the BrokenPipe behavior of the seq program with GNU

We need to align the handling of BrokenPipe errors in GNU test for env with seq.

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

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

@sylvestre

Copy link
Copy Markdown
Contributor

can we have a test for this? thanks

mattsu2020 and others added 2 commits November 26, 2025 16:16
- Ensures seq exits gracefully with code 0 and reports "Broken pipe" error on stderr when stdout pipe is prematurely closed
- Validates correct behavior for common scenario where output is piped to commands like head that terminate early
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

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

@mattsu2020

Copy link
Copy Markdown
Contributor Author

can we have a test for this? thanks
Added

Comment thread tests/by-util/test_seq.rs Outdated
.set_stdout(Stdio::piped())
.run_no_wait();

// 出力先が先に閉じられたパイプへ書こうとして Broken pipe を発生させる。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please translate to english ;)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sorry done

- Updated a comment in the test for broken pipe behavior to use English instead of Japanese, enhancing readability for non-Japanese speakers and aligning with project standards. No functional changes to the test logic.
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

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

@sylvestre
sylvestre merged commit b9f97d4 into uutils:main Nov 26, 2025
127 checks passed
@mattsu2020
mattsu2020 deleted the seq-broken-pipe branch November 26, 2025 23:33
@oech3

oech3 commented Nov 28, 2025

Copy link
Copy Markdown
Contributor
failures:
    test_seq::test_broken_pipe_still_exits_success

is happenning at some PRs and commits after this commit.

@mattsu2020

Copy link
Copy Markdown
Contributor Author
failures:
    test_seq::test_broken_pipe_still_exits_success

is happenning at some PRs and commits after this commit.

The test case in question passes immediately, so the test case needs to be revised.

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.

3 participants