-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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 more coverage for ScriptPubKeyMan
#30134
fuzz: add more coverage for ScriptPubKeyMan
#30134
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
e6f89cc
to
e3249f2
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.
I generated a coverage report for the current ScriptPubKeyMan
harness and for the updated harness in this PR.
So more coverage in scriptpubkeyman.cpp
but it seems less total coverage when running the indivdual harness. My question here is do the totals matter when fuzzing a single target. Because there are probably other harnesses that would hit those other files (other than scriptpubkeyman.cpp
).
Basically, does total coverage only matter when generating a report from fuzzing all the targets?
@marcofleon It's good to mention how you run it. How many hours? From seed corpus (note that changes can invalidate it)? |
Got it, thanks @brunoerg. I'll redo and get back to you then. I also realized I was looking at the wrong line in the coverage report. I should probably be looking at |
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.
Tested ACK e3249f2. I ran the updated harness for ~9 hours on an empty corpus, generated a coverage report, and checked that the new functions mentioned were hit. Coverage of scriptpubkeyman.cpp
increased.
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.
Tested ACK e3249f2
I also fuzzed a bit: I ran a recent commit of the master
branch and this PR’s e3249f2 against qa-assets:HEAD
and then again after fuzzing about 12 CPU hours on top of qa-assets:HEAD
.
qa-assets |
qa-assets + fuzzing |
|
---|---|---|
master |
cov: 16525 ft: 96185 | cov: 16874 ft: 104431 |
#30134: e3249f2 | cov: 17095 ft: 83926 | cov: 17699 ft: 98966 |
This PR increases the coverage with the existing seeds and further improves even after light fuzzing.
This PR adds more coverage for
ScriptPubKeyMan
:GetKey
andHasPrivKey
after adding descriptor key.GetEndRange
andGetKeyPoolSize
.MarkUnusedAddresses
with the scripts from ScriptPubKeys andGetMetadata
with the destinations from them.