mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
fuzz: add the capability to pipe info into fuzz (#5668)
* fuzz: add the capability to pipe info into fuzz * address the comments * show the piped message if any
This commit is contained in:
parent
6510115d9e
commit
546201bd00
7 changed files with 101 additions and 31 deletions
|
@ -59,9 +59,9 @@ fuzz_target!(|_data: &[u8]| {
|
|||
let echo_input = generate_echo();
|
||||
let mut args = vec![OsString::from("echo")];
|
||||
args.extend(echo_input.split_whitespace().map(OsString::from));
|
||||
let rust_result = generate_and_run_uumain(&args, uumain);
|
||||
let rust_result = generate_and_run_uumain(&args, uumain, None);
|
||||
|
||||
let gnu_result = match run_gnu_cmd(CMD_PATH, &args[1..], false) {
|
||||
let gnu_result = match run_gnu_cmd(CMD_PATH, &args[1..], false, None) {
|
||||
Ok(result) => result,
|
||||
Err(error_result) => {
|
||||
eprintln!("Failed to run GNU command:");
|
||||
|
@ -78,6 +78,7 @@ fuzz_target!(|_data: &[u8]| {
|
|||
compare_result(
|
||||
"echo",
|
||||
&format!("{:?}", &args[1..]),
|
||||
None,
|
||||
&rust_result,
|
||||
&gnu_result,
|
||||
true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue