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

Run loom tests in oss-fuzz #6208

Open
Darksonn opened this issue Dec 10, 2023 · 0 comments
Open

Run loom tests in oss-fuzz #6208

Darksonn opened this issue Dec 10, 2023 · 0 comments
Labels
A-ci Area: The continuous integration setup A-tokio Area: The main tokio crate E-hard Call for participation: Experience needed to fix: Hard / a lot E-help-wanted Call for participation: Help is requested to fix this issue.

Comments

@Darksonn
Copy link
Contributor

We already have a few fuzz tests running in oss-fuzz, but it's pretty minimal (see #5391). I think a really good candidate for expanding our fuzz test coverage would be our loom tests.

Loom normally runs the model checker exhaustively, but if the model becomes too large to do that, you can use the LOOM_MAX_PREEMPTIONS and LOOM_MAX_BRANCHES options to reduce the search space (see large models). And in the Tokio CI, we have to enable those settings:

env:
RUSTFLAGS: -Dwarnings --cfg loom --cfg tokio_unstable -C debug_assertions
LOOM_MAX_PREEMPTIONS: 2
LOOM_MAX_BRANCHES: 10000
RUST_BACKTRACE: 1
# Change to specific Rust release to pin
rust_stable: stable

To close this gap, we would like to set up our loom tests to accept data as input that determines which execution loom should try, and use that to turn them into fuzz tests that we can run in Google's oss-fuzz program.

Closing this issue will probably involve changes to both loom, Tokio's codebase, and our CI setup. I imagine that the changes to loom will amount to adjusting the existing checkpoint debugging feature.

For mentoring, please ask in Tokio's discord server. You can use the #tokio-dev channel or contact me directly.

@Darksonn Darksonn added E-help-wanted Call for participation: Help is requested to fix this issue. A-tokio Area: The main tokio crate E-hard Call for participation: Experience needed to fix: Hard / a lot A-ci Area: The continuous integration setup labels Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Area: The continuous integration setup A-tokio Area: The main tokio crate E-hard Call for participation: Experience needed to fix: Hard / a lot E-help-wanted Call for participation: Help is requested to fix this issue.
Projects
None yet
Development

No branches or pull requests

1 participant