$ cargo install cargo-test-fuzz --version '>=0.1.0-alpha'
Identify a fuzz target:
dependencies
to the target crate's Cargo.toml
file:
toml
serde = "1.0"
test-fuzz = "0.1.0-alpha"
use
declaration to the target file or module:
rust
use test_fuzz::test_fuzz;
test_fuzz
attribute:
rust
#[test_fuzz]
fn foo(...) {
...
}
Generate a corpus by running cargo test
:
$ cargo test
Fuzz your target by running cargo test-fuzz
:
$ cargo test-fuzz --target foo
test_fuzz
attributeTODO
force
- TODO
rename = "name"
- TODO
skip
- TODO
test_fuzz_impl
attributeTODO
test_fuzz_impl
currently has no options.
cargo test-fuzz
commandTODO
-- <args>...
- TODO
--backtrace
- TODO
--display-corpus
- TODO
--display-crashes
- TODO
--display-queue
- TODO
--exact
- TODO
--list
- TODO
--no-instrumentation
- TODO
--no-run
- TODO
--no-ui
- TODO
--persistent
- TODO
--pretty-print
- TODO
--replay-corpus
- TODO
--replay-crashes
- TODO
--replay-queue
- TODO
--resume
- TODO
-p, --package = <package>
- TODO
--target = <target>
- TODO
test_fuzz
crateTODO
logging
- TODO
persistent
- TODO
Clonable arguments - TODO
Seralizable arguments - TODO
Global variables - TODO
Type parameters - TODO