tests: add libFuzzer based fuzzing
authorPetr Štetiar <ynezz@true.cz>
Fri, 2 Oct 2020 23:53:53 +0000 (01:53 +0200)
committerPetr Štetiar <ynezz@true.cz>
Sat, 3 Oct 2020 07:20:48 +0000 (09:20 +0200)
commit9bd361ca323637b047ecfdf5de3c8cfbf64698d6
tree666c966af10fd2eae243fcd9361768caf6da38a9
parentec8d3233948603485e1b97384113fac9f1bab5d6
tests: add libFuzzer based fuzzing

LibFuzzer is in-process, coverage-guided, evolutionary fuzzing engine.

LibFuzzer is linked with the library under test, and feeds fuzzed inputs
to the library via a specific fuzzing entrypoint (aka "target
function"); the fuzzer then tracks which areas of the code are reached,
and generates mutations on the corpus of input data in order to maximize
the code coverage.

So lets use libFuzzer to fuzz uci_import for the start.

Ref: https://llvm.org/docs/LibFuzzer.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
15 files changed:
tests/CMakeLists.txt
tests/fuzz/CMakeLists.txt [new file with mode: 0644]
tests/fuzz/corpus/231ee80a172b8e1749b9d91867989d88e4faf7bb [new file with mode: 0644]
tests/fuzz/corpus/26a6253fc1eb695b61a2fc7640ee4c03c19e438e [new file with mode: 0644]
tests/fuzz/corpus/29a6e206439d792afba5e8e9c1fdf55e65a1145d [new file with mode: 0644]
tests/fuzz/corpus/51045ac5401085f5727c6d3c1cac5f8cc32a2927 [new file with mode: 0644]
tests/fuzz/corpus/845dcf3f15f3c28235e6be148a690e7f03b07f65 [new file with mode: 0644]
tests/fuzz/corpus/bb589d0621e5472f470fa3425a234c74b1e202e8 [new file with mode: 0644]
tests/fuzz/corpus/ea387894a296772f96706df8b999a52d9334c746 [new file with mode: 0644]
tests/fuzz/corpus/id:000000,sig:11,src:000001,op:flip1,pos:24 [new file with mode: 0644]
tests/fuzz/corpus/id:000008,sig:11,src:000022,op:arith8,pos:42,val:+26 [new file with mode: 0644]
tests/fuzz/dict/uci.dict [new file with mode: 0644]
tests/fuzz/inputs/dhcp [new file with mode: 0644]
tests/fuzz/inputs/firewall [new file with mode: 0644]
tests/fuzz/test-fuzz.c [new file with mode: 0644]