How do I get coverage data from a fuzz test?

Ian Brockbank 0 Reputation points
2024-08-19T11:35:24.7966667+00:00

I have implemented a fuzz test in Visual Studio using /fsanitize=fuzzer /fsanitize=address.

Since the LLVM fuzzing engine uses coverage to direct the fuzz-testing, it should be able to output this as an artefact of the test run.

When I did this in a previous project using a clang build, I was able to get coverage data out using llvm-cov. This doesn't seem to work with this project built with Visual Studio/msvc++.

Since this is for automated testing, I really need a method that works from the command line, which I can wrap in a script.

How can I generate a coverage report from the fuzzer in Visual Studio?

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.