-
Notifications
You must be signed in to change notification settings - Fork 422
fuzz: add fuzz target for BlindedMessagePath
#3879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fuzz: add fuzz target for BlindedMessagePath
#3879
Conversation
|
👋 Thanks for assigning @TheBlueMatt as a reviewer! |
fuzz/src/blinded_path_deser.rs
Outdated
| #[no_mangle] | ||
| pub extern "C" fn blinded_path_deser_run(data: *const u8, datalen: usize) { | ||
| do_test(unsafe { std::slice::from_raw_parts(data, datalen) }, test_logger::DevNull {}); | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a newline character at the end of the file. The file currently ends without a newline, which is indicated by the \ at the end of line 30.
| } | |
| } | |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
|
🔔 1st Reminder Hey @jkczyz! This PR has been waiting for your review. |
|
🔔 2nd Reminder Hey @jkczyz! This PR has been waiting for your review. |
jkczyz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though note we would cover this as part of BOLT12 message fuzzing.
TheBlueMatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Rather than doing this by manually writing out a fuzzer, this one might be easier by just adding an entry in fuzz/src/msg_targets/gen_target.sh.
90b64c0 to
f4098cd
Compare
Adds fuzz target for BlindedMessagePath that implements `Readable` to check for correct deserialisation
f4098cd to
ec692f9
Compare
|
Used the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3879 +/- ##
==========================================
- Coverage 88.90% 88.89% -0.01%
==========================================
Files 165 165
Lines 119158 119158
Branches 119158 119158
==========================================
- Hits 105941 105930 -11
- Misses 10897 10907 +10
- Partials 2320 2321 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
TheBlueMatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| GEN_TEST lightning::ln::msgs::SpliceAck test_msg_simple "" | ||
| GEN_TEST lightning::ln::msgs::SpliceLocked test_msg_simple "" | ||
|
|
||
| GEN_TEST lightning::blinded_path::message::BlindedMessagePath test_msg_simple "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a proper editor that includes trailing EOL at the end of files :). No idea what text editor is even so broken that it doesn't :)
Many upper level structs implementing
Readabledon't have fuzz coverage because of no fuzz targets created for them . This PR is one of the efforts to add Fuzz target forBlindedMessagePathone of the struct that implementsReadabletrait.