mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
net: enable various tests for WASI (#8313)
These tests were temporarily disabled until required `wasi-libc` fixes made their way into a Rust release. Now that that has happened, we can enable them. Note that `send_to_recv_closed_returns_err` remains disabled for a bit longer. The applicable `wasi-libc` bug was masking a separate bug in Wasmtime, fixed [here](https://github.com/bytecodealliance/wasmtime/pull/13933). Once that fix makes its way into a release (presumably v48.0.0), we'll finally be able enable that test, and that should be the last of the temporarily-disabled-on-WASI-due-to-bugs tests.
This commit is contained in:
@@ -42,10 +42,6 @@ async fn set_linger() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg_attr(
|
|
||||||
target_os = "wasi",
|
|
||||||
ignore = "temporarily disabled for WASI pending https://github.com/WebAssembly/wasi-libc/pull/734"
|
|
||||||
)]
|
|
||||||
async fn try_read_write() {
|
async fn try_read_write() {
|
||||||
const DATA: &[u8] = &[2u8; 4000];
|
const DATA: &[u8] = &[2u8; 4000];
|
||||||
|
|
||||||
@@ -395,10 +391,6 @@ async fn try_read_buf() {
|
|||||||
|
|
||||||
// read_closed is a best effort event, so test only for no false positives.
|
// read_closed is a best effort event, so test only for no false positives.
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg_attr(
|
|
||||||
target_os = "wasi",
|
|
||||||
ignore = "temporarily disabled for WASI pending https://github.com/WebAssembly/wasi-libc/pull/732"
|
|
||||||
)]
|
|
||||||
async fn read_closed() {
|
async fn read_closed() {
|
||||||
let (client, mut server) = create_pair().await;
|
let (client, mut server) = create_pair().await;
|
||||||
|
|
||||||
|
|||||||
+1
-25
@@ -58,7 +58,7 @@ async fn send_recv_poll() -> std::io::Result<()> {
|
|||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
target_os = "wasi",
|
target_os = "wasi",
|
||||||
ignore = "temporarily disabled for WASI pending https://github.com/WebAssembly/wasi-libc/pull/734"
|
ignore = "temporarily disabled for WASI pending https://github.com/bytecodealliance/wasmtime/pull/13933"
|
||||||
)]
|
)]
|
||||||
async fn send_to_recv_closed_returns_err() -> std::io::Result<()> {
|
async fn send_to_recv_closed_returns_err() -> std::io::Result<()> {
|
||||||
let sender = UdpSocket::bind("127.0.0.1:0").await?;
|
let sender = UdpSocket::bind("127.0.0.1:0").await?;
|
||||||
@@ -87,10 +87,6 @@ async fn send_to_recv_closed_returns_err() -> std::io::Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg_attr(
|
|
||||||
target_os = "wasi",
|
|
||||||
ignore = "temporarily disabled for WASI pending https://github.com/WebAssembly/wasi-libc/pull/734"
|
|
||||||
)]
|
|
||||||
async fn send_to_recv_from() -> std::io::Result<()> {
|
async fn send_to_recv_from() -> std::io::Result<()> {
|
||||||
let sender = UdpSocket::bind("127.0.0.1:0").await?;
|
let sender = UdpSocket::bind("127.0.0.1:0").await?;
|
||||||
let receiver = UdpSocket::bind("127.0.0.1:0").await?;
|
let receiver = UdpSocket::bind("127.0.0.1:0").await?;
|
||||||
@@ -107,10 +103,6 @@ async fn send_to_recv_from() -> std::io::Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg_attr(
|
|
||||||
target_os = "wasi",
|
|
||||||
ignore = "temporarily disabled for WASI pending https://github.com/WebAssembly/wasi-libc/pull/734"
|
|
||||||
)]
|
|
||||||
async fn send_to_recv_from_poll() -> std::io::Result<()> {
|
async fn send_to_recv_from_poll() -> std::io::Result<()> {
|
||||||
let sender = UdpSocket::bind("127.0.0.1:0").await?;
|
let sender = UdpSocket::bind("127.0.0.1:0").await?;
|
||||||
let receiver = UdpSocket::bind("127.0.0.1:0").await?;
|
let receiver = UdpSocket::bind("127.0.0.1:0").await?;
|
||||||
@@ -497,10 +489,6 @@ async fn try_send_recv() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg_attr(
|
|
||||||
target_os = "wasi",
|
|
||||||
ignore = "temporarily disabled for WASI pending https://github.com/WebAssembly/wasi-libc/pull/734"
|
|
||||||
)]
|
|
||||||
async fn try_send_to_recv_from() {
|
async fn try_send_to_recv_from() {
|
||||||
// Create listener
|
// Create listener
|
||||||
let server = UdpSocket::bind("127.0.0.1:0").await.unwrap();
|
let server = UdpSocket::bind("127.0.0.1:0").await.unwrap();
|
||||||
@@ -605,10 +593,6 @@ async fn recv_buf() -> std::io::Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg_attr(
|
|
||||||
target_os = "wasi",
|
|
||||||
ignore = "temporarily disabled for WASI pending https://github.com/WebAssembly/wasi-libc/pull/734"
|
|
||||||
)]
|
|
||||||
async fn try_recv_buf_from() {
|
async fn try_recv_buf_from() {
|
||||||
// Create listener
|
// Create listener
|
||||||
let server = UdpSocket::bind("127.0.0.1:0").await.unwrap();
|
let server = UdpSocket::bind("127.0.0.1:0").await.unwrap();
|
||||||
@@ -652,10 +636,6 @@ async fn try_recv_buf_from() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg_attr(
|
|
||||||
target_os = "wasi",
|
|
||||||
ignore = "temporarily disabled for WASI pending https://github.com/WebAssembly/wasi-libc/pull/734"
|
|
||||||
)]
|
|
||||||
async fn recv_buf_from() -> std::io::Result<()> {
|
async fn recv_buf_from() -> std::io::Result<()> {
|
||||||
let sender = UdpSocket::bind("127.0.0.1:0").await?;
|
let sender = UdpSocket::bind("127.0.0.1:0").await?;
|
||||||
let receiver = UdpSocket::bind("127.0.0.1:0").await?;
|
let receiver = UdpSocket::bind("127.0.0.1:0").await?;
|
||||||
@@ -673,10 +653,6 @@ async fn recv_buf_from() -> std::io::Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg_attr(
|
|
||||||
target_os = "wasi",
|
|
||||||
ignore = "temporarily disabled for WASI pending https://github.com/WebAssembly/wasi-libc/pull/734"
|
|
||||||
)]
|
|
||||||
async fn poll_ready() {
|
async fn poll_ready() {
|
||||||
// Create listener
|
// Create listener
|
||||||
let server = UdpSocket::bind("127.0.0.1:0").await.unwrap();
|
let server = UdpSocket::bind("127.0.0.1:0").await.unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user