-
Notifications
You must be signed in to change notification settings - Fork 12
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
Switch to cargo-fuzz #261
base: master
Are you sure you want to change the base?
Switch to cargo-fuzz #261
Conversation
Can you update the lockfiles as suggested by CI?
What kind of warnings? |
|
8b3c16d
to
410fb6f
Compare
I fixed the normal CI, but the fuzz test CI seems to be disabled. Investigating. |
32591e2
to
3625437
Compare
The file is not executed yet. I upgraded upload-artifact and download-artifact from v3 to v4 because v3 has been deprecated and automatically fails. I upgraded cache from v3 to v4 because v3 is scheduled for deprecation on 2025-02-01.
`bash fuzz/generate.sh` `cargo update && cp Cargo.lock Cargo-recent.lock` using the MSRV-aware resolver from Rust 1.84.0: https://blog.rust-lang.org/2025/01/09/Rust-1.84.0.html Rewrite each fuzz target to work with cargo-fuzz. Crash seeds are displayed in base 64, so use that inside duplicate_crash() tests. cargo-fuzz has special entry points for its fuzz tests, which is why every fuzz target is prefixed with #![no_main]. However, this breaks our unit tests that live inside the same file, presumably because unit tests need a normal entry point. My solution is conditionally include the fuzzing code when the `fuzzing` flag is set. This works with `cargo-fuzz run` and with cargo test for the unit tests. Unfortunately, `fuzzing` seems to be a nonstandard flag which produces a warning. The absence of a main method also breaks `cargo clippy` inside the `fuzz` directory. I will post the commit as is so we can discuss solutions on GitHub.
Use cargo-fuzz instead of hongfuzz. Make the scripts more readable.
We switched to cargo-fuzz and no longer need this.
3625437
to
4837317
Compare
Fuzzing CI works now :) I had to update the upload-artifact and download-artifact actions because of deprecation. I also updated the cache action because it will be deprecated soon. |
Adapt the fuzzing infrastructure to use cargo-fuzz. I keep the existing shell scripts because they turned out to be useful.
Everything should work as before, except that the
fuzzing
flag is producing warnings when the tests are run. Let's discuss solutions here.