Page MenuHomePhabricator

Make the fuzzer test runner compatible with cmake

Authored by Fabien on Tue, Mar 17, 15:34.



The current implementation of the fuzzer test runner reads the
Makefile.test.include to extract a list of the fuzz targets that it
can run.
This diff makes it explore the actually built binaries instead, so it
can work with both autotools and cmake.

Creating a link at build time with autotools makes it easier to run with
out-of-tree builds.

Depends on D4629.

Test Plan
export CC=clang CXX=clang++
../configure --enable-fuzz --with-sanitizers=fuzzer,address \
  --disable-wallet \
  --disable-bench \
  --with-utils=no \
  --with-daemon=no \
  --with-libs=no \
  --with-gui=no \
./test/fuzz/ -l DEBUG <path_to_corpus>
cmake -GNinja .. -DENABLE_SANITIZERS="address;fuzzer" \
ninja bitcoin-fuzzers
./test/fuzz/ -l DEBUG <path_to_corpus>

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Tue, Mar 17, 15:34
Herald added a reviewer: Restricted Project. · View Herald TranscriptTue, Mar 17, 15:34
deadalnix requested changes to this revision.Thu, Mar 19, 00:39
deadalnix added a subscriber: deadalnix.

Looks like there is some duplication with the test runner.

This revision now requires changes to proceed.Thu, Mar 19, 00:39
deadalnix accepted this revision.Thu, Mar 19, 13:15
This revision is now accepted and ready to land.Thu, Mar 19, 13:15
This revision was automatically updated to reflect the committed changes.