-
Notifications
You must be signed in to change notification settings - Fork 16
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 tooling for generating coverage #293
Comments
I think it should be not-to-hard to implement something like this.
We would have to insist that the user has installed One thing I am uncertain about is: what is the best interface for specifying the toolchain? My understanding is that One approach could be to check whether the current Please let me know if what I've written is significantly different from what you were imagining. |
That sounds good!
I also think that is fine. We just have to pass the essential options along. cargo-fuzz currently just generates a profdata file and then you are supposed to work this that. I think this may be preferable over actually generating HTML reports, so users still have control.
I will test that. Something was stabilized around ~1.60 with regards to coverage.
cargo-fuzz also requires nightly. So maybe we can check how they do it. I belive a major blocker with the approach you mentinoed is that LLVM will overwrite the profile data. So if you rerun a binary, all the previous data is lost. So either you collect many files and then combine them or run all tests in one single binary. I feel like the first approach works better and only relies on some temporary storage. |
I don't know how But your overall point that this idea requires further investigation is certainly on the mark. |
I just experimented a little bit with With cargo fuzz the target directory is in I got it working using the following environment:
Then I did from the
I'm continuing now to see how to integrate it into test-fuzz. |
🙌 |
Also got it working 🎉
The report looks slightly weird though: |
It would be great to have tooling like "cargo fuzz coverage ", that creates a binary with coverage instrumentation, then runs it on the corpus and generates an LLVM .profdata file.
This can then be used to generate an HTML report using:
From my perspective this is maybe one of the last key things that are missing from test-fuzz that are available in cargo-fuzz.
The text was updated successfully, but these errors were encountered: