Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo fuzz list does not show targets auto-discovered by cargo #363

Open
mauricelam opened this issue Feb 21, 2024 · 0 comments
Open

cargo fuzz list does not show targets auto-discovered by cargo #363

mauricelam opened this issue Feb 21, 2024 · 0 comments

Comments

@mauricelam
Copy link

I have a project with the following structure:

project $ tree -I target -I artifacts -I corpus
.
├── Cargo.lock
├── Cargo.toml
├── fuzz
│   ├── Cargo.lock
│   ├── Cargo.toml
│   └── src
│       └── bin
│           ├── fuzz_test_1.rs
│           └──fuzz_test_2.rs
└── src
    └── lib.rs

where the fuzz_test_* files are placed in src/bin instead of the default fuzz_targets directory. Cargo can discover those targets automatically, as described in https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery.

cargo fuzz run fuzz_test_1 also works correctly.

But when I run cargo fuzz list, the returned result is empty.

I have to manually add entries to fuzz/Cargo.toml to let cargo fuzz list discover it.

[[bin]]
name = "fuzz_test_1"
[[bin]]
name = "fuzz_test_2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant