-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add script/string roundtrip fuzz tests #106
Conversation
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.
Code looks good to me, this is much cleaner and probably much more efficient than my previous targets. I did not test them to compare the coverage though.
I think we should get rid of my EDIT: i wrongly assumed #78 had been merged already!miniscript_decode
if we have miniscript_script
.
@@ -606,7 +592,7 @@ void TestNode(const NodeRef& node, FuzzedDataProvider& provider) | |||
} // namespace | |||
|
|||
/** Fuzz target that runs TestNode on nodes generated using ConsumeNodeStable. */ | |||
FUZZ_TARGET_INIT(miniscript_random_stable, initialize_miniscript_random) | |||
FUZZ_TARGET(miniscript_random_stable) |
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.
Neat.
/* Fuzz tests that test parsing from a script, and roundtripping via script. */ | ||
FUZZ_TARGET(miniscript_script) |
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.
This effectively replaces the The miniscript_decode
target we already have?miniscript_decode
target isn't in master.
3c25782
to
952d025
Compare
Rebased on new #105. |
4006134
to
6065e95
Compare
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.
Apart from the typo in the minscript_string target mentioned above, this looks good to me.
Rebased on top of merged #105, and also addressed:
|
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.
ACK ef71d2c -- just a nit on FuzzInit
not being necessary for one of the targets but no big deal.
ACK c65113d |
033238f Modernize code: use std::optional instead of bool/outarg (Pieter Wuille) Pull request description: Built on top of #106. ACKs for top commit: darosior: ACK 033238f Tree-SHA512: c198e0cc6b6596dcbf98004b50ad7b3d3b51be0fd04f776ff184f4b0f4eafb0e3fedb2b3ffce181014f240106c0e6d30840685417123866c15c7dcb1b150f193
Builds on top of #105.
This adds script and string roundtrip fuzz tests, all in the same source file (reusing some logic), and unified the names of the tests: