Page MenuHomePhabricator

Make the fuzzer test runner compatible with cmake
ClosedPublic

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

Details

Summary

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 \
  --with-seeder=no
make
./test/fuzz/test_runner.py -l DEBUG <path_to_corpus>
cmake -GNinja .. -DENABLE_SANITIZERS="address;fuzzer" \
  -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
ninja bitcoin-fuzzers link-fuzz-test_runner.py
./test/fuzz/test_runner.py -l DEBUG <path_to_corpus>

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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.