Skip to content

cargo-test-fuzz v6 does not detect test-fuzz v7 harnesses #547

@0xalpharush

Description

@0xalpharush

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 = "*" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions