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:
mattsu 2025-11-29 20:34:42 +09:00
parent 5be7f8368e
commit 099a5ddfc8

View file

@ -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();