Skip to content

Commit 4707b70

Browse files
committed
update/extend some comments explaining why tests do not run in Miri
1 parent d333f1a commit 4707b70

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

tokio/src/io/stdio_common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ mod tests {
177177
}
178178

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

193193
#[test]
194-
#[cfg_attr(miri, ignore)]
194+
#[cfg_attr(miri, ignore)] // takes a really long time with miri
195195
fn test_pseudo_text() {
196196
// In this test we write a piece of binary data, whose beginning is
197197
// text though. We then validate that even in this corner case buffer

tokio/src/loom/std/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mod atomic_u64;
66
mod atomic_usize;
77
mod barrier;
88
mod mutex;
9-
#[cfg(all(feature = "parking_lot", not(miri)))]
9+
#[cfg(all(feature = "parking_lot", not(miri)))] // not using this in Miri due to <https://github.com/Amanieu/parking_lot/issues/477>
1010
mod parking_lot;
1111
mod rwlock;
1212
mod unsafe_cell;

tokio/src/process/unix/orphan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ pub(crate) mod test {
292292
drop(signal_guard);
293293
}
294294

295-
#[cfg_attr(miri, ignore)] // Miri does not support epoll.
295+
#[cfg_attr(miri, ignore)] // No `sigaction` on Miri
296296
#[test]
297297
fn does_not_register_signal_if_queue_empty() {
298298
let (io_driver, io_handle) = IoDriver::new(1024).unwrap();

tokio/src/runtime/tests/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ cfg_not_loom! {
7777
mod inject;
7878
mod queue;
7979

80-
#[cfg(not(miri))]
80+
#[cfg(not(miri))] // takes a really long time with miri
8181
mod task_combinations;
8282

8383
#[cfg(miri)]

tokio/tests/process_change_of_runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This tests test the behavior of `process::Command::spawn` when it is used
44
// outside runtime, and when `process::Child::wait ` is used in a different
55
// runtime from which `process::Command::spawn` is used.
6-
#![cfg(all(unix, not(target_os = "freebsd"), not(miri)))]
6+
#![cfg(all(unix, not(target_os = "freebsd"), not(miri)))] // Miri cannot run system commands
77

88
use std::process::Stdio;
99
use tokio::{process::Command, runtime::Runtime};

tokio/tests/process_kill_after_wait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(rust_2018_idioms)]
2-
#![cfg(all(feature = "full", not(target_os = "wasi"), not(miri)))] // Wasi cannot run system commands
2+
#![cfg(all(feature = "full", not(target_os = "wasi"), not(miri)))] // Wasi/Miri cannot run system commands
33

44
use tokio::process::Command;
55

tokio/tests/process_smoke.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(rust_2018_idioms)]
2-
#![cfg(all(feature = "full", not(target_os = "wasi"), not(miri)))] // Wasi cannot run system commands
2+
#![cfg(all(feature = "full", not(target_os = "wasi"), not(miri)))] // Wasi/Miri cannot run system commands
33

44
use tokio::process::Command;
55
use tokio_test::assert_ok;

0 commit comments

Comments
 (0)