projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2725 from shaavan/issue2096
[rust-lightning]
/
fuzz
/
src
/
bin
/
msg_reply_channel_range_target.rs
diff --git
a/fuzz/src/bin/msg_reply_channel_range_target.rs
b/fuzz/src/bin/msg_reply_channel_range_target.rs
index 283ac0d466237e0381fe9c3c9f4d4c56d8d9a584..0cddbcaf83de9a796f5c7bd680e5258252c754a0 100644
(file)
--- a/
fuzz/src/bin/msg_reply_channel_range_target.rs
+++ b/
fuzz/src/bin/msg_reply_channel_range_target.rs
@@
-12,6
+12,9
@@
#![cfg_attr(feature = "libfuzzer_fuzz", no_main)]
#![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_reply_channel_range::*;
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_reply_channel_range::*;
@@
-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() {
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!();
}
}
}
}