Skip to content

Commit

Permalink
ignore more unsupported tests
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Dec 28, 2022
1 parent 462f43f commit 1f99440
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tokio/tests/fs_file.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", not(tokio_wasi)))] // Wasi does not support file operations
#![cfg(not(miri))] // Miri doesn't support opening file with non-default mode (inside NamedTempFile::new)
#![cfg(not(miri))] // Miri doesn't support creating file with non-default mode (inside NamedTempFile::new): https://github.com/rust-lang/miri/pull/2720

use std::io::prelude::*;
use tempfile::NamedTempFile;
Expand Down
2 changes: 1 addition & 1 deletion tokio/tests/io_fill_buf.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", not(tokio_wasi)))] // Wasi does not support file operations
#![cfg(not(miri))] // Miri doesn't support opening file with non-default mode (inside NamedTempFile::new)
#![cfg(not(miri))] // Miri doesn't support creating file with non-default mode (inside NamedTempFile::new): https://github.com/rust-lang/miri/pull/2720

use tempfile::NamedTempFile;
use tokio::fs::File;
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/macros_rename_test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg(all(feature = "full", not(tokio_wasi)))] // Wasi doesn't support threading
#![cfg(not(miri))] // Miri doesn't support write to event (inside mio::waker::Waker::wake)

#[allow(unused_imports)]
use std as tokio;
Expand Down
4 changes: 1 addition & 3 deletions tokio/tests/rt_basic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]
#![cfg(not(miri))] // Miri doesn't support write to event (inside mio::waker::Waker::wake)

use tokio::runtime::Runtime;
use tokio::sync::oneshot;
Expand Down Expand Up @@ -45,7 +46,6 @@ fn spawned_task_does_not_progress_without_block_on() {
}

#[test]
#[cfg_attr(miri, ignore)] // Miri doesn't support write to event (inside mio::waker::Waker::wake)
fn no_extra_poll() {
use pin_project_lite::pin_project;
use std::pin::Pin;
Expand Down Expand Up @@ -114,7 +114,6 @@ fn no_extra_poll() {
}

#[test]
#[cfg_attr(miri, ignore)] // Miri doesn't support write to event (inside mio::waker::Waker::wake)
fn acquire_mutex_in_drop() {
use futures::future::pending;
use tokio::task;
Expand Down Expand Up @@ -151,7 +150,6 @@ fn acquire_mutex_in_drop() {
}

#[test]
#[cfg_attr(miri, ignore)] // Miri doesn't support write to event (inside mio::waker::Waker::wake)
fn drop_tasks_in_context() {
static SUCCESS: AtomicBool = AtomicBool::new(false);

Expand Down
3 changes: 1 addition & 2 deletions tokio/tests/rt_common.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![allow(clippy::needless_range_loop)]
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]
#![cfg(not(miri))] // Miri doesn't support epoll_wait

// Tests to run on both current-thread & multi-thread runtime variants.

Expand Down Expand Up @@ -106,7 +107,6 @@ rt_test! {

#[cfg(not(target_os="wasi"))]
#[test]
#[cfg_attr(miri, ignore)] // Miri doesn't support epoll_wait
fn block_on_async() {
let rt = rt();

Expand Down Expand Up @@ -607,7 +607,6 @@ rt_test! {

#[cfg(not(target_os="wasi"))] // Wasi does not support threads
#[test]
#[cfg_attr(miri, ignore)] // Miri doesn't support epoll_wait
fn always_active_parker() {
// This test it to show that we will always have
// an active parker even if we call block_on concurrently
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/rt_handle_block_on.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]
#![cfg(not(miri))] // Miri doesn't support epoll_wait

// All io tests that deal with shutdown is currently ignored because there are known bugs in with
// shutting down the io driver while concurrently registering new resources. See
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/rt_threaded.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", not(tokio_wasi)))]
#![cfg(not(miri))] // Miri doesn't support epoll_wait

use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::{TcpListener, TcpStream};
Expand Down
4 changes: 4 additions & 0 deletions tokio/tests/sync_mpsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ async fn send_recv_buffer_limited() {
}

#[maybe_tokio_test]
#[cfg_attr(miri, ignore)] // Miri doesn't support write to event (inside mio::waker::Waker::wake)
async fn recv_close_gets_none_idle() {
let (tx, mut rx) = mpsc::channel::<i32>(10);

Expand All @@ -287,6 +288,7 @@ async fn recv_close_gets_none_idle() {

#[tokio::test]
#[cfg(feature = "full")]
#[cfg_attr(miri, ignore)] // Miri doesn't support write to event (inside mio::waker::Waker::wake)
async fn recv_close_gets_none_reserved() {
let (tx1, mut rx) = mpsc::channel::<i32>(1);
let tx2 = tx1.clone();
Expand Down Expand Up @@ -525,6 +527,7 @@ async fn ready_close_cancel_bounded() {

#[tokio::test]
#[cfg(feature = "full")]
#[cfg_attr(miri, ignore)] // Miri doesn't support write to event (inside mio::waker::Waker::wake)
async fn permit_available_not_acquired_close() {
let (tx1, mut rx) = mpsc::channel::<()>(1);
let tx2 = tx1.clone();
Expand Down Expand Up @@ -625,6 +628,7 @@ fn try_recv_close_while_empty_unbounded() {

#[tokio::test(start_paused = true)]
#[cfg(feature = "full")]
#[cfg_attr(miri, ignore)] // Miri doesn't support write to event (inside mio::waker::Waker::wake)
async fn recv_timeout() {
use tokio::sync::mpsc::error::SendTimeoutError::{Closed, Timeout};
use tokio::time::Duration;
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/sync_rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ async fn write_order() {
// A single RwLock is contested by tasks in multiple threads
#[cfg(all(feature = "full", not(tokio_wasi)))] // Wasi doesn't support threads
#[tokio::test(flavor = "multi_thread", worker_threads = 8)]
#[cfg_attr(miri, ignore)] // Miri doesn't support epoll_wait
async fn multithreaded() {
use futures::stream::{self, StreamExt};
use std::sync::Arc;
Expand Down
2 changes: 2 additions & 0 deletions tokio/tests/task_local.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![cfg(all(feature = "full", not(tokio_wasi)))] // Wasi doesn't support threads
#![allow(clippy::declare_interior_mutable_const)]
#![cfg(not(miri))] // Miri doesn't support write to event (inside mio::waker::Waker::wake)

use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
Expand Down

0 comments on commit 1f99440

Please sign in to comment.