2020-06-12 14:19:58 +00:00
|
|
|
# Fuzzing Tests
|
|
|
|
The fuzzing tests use the fuzzing templates from `nim-testutils`.
|
2019-10-08 14:42:24 +00:00
|
|
|
|
2020-06-12 14:19:58 +00:00
|
|
|
For more details see [the fuzzing readme of nim-testutils](https://github.com/status-im/nim-testutils/tree/master/testutils/fuzzing).
|
2019-10-08 14:42:24 +00:00
|
|
|
|
2020-06-12 14:19:58 +00:00
|
|
|
## Prerequisites
|
|
|
|
As [explained](https://github.com/status-im/nim-testutils/tree/master/testutils/fuzzing#supported-fuzzers)
|
|
|
|
in `nim-testutils` fuzzing readme, first install the fuzzer you want to run.
|
2019-10-08 14:42:24 +00:00
|
|
|
|
2020-06-12 14:19:58 +00:00
|
|
|
Next install `nim-testutils` its `ntu` application.
|
2019-10-08 14:42:24 +00:00
|
|
|
|
2020-06-12 14:19:58 +00:00
|
|
|
E.g. by running the `nim-testutils` nimble install:
|
2019-10-08 14:42:24 +00:00
|
|
|
```sh
|
2020-06-12 14:19:58 +00:00
|
|
|
nimble install nim-testutils
|
2019-10-08 14:42:24 +00:00
|
|
|
```
|
|
|
|
|
2020-06-12 14:19:58 +00:00
|
|
|
## How to run
|
|
|
|
To start fuzzing a testcase run following command:
|
2019-10-08 14:42:24 +00:00
|
|
|
```sh
|
2020-06-12 14:19:58 +00:00
|
|
|
# For libFuzzer
|
|
|
|
ntu fuzz --fuzzer:libFuzzer rlp/rlp_inspect
|
|
|
|
# For afl
|
|
|
|
ntu fuzz --fuzzer:afl rlp/rlp_inspect
|
2019-10-08 14:42:24 +00:00
|
|
|
```
|