mirror of https://github.com/status-im/nim-eth.git
Update fuzzing readme.md
This commit is contained in:
parent
4dd7ca1221
commit
38bf21b4f7
|
@ -1,8 +1,11 @@
|
||||||
# Fuzzing Tests
|
# Fuzzing Tests
|
||||||
The fuzzing tests use the fuzzing templates from `nim-testutils`.
|
This directory contains a set of subdirectories which hold one or more test cases that can be used for fuzzing.
|
||||||
|
The fuzzing test cases use the fuzzing templates from `nim-testutils`.
|
||||||
|
|
||||||
For more details see [the fuzzing readme of nim-testutils](https://github.com/status-im/nim-testutils/tree/master/testutils/fuzzing).
|
For more details see [the fuzzing readme of nim-testutils](https://github.com/status-im/nim-testutils/tree/master/testutils/fuzzing).
|
||||||
|
|
||||||
|
Some of the subdirectories also hold corpus generation tooling in order to have some corpus files to start fuzzing from.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
As [explained](https://github.com/status-im/nim-testutils/tree/master/testutils/fuzzing#supported-fuzzers)
|
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.
|
in `nim-testutils` fuzzing readme, first install the fuzzer you want to run.
|
||||||
|
@ -17,8 +20,20 @@ nimble install testutils
|
||||||
## How to run
|
## How to run
|
||||||
To start fuzzing a test case run following command:
|
To start fuzzing a test case run following command:
|
||||||
```sh
|
```sh
|
||||||
# For libFuzzer
|
# Rlp fuzzing with libFuzzer
|
||||||
ntu fuzz --fuzzer:libFuzzer rlp/rlp_inspect
|
ntu fuzz --fuzzer:libFuzzer rlp/rlp_decode
|
||||||
# For afl
|
# Rlp fuzzing with afl
|
||||||
ntu fuzz --fuzzer:afl rlp/rlp_inspect
|
ntu fuzz --fuzzer:afl rlp/rlp_decode
|
||||||
```
|
```
|
||||||
|
Or another example:
|
||||||
|
```sh
|
||||||
|
# ENR fuzzing with libFuzzer
|
||||||
|
ntu fuzz --fuzzer:libFuzzer enr/fuzz_enr
|
||||||
|
# ENR fuzzing with afl
|
||||||
|
ntu fuzz --fuzzer:afl enr/fuzz_enr
|
||||||
|
```
|
||||||
|
|
||||||
|
## Manual adjustments
|
||||||
|
The `ntu` application is still very limited in its functionality. Many of the underlying fuzzer functionality is not available for adjustment so you might want to configure the setup in a more manual way.
|
||||||
|
|
||||||
|
How to do this is briefly explained [here for afl](https://github.com/status-im/nim-testutils/blob/master/testutils/fuzzing/readme.md#manually-with-afl) and [here for libFuzzer](https://github.com/status-im/nim-testutils/blob/master/testutils/fuzzing/readme.md#manually-with-libfuzzer).
|
||||||
|
|
Loading…
Reference in New Issue