Add independent coverage directory configuration option#1428
Add independent coverage directory configuration option#1428gustavo-grieco merged 5 commits intocrytic:masterfrom
Conversation
- Add coverageDir field to CampaignConf type - Add coverageDir parsing in config YAML files - Add --coverage-dir CLI option with fallback to --corpus-dir - Update Main.hs to use coverageDir with corpus fallback logic - Remove unused filepath dependency from test suite
- Add config parsing tests for corpusDir and coverageDir - Add test helpers for coverage directory validation - Add integration tests for coverage fallback behavior - Add test configuration files for coverage scenarios
|
@arcz Could you please take a look at this when you have a chance? Let me know if any further action is needed. |
|
I think the code looks fine in general but I'm wondering about the use case. Why exactly you need the fuzzer to write the reports elsewhere? |
|
First of all, this PR addresses the TODO in the codebase: Lines 104 to 106 in 9870b1a It separates coverage reports from the corpus directory, which makes things clearer since they serve different purposes. It also gives users more flexibility—for example, someone tracking coverage over time in version control can now keep those reports cleanly organized by choosing a dedicated path. |
src/test/Common.hs
Outdated
| -- This tests the actual fallback logic: coverageDir <|> corpusDir. | ||
| checkEffectiveCoverageDir :: FilePath -> (Env, WorkerState) -> IO Bool | ||
| checkEffectiveCoverageDir expectedDir (env, _) = do | ||
| let effectiveDir = env.cfg.campaignConf.coverageDir <|> env.cfg.campaignConf.corpusDir |
There was a problem hiding this comment.
This kind of duplicates the same logic you're trying to test, I don't think it adds much value. I think asserting the expected state is enough 👍
Co-authored-by: Emilio López <[email protected]>
Addresses crytic#1428 (comment).
Addresses crytic#1428 (comment).
8fa5c0e to
7b37d96
Compare
|
Oh, btw, I noted that you are first time contributor. Would you like some suggestions on other small issues to address so you can get more exposure to the code? |
|
@gustavo-grieco Thanks, I’d be glad to help when time permits. I’m very interested in fuzzing tools. In fact, together with @moodmosaic, I built a similar tool for the Stacks blockchain called Rendezvous. In its Foreword, we made sure to credit Echidna 🙂 |
|
Merged! It is great to see people inspired by our code! BTW, if you want to discuss some next steps or potential collaboration hit me on Telegram |
This PR adds a new
coverageDirconfiguration option that allows users to specify a separate directory for saving coverage reports, independent from the corpus directory.Previously, coverage reports were saved to the corpus directory, which mixed different types of output files. This PR introduces a dedicated configuration option with automatic fallback to maintain backward compatibility.
Usage Example