projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix onion messages of size BIG_PACKET_HOP_DATA_LEN
[rust-lightning]
/
fuzz
/
src
/
bin
/
msg_funding_signed_target.rs
diff --git
a/fuzz/src/bin/msg_funding_signed_target.rs
b/fuzz/src/bin/msg_funding_signed_target.rs
index c1b756fe673ba6cc4be9074a8c82d9a4e0a738fa..bfee1f5aee934cfe4dd2084231d4ea9beda37cb8 100644
(file)
--- a/
fuzz/src/bin/msg_funding_signed_target.rs
+++ b/
fuzz/src/bin/msg_funding_signed_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_funding_signed::*;
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_funding_signed::*;
@@
-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!();
}
}
}
}