diff --git a/tokio/tests/tcp_into_split.rs b/tokio/tests/tcp_into_split.rs index 35265588845..52c0a4f240c 100644 --- a/tokio/tests/tcp_into_split.rs +++ b/tokio/tests/tcp_into_split.rs @@ -44,6 +44,7 @@ async fn split() -> Result<()> { assert_eq!(peek_len1, peek_len2); let read_len = read_half.read(&mut read_buf[..]).await?; + #[cfg(not(target_env = "sgx"))] // peek always returns Ok(0) in SGX assert_eq!(peek_len1, read_len); assert_eq!(&read_buf[..read_len], MSG); Ok(()) diff --git a/tokio/tests/tcp_split.rs b/tokio/tests/tcp_split.rs index 6ef91b85854..53f350adfef 100644 --- a/tokio/tests/tcp_split.rs +++ b/tokio/tests/tcp_split.rs @@ -33,6 +33,7 @@ async fn split() -> Result<()> { assert_eq!(peek_len1, peek_len2); let read_len = read_half.read(&mut read_buf[..]).await?; + #[cfg(not(target_env = "sgx"))] // peek always returns Ok(0) in SGX assert_eq!(peek_len1, read_len); assert_eq!(&read_buf[..read_len], MSG);