diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 623efd133..240b08be6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -184,9 +184,11 @@ it, `rustfmt` will update your files locally instead. You can run loom tests with ``` cd tokio # tokio crate in workspace -LOOM_MAX_PREEMPTIONS=1 RUSTFLAGS="--cfg loom" \ +LOOM_MAX_PREEMPTIONS=1 LOOM_MAX_BRANCHES=10000 RUSTFLAGS="--cfg loom -C debug_assertions" \ cargo test --lib --release --features full -- --test-threads=1 --nocapture ``` +Additionally, you can also add `--cfg tokio_unstable` to the `RUSTFLAGS` environment variable to +run loom tests that test unstable features. You can run miri tests with ``` diff --git a/tokio/src/runtime/tests/loom_multi_thread_alt.rs b/tokio/src/runtime/tests/loom_multi_thread_alt.rs index 1b9c3b477..c8d140e09 100644 --- a/tokio/src/runtime/tests/loom_multi_thread_alt.rs +++ b/tokio/src/runtime/tests/loom_multi_thread_alt.rs @@ -1,3 +1,5 @@ +#![cfg(tokio_unstable)] + mod queue; mod shutdown; mod yield_now;