X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=fuzz%2Fsrc%2Fbin%2Fmsg_channel_reestablish_target.rs;h=ba1a76d9941eab3e1b596afc619d1395f1d3b83e;hb=d355ce1b78164d34a59c93b36c064f96462696a4;hp=5d8d028684cebf09dc399afcd7fd2d38d4fa6519;hpb=4395b92cc8bfe0cc803e70bba11f4db58d5d0dbf;p=rust-lightning diff --git a/fuzz/src/bin/msg_channel_reestablish_target.rs b/fuzz/src/bin/msg_channel_reestablish_target.rs index 5d8d0286..ba1a76d9 100644 --- a/fuzz/src/bin/msg_channel_reestablish_target.rs +++ b/fuzz/src/bin/msg_channel_reestablish_target.rs @@ -12,6 +12,9 @@ #![cfg_attr(feature = "libfuzzer_fuzz", no_main)] +#[cfg(not(fuzzing))] +compile_error!("Fuzz targets need cfg=fuzzing"); + extern crate lightning_fuzz; use lightning_fuzz::msg_targets::msg_channel_reestablish::*; @@ -93,10 +96,18 @@ fn run_test_cases() { } } } + let mut failed_outputs = Vec::new(); for (test, thread) in threads.drain(..) { if let Some(output) = thread.join().unwrap() { - println!("Output of {}:\n{}", test, output); - panic!(); + println!("\nOutput of {}:\n{}\n", test, output); + failed_outputs.push(test); + } + } + if !failed_outputs.is_empty() { + println!("Test cases which failed: "); + for case in failed_outputs { + println!("{}", case); } + panic!(); } }