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?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,044 questions
{count} votes

Your answer

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