net: enable more Miri tests for TCP socket (#8180)

This commit is contained in:
WhySoBad
2026-06-02 23:50:54 +08:00
committed by GitHub
parent 326bd2cc44
commit 2de86e557c
4 changed files with 38 additions and 45 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ env:
rust_stable: stable rust_stable: stable
rust_nightly: nightly-2025-10-12 rust_nightly: nightly-2025-10-12
# Pin a specific miri version # Pin a specific miri version
rust_miri_nightly: nightly-2026-05-20 rust_miri_nightly: nightly-2026-05-30
rust_clippy: '1.88' rust_clippy: '1.88'
# When updating this, also update: # When updating this, also update:
# - README.md # - README.md
-1
View File
@@ -89,7 +89,6 @@ async fn test_transfer_after_close() {
} }
#[tokio::test] #[tokio::test]
#[cfg_attr(miri, ignore)] // Miri currently only processes host I/O events when switching into the scheduler: See https://github.com/rust-lang/miri/issues/5047
async fn blocking_one_side_does_not_block_other() { async fn blocking_one_side_does_not_block_other() {
symmetric(|handle, mut a, mut b| async move { symmetric(|handle, mut a, mut b| async move {
block_write(&mut a).await; block_write(&mut a).await;
-2
View File
@@ -1155,7 +1155,6 @@ rt_test! {
#[cfg(not(target_os = "wasi"))] // Wasi does not support bind #[cfg(not(target_os = "wasi"))] // Wasi does not support bind
#[test] #[test]
#[cfg_attr(miri, ignore)] // Miri currently only processes host I/O events when switching into the scheduler: See https://github.com/rust-lang/miri/issues/5047
fn local_set_client_server_block_on() { fn local_set_client_server_block_on() {
let rt = rt(); let rt = rt();
let (tx, rx) = mpsc::channel(); let (tx, rx) = mpsc::channel();
@@ -1169,7 +1168,6 @@ rt_test! {
} }
#[cfg(not(target_os = "wasi"))] // Wasi does not support bind #[cfg(not(target_os = "wasi"))] // Wasi does not support bind
#[cfg_attr(miri, ignore)] // Miri currently only processes host I/O events when switching into the scheduler: See https://github.com/rust-lang/miri/issues/5047
async fn client_server_local(tx: mpsc::Sender<()>) { async fn client_server_local(tx: mpsc::Sender<()>) {
let server = assert_ok!(TcpListener::bind("127.0.0.1:0").await); let server = assert_ok!(TcpListener::bind("127.0.0.1:0").await);
-4
View File
@@ -113,9 +113,6 @@ async fn try_read_write() {
written.reserve(10 * 1024 * 1024); written.reserve(10 * 1024 * 1024);
client.writable().await.unwrap(); client.writable().await.unwrap();
#[cfg(not(miri))]
// Miri currently has a memory leak when `readv` returns an error: See https://github.com/rust-lang/miri/pull/5054
{
// Fill the write buffer using vectored I/O // Fill the write buffer using vectored I/O
let data_bufs: Vec<_> = DATA.chunks(10).map(io::IoSlice::new).collect(); let data_bufs: Vec<_> = DATA.chunks(10).map(io::IoSlice::new).collect();
loop { loop {
@@ -159,7 +156,6 @@ async fn try_read_write() {
assert_eq!(read, written); assert_eq!(read, written);
} }
}
// Now, we listen for shutdown // Now, we listen for shutdown
drop(client); drop(client);