readme: fix running loom tests guide (#6408)

This commit is contained in:
M.Amin Rayej 2024-03-17 14:57:31 +03:30 committed by GitHub
parent b2896feb5b
commit bd51feac47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -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
```

View File

@ -1,3 +1,5 @@
#![cfg(tokio_unstable)]
mod queue;
mod shutdown;
mod yield_now;