Skip to content

Conversation

@mattsu2020
Copy link
Contributor

@mattsu2020 mattsu2020 commented Nov 24, 2025

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

GNU testsuite comparison:

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

@sylvestre
Copy link
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

GNU testsuite comparison:

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

@mattsu2020
Copy link
Contributor Author

can we have a test for this? thanks
Added

.set_stdout(Stdio::piped())
.run_no_wait();

// 出力先が先に閉じられたパイプへ書こうとして Broken pipe を発生させる。
Copy link
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
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

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
Copy link
Contributor

oech3 commented Nov 28, 2025

failures:
    test_seq::test_broken_pipe_still_exits_success

is happenning at some PRs and commits after this commit.

RenjiSann pushed a commit to RenjiSann/coreutils that referenced this pull request Nov 28, 2025
* fix(seq): handle BrokenPipe like GNU

* test: add Unix-specific test for seq command broken pipe handling

- 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

* refactor(test): translate Japanese comment to English in test_seq.rs

- 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.
@mattsu2020
Copy link
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.

martinkunkel2 pushed a commit to martinkunkel2/coreutils that referenced this pull request Nov 30, 2025
* fix(seq): handle BrokenPipe like GNU

* test: add Unix-specific test for seq command broken pipe handling

- 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

* refactor(test): translate Japanese comment to English in test_seq.rs

- 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.
martinkunkel2 pushed a commit to martinkunkel2/coreutils that referenced this pull request Nov 30, 2025
* fix(seq): handle BrokenPipe like GNU

* test: add Unix-specific test for seq command broken pipe handling

- 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

* refactor(test): translate Japanese comment to English in test_seq.rs

- 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.
romanstingler pushed a commit to romanstingler/coreutils that referenced this pull request Dec 14, 2025
* fix(seq): handle BrokenPipe like GNU

* test: add Unix-specific test for seq command broken pipe handling

- 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

* refactor(test): translate Japanese comment to English in test_seq.rs

- 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.
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