loiclec / fuzzcheck-rs

Modular, structure-aware, and feedback-driven fuzzing engine for Rust functions
MIT License
436 stars 13 forks source link

View line coverage #13

Closed binier closed 2 years ago

binier commented 3 years ago

Is there a way to view line coverage after running a fuzzer? For example with LCOV http://ltp.sourceforge.net/coverage/lcov.php

image

loiclec commented 3 years ago

AFAIK, I have all the information to create a coverage report for each test case (or all test case combined). But I still need to write that functionality, it is a work in progress.

loiclec commented 3 years ago

To be clear, I have always wanted to have that feature, but I am hesitating on the best way to design it. I think in about a month, I should have a first version of it released :)

binier commented 3 years ago

Thanks for quick responses :) Sounds great.

loiclec commented 3 years ago

I’m very late to it, but I am finally making a code coverage viewer for fuzzcheck :)

I am writing some details of how it would work here so that anybody can comment on the scope or design, or ask for feature requests.

The idea is:

First, fuzzcheck will write additional files at the end of each fuzzing run under the ./fuzz/<fuzz_target>/stats/<timestamp>/ folder. The code coverage viewer will read the ./fuzz/<fuzz_target>/stats/<latest_timestamp>/ folder and then serve an interactive webpage located at localhost:8000. This is what the page looks like: Screenshot 2021-10-22 at 12 42 43

That is what I have for now :)

loiclec commented 3 years ago

Not a lot has changed since last week, it is essentially the same. But I have put the tool online here: https://github.com/loiclec/fuzzcheck-view

loiclec commented 3 years ago

oops, but I should say that I haven't yet published to crates.io the version of fuzzcheck that saves all the necessary files that fuzzcheck-view uses. It's only on GitHub for now

teymour-aldridge commented 2 years ago

Is the latest version of fuzzcheck-view compatible with the latest version of fuzzcheck?

loiclec commented 2 years ago

I pushed a tiny update to fuzzcheck-view today that solves one incompatibility, but I need to look properly at it tomorrow. So... maybe?