Phony fuzzing (phuzzing)! Run the fuzz testing code against known inputs to detect errors. Advantage is you can easily test using the existing qa-assets datasets without having to compile with fuzzing enabled; disadvantage is that it doesn’t do any actual fuzzing.
Example usage:
0$ for a in ${QA_ASSETS}/fuzz_seed_corpus/*; do echo ${a##*/}; done | xargs -P8 -I {} /bin/sh -c "FUZZ={} test/fuzz/fuzz ${QA_ASSETS}/fuzz_seed_corpus/{}"
1No fuzzer for address_deserialize.
2No fuzzer for addrdb.
3No fuzzer for banentry_deserialize.
4addition_overflow: succeeded against 848 files in 0s.
5asmap: succeeded against 981 files in 0s.
6checkqueue: succeeded against 211 files in 0s.
7...
(-P8
says run 8 of the tasks in parallel)
If there are failures, the first one will be reported and the program will abort with output like:
0fuzz: test/fuzz/versionbits.cpp:336: void (anonymous namespace)::versionbits_fuzz_target(FuzzBufferType): Assertion `exp_state != ThresholdState::FAILED' failed.
1Error processing seed "corpus/versionbits/35345ae8e722234095810b1117a29b63af7621af"
Rebase of #22763, which was a rebase of #21496, but also reports the name of the fuzzer and the time taken.
Fixes #21461