-
Notifications
You must be signed in to change notification settings - Fork 17
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 bolero list
should not need to run the whole test suite
#196
Comments
|
@camshaft What do you think of this solution? It sounds reasonable to me, the only drawback being that the test name is no longer as free as a unit test, but must end with eg. If going this way, I’d argue that |
Actually it wouldn’t solve the issue, I just tried making a quick prototype, and integration tests are run regardless of what filter is passed to |
Ah, right, this is something that will happen with custom harnesses. I wonder what nextest does here, since it seems to be able to list tests without running them despite the |
Ah, https://nexte.st/book/custom-test-harnesses.html is the documentation on the interface here. Would it be too terrible to require a similar interface for bolero? |
See discussion at [1]. Here, the solution is what would be a bad solution for bolero upstream (because it no longer works with un-harnessed fuzzers), but is fine enough for our use case. [1] camshaft/bolero#196
See discussion at [1]. Here, the solution is what would be a bad solution for bolero upstream (because it no longer works with un-harnessed fuzzers), but is fine enough for our use case. [1] camshaft/bolero#196
I still think the most reliable method would be putting the harnesses in a custom linker section. Unfortunately, the I'd prefer not to enforce naming conversations, TBH. That being said, one thing we can do in the short term is allow the caller to pass a filter to the list command, similar to what you've done in Ekleog-NEAR@8f4e49d, defaulting to no filter. This would allow folks that do have a naming convention to just target bolero harnesses. |
I remember discussing this at some point, but somehow cannot find it in github any longer, so I’m opening this issue to track it :)
cargo bolero list
currently needs to run the whole test suite to find the fuzzers.This is suboptimal. A possible solution would be:
bolero::check!()
with a#[bolero::test]
annotationcargo test
, also adds a magic value to a specific segment of the ELF binarycargo bolero list
builds the binaries just like for fuzzing (this’d also remove one more compilation step, as list then test currently needs two compilations), and then reads these segments to list the fuzzerscargo bolero list
will probably need to depend ongoblin
or similar, in order to implement this.The text was updated successfully, but these errors were encountered: