Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: see if the test will ice in the CI #3873

Closed
wants to merge 1 commit into from
Closed
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
21 changes: 21 additions & 0 deletions tests/fail-dep/tokio_test/issue-3858.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//@only-target-linux: We only support tokio on Linux

Check failure on line 1 in tests/fail-dep/tokio_test/issue-3858.rs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, x86_64-unknown-linux-gnu)

fail test got exit status: 0

no message

Check failure on line 1 in tests/fail-dep/tokio_test/issue-3858.rs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, x86_64-unknown-linux-gnu)

no error patterns found in fail test

no message

Check failure on line 1 in tests/fail-dep/tokio_test/issue-3858.rs

View workflow job for this annotation

GitHub Actions / build (macos-14, aarch64-apple-darwin)

fail test got exit status: 0

no message

Check failure on line 1 in tests/fail-dep/tokio_test/issue-3858.rs

View workflow job for this annotation

GitHub Actions / build (macos-14, aarch64-apple-darwin)

no error patterns found in fail test

no message

Check failure on line 1 in tests/fail-dep/tokio_test/issue-3858.rs

View workflow job for this annotation

GitHub Actions / build (windows-latest, i686-pc-windows-msvc)

fail test got exit code: 0

no message

Check failure on line 1 in tests/fail-dep/tokio_test/issue-3858.rs

View workflow job for this annotation

GitHub Actions / build (windows-latest, i686-pc-windows-msvc)

no error patterns found in fail test

no message

// Test for ICE caused by weak epoll interest upgrade succeed, but attempt to retrieve
// epoll instance failed.
// https://github.com/rust-lang/miri/issues/3858
use tokio::fs;
use tokio::runtime::Handle;
use tokio::time::Duration;

fn main() {
let rt = tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap();
let _enter = rt.enter();
rt.shutdown_timeout(Duration::from_secs(1000));

let err: std::io::Error =
Handle::current().block_on(fs::read_to_string("Cargo.toml")).unwrap_err();

assert_eq!(err.kind(), std::io::ErrorKind::Other);
let inner_err = err.get_ref().expect("no inner error");
assert_eq!(inner_err.to_string(), "background task failed");
}
Loading