Page MenuHomePhabricator

Make the fuzzer test runner compatible with cmake
ClosedPublic

Authored by Fabien on Mar 17 2020, 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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

deadalnix requested changes to this revision.Mar 19 2020, 00:39
deadalnix added a subscriber: deadalnix.

Looks like there is some duplication with the test runner.

This revision now requires changes to proceed.Mar 19 2020, 00:39
This revision is now accepted and ready to land.Mar 19 2020, 13:15