From 19e1f26e3d9aa7a4749ed4c21293d111afc41846 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 13 Jan 2024 14:01:38 +0100 Subject: [PATCH] fuzz: with pipe, also capture stderr --- fuzz/fuzz_targets/fuzz_common.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fuzz/fuzz_targets/fuzz_common.rs b/fuzz/fuzz_targets/fuzz_common.rs index f0de0b6052f..e8cac8d4048 100644 --- a/fuzz/fuzz_targets/fuzz_common.rs +++ b/fuzz/fuzz_targets/fuzz_common.rs @@ -232,7 +232,10 @@ pub fn run_gnu_cmd( let output = if let Some(input_str) = pipe_input { // We have an pipe input - command.stdin(Stdio::piped()).stdout(Stdio::piped()); + command + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()); let mut child = command.spawn().expect("Failed to execute command"); let child_stdin = child.stdin.as_mut().unwrap();