multipart seed reading

This commit is contained in:
Alwin Berger 2024-08-14 08:42:33 +02:00
parent 3db17ceb98
commit 920a996d95

View File

@ -510,7 +510,13 @@ let run_client = |state: Option<_>, mut mgr, _core_id| {
// } else { // } else {
// // fs::read(s).expect("Input file for DO_SHOWMAP can not be read") // // fs::read(s).expect("Input file for DO_SHOWMAP can not be read")
// }); // });
let show_input = MultipartInput::from_file(input.as_os_str()).expect("Error reading input file"); let show_input = match MultipartInput::from_file(input.as_os_str()) {
Ok(x) => x,
Err(_) => {
println!("Interpreting input file as raw input");
MultipartInput::from([("interrupts",BytesInput::new([0; MAX_NUM_INTERRUPT].to_vec())),("bytes",BytesInput::new(input.as_os_str().as_encoded_bytes().to_vec()))])
}
};
fuzzer.evaluate_input(&mut state, &mut executor, &mut mgr, show_input) fuzzer.evaluate_input(&mut state, &mut executor, &mut mgr, show_input)
.unwrap(); .unwrap();
do_dump_times!(state, &cli, ""); do_dump_times!(state, &cli, "");