tests: add libFuzzer based tests
authorPetr Štetiar <ynezz@true.cz>
Sun, 8 Dec 2019 14:11:02 +0000 (15:11 +0100)
committerPetr Štetiar <ynezz@true.cz>
Wed, 25 Dec 2019 09:31:58 +0000 (10:31 +0100)
commit436d6363a10bbb41ab92602b4eb0030992bb1785
tree8ae96268433e5f772b03c48170e4fa2c6bde6e54
parentbf680707acfdadcd6301657448dcf3bd8c8fa60c
tests: add libFuzzer based tests

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.

Lets use libFuzzer to fuzz blob and blobmsg parsing for the start.

Ref: https://llvm.org/docs/LibFuzzer.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
tests/CMakeLists.txt
tests/fuzz/CMakeLists.txt [new file with mode: 0644]
tests/fuzz/corpus/71520a5c4b5ca73903216857abbad54a8002d44a [new file with mode: 0644]
tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278 [new file with mode: 0644]
tests/fuzz/corpus/c42ac1c46f1d4e211c735cc7dfad4ff8391110e9 [new file with mode: 0644]
tests/fuzz/corpus/valid-blobmsg.bin [new file with mode: 0644]
tests/fuzz/test-fuzz.c [new file with mode: 0644]