I ran cargo add test-fuzz with cargo-test-fuzz v6 installed and it was causing the harness not to be picked up by cargo test-fuzz --list. It works if I use test-fuzz = "6" or upgrade cargo-test-fuzz to v7. Not sure if there's a solution to this but maybe it's helpful to a passerby troubleshooting...
lib.rs
#[test_fuzz::test_fuzz(no_auto_generate)]
fn target(n: usize) {
let vec = Vec::<u8>::with_capacity(n);
println!("{:p}", &vec);
}
#[test]
fn test() {
target(0);
}
Cargo.toml
[package]
name = "afl-rust"
version = "0.1.0"
edition = "2021"
[dependencies]
test-fuzz = "7.1.1"
serde = { version = "*" }
I ran
cargo add test-fuzzwith cargo-test-fuzz v6 installed and it was causing the harness not to be picked up bycargo test-fuzz --list. It works if I usetest-fuzz = "6"or upgrade cargo-test-fuzz to v7. Not sure if there's a solution to this but maybe it's helpful to a passerby troubleshooting...lib.rs
Cargo.toml