Repository navigation
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.
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 |
marcofleon
left a comment
There was a problem hiding this comment.
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.
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:GetKeyandHasPrivKeyafter adding descriptor key.GetEndRangeandGetKeyPoolSize.MarkUnusedAddresseswith the scripts from ScriptPubKeys andGetMetadatawith the destinations from them.