mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
test: ensure seq test triggers broken pipe with infinite output
Use an infinite sequence in `test_broken_pipe_still_exits_success` instead of finite range (1-5) to guarantee a burst of output immediately after spawn, preventing the process from finishing before stdout closure and avoiding missed broken pipe errors.
This commit is contained in:
parent
5be7f8368e
commit
099a5ddfc8
1 changed files with 3 additions and 1 deletions
|
|
@ -16,7 +16,9 @@ fn test_broken_pipe_still_exits_success() {
|
|||
use std::process::Stdio;
|
||||
|
||||
let mut child = new_ucmd!()
|
||||
.args(&["1", "5"])
|
||||
// Use an infinite sequence so a burst of output happens immediately after spawn.
|
||||
// With small output the process can finish before stdout is closed and the Broken pipe never occurs.
|
||||
.args(&["inf"])
|
||||
.set_stdout(Stdio::piped())
|
||||
.run_no_wait();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue