Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
rust_stable: stable
rust_nightly: nightly-2025-10-12
# Pin a specific miri version
rust_miri_nightly: nightly-2025-11-09
rust_miri_nightly: nightly-2025-11-13
rust_clippy: '1.88'
# When updating this, also update:
# - README.md
Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
cargo miri nextest run --features full --lib --no-fail-fast
working-directory: tokio
env:
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance -Zmiri-retag-fields
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are removing the retag fields argument?

Copy link
Author

@RalfJung RalfJung Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained in the commit message, -Zmiri-retag-fields is the default (and has been the default for a long time already): rust-lang/miri#2985.


miri-test:
name: miri-test
Expand All @@ -395,7 +395,7 @@ jobs:
cargo miri nextest run --features full --test '*' --no-fail-fast
working-directory: tokio
env:
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance -Zmiri-retag-fields
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance

miri-doc:
name: miri-doc
Expand All @@ -414,7 +414,7 @@ jobs:
cargo miri test --doc --features $TOKIO_STABLE_FEATURES --no-fail-fast
working-directory: tokio
env:
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance -Zmiri-retag-fields
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance

asan:
name: asan
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ run loom tests that test unstable features.

You can run miri tests with
```
MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-strict-provenance -Zmiri-retag-fields" \
MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-strict-provenance" \
cargo +nightly miri test --features full --lib --tests
```

Expand Down
4 changes: 2 additions & 2 deletions tokio/src/io/stdio_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(miri, ignore)] // takes a really long time with miri
fn test_splitter() {
let data = str::repeat("█", DEFAULT_MAX_BUF_SIZE);
let mut wr = super::SplitByUtf8BoundaryIfWindows::new(TextMockWriter);
Expand All @@ -191,7 +191,7 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)]
#[cfg_attr(miri, ignore)] // takes a really long time with miri
fn test_pseudo_text() {
// In this test we write a piece of binary data, whose beginning is
// text though. We then validate that even in this corner case buffer
Expand Down
1 change: 1 addition & 0 deletions tokio/src/loom/std/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pub(crate) mod sync {
// internal use. Note however that some are not _currently_ named by
// consuming code.

// Not using parking_lot in Miri due to <https://github.com/Amanieu/parking_lot/issues/477>.
#[cfg(all(feature = "parking_lot", not(miri)))]
#[allow(unused_imports)]
pub(crate) use crate::loom::std::parking_lot::{
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/process/unix/orphan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ pub(crate) mod test {
drop(signal_guard);
}

#[cfg_attr(miri, ignore)] // Miri does not support epoll.
#[cfg_attr(miri, ignore)] // No `sigaction` on Miri
#[test]
fn does_not_register_signal_if_queue_empty() {
let (io_driver, io_handle) = IoDriver::new(1024).unwrap();
Expand Down
1 change: 0 additions & 1 deletion tokio/src/runtime/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ impl Runtime {
/// use std::time::Duration;
///
/// fn main() {
/// # if cfg!(miri) { return } // Miri reports error when main thread terminated without waiting all remaining threads.
/// let runtime = Runtime::new().unwrap();
///
/// runtime.block_on(async move {
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/runtime/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ cfg_not_loom! {
mod inject;
mod queue;

#[cfg(not(miri))]
#[cfg(not(miri))] // takes a really long time with miri
mod task_combinations;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, there's cfg!(miri) logic inside this module, even though the module is disabled on Miri anyway...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably ran it under miri when I wrote the test.


#[cfg(miri)]
Expand Down
2 changes: 0 additions & 2 deletions tokio/tests/io_async_fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,6 @@ async fn multiple_waiters() {
}

#[tokio::test]
// Block on https://github.com/rust-lang/miri/issues/4374
#[cfg_attr(miri, ignore)]
async fn poll_fns() {
let (a, b) = socketpair();
let afd_a = Arc::new(AsyncFd::new(a).unwrap());
Expand Down
2 changes: 1 addition & 1 deletion tokio/tests/process_change_of_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This tests test the behavior of `process::Command::spawn` when it is used
// outside runtime, and when `process::Child::wait ` is used in a different
// runtime from which `process::Command::spawn` is used.
#![cfg(all(unix, not(target_os = "freebsd"), not(miri)))]
#![cfg(all(unix, not(target_os = "freebsd"), not(miri)))] // Miri cannot run system commands

use std::process::Stdio;
use tokio::{process::Command, runtime::Runtime};
Expand Down
2 changes: 1 addition & 1 deletion tokio/tests/process_kill_after_wait.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", not(target_os = "wasi"), not(miri)))] // Wasi cannot run system commands
#![cfg(all(feature = "full", not(target_os = "wasi"), not(miri)))] // Wasi/Miri cannot run system commands

use tokio::process::Command;

Expand Down
2 changes: 1 addition & 1 deletion tokio/tests/process_smoke.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", not(target_os = "wasi"), not(miri)))] // Wasi cannot run system commands
#![cfg(all(feature = "full", not(target_os = "wasi"), not(miri)))] // Wasi/Miri cannot run system commands

use tokio::process::Command;
use tokio_test::assert_ok;
Expand Down
1 change: 0 additions & 1 deletion tokio/tests/rt_basic.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]
#![cfg(not(miri))] // Possible bug on Miri.

use tokio::runtime::Runtime;
use tokio::sync::oneshot;
Expand Down
Loading