-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat(kcov): add code coverage support for tests + fuzzers #193
Conversation
example coverage run https://github.com/Syndica/sig/actions/runs/9896446984/job/27338682812?pr=193 |
…#195) * running kcov on the unit tests lead to finding important code paths we werent testing - this pr adds these units tests - this includes tests for both gossip and accounts-db
* add fuzz testing for the gossip table
note: the two prs merged (in the last two commits) were built off of this main pr - so i merged them to make review easier the summary of the two prs include:
|
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.
A few style and correctness suggestions.
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.
One final small review & inquiries of some stylistic & correctness details. After this pass-over I'm happy.
Also, I think it would be good to dedicate a separate PR for porting the shell scripts to zig, to avoid delaying the merge of the rest of these already extremely valuable changes due to potential hiccups in that process.
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.
Couple of instances where I think it would be nicer to use durations rather than raw ints, or if using raw ints ensure that the units are clear from the value name, other than that looks good to me.
docs/fuzzing.md
scripts/kcov_test.sh
for how to run kcov on teststhe goal is to use code coverage to improve pr reviews and understand where things are and aren't being tested - not as a metric to optimize to 100% coverage
TODO: move sh scripts to the zig system