-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(seq): handle BrokenPipe like GNU #9471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
GNU testsuite comparison: |
|
can we have a test for this? thanks |
- 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
|
GNU testsuite comparison: |
|
tests/by-util/test_seq.rs
Outdated
| .set_stdout(Stdio::piped()) | ||
| .run_no_wait(); | ||
|
|
||
| // 出力先が先に閉じられたパイプへ書こうとして Broken pipe を発生させる。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please translate to english ;)
There was a problem hiding this comment.
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.
|
GNU testsuite comparison: |
is happenning at some PRs and commits after this commit. |
* 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.
The test case in question passes immediately, so the test case needs to be revised. |
* 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.
* 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.
* 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.
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.