| 1 | # Fuzz Tests |
| 2 | |
| 3 | Requires nightly Rust and `cargo-fuzz`: |
| 4 | |
| 5 | ```sh |
| 6 | cargo install cargo-fuzz |
| 7 | ``` |
| 8 | |
| 9 | ## Run |
| 10 | |
| 11 | ```sh |
| 12 | # Run indefinitely (Ctrl+C to stop) |
| 13 | cargo +nightly fuzz run fuzz_cert_parse |
| 14 | |
| 15 | # Run for a fixed duration |
| 16 | cargo +nightly fuzz run fuzz_cert_parse -- -max_total_time=60 |
| 17 | |
| 18 | # Run with multiple parallel jobs |
| 19 | cargo +nightly fuzz run fuzz_cert_parse --jobs 31 |
| 20 | ``` |
| 21 | |
| 22 | ## List targets |
| 23 | |
| 24 | ```sh |
| 25 | cargo +nightly fuzz list |
| 26 | ``` |
| 27 | |
| 28 | ## Reproduce a crash |
| 29 | |
| 30 | ```sh |
| 31 | cargo +nightly fuzz run fuzz_cert_parse artifacts/fuzz_cert_parse/<crash_file> |
| 32 | ``` |