From 70a3d0d8a2f518653870fbf33cd69b650ed6eae8 Mon Sep 17 00:00:00 2001 From: kkould <2435992353@qq.com> Date: Tue, 12 Nov 2024 10:22:54 +0000 Subject: [PATCH] test: add fs test for monoio & tokio uring --- fusio/src/lib.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/fusio/src/lib.rs b/fusio/src/lib.rs index 82e4d5d..2df3974 100644 --- a/fusio/src/lib.rs +++ b/fusio/src/lib.rs @@ -536,6 +536,28 @@ mod tests { test_local_fs_copy_link(TokioFs, TokioFs).await.unwrap(); } + #[cfg(all(feature = "tokio-uring", target_os = "linux"))] + #[test] + async fn test_tokio_uring_fs() { + use crate::disk::tokio_uring::fs::TokioUringFs; + + tokio_uring::start(async { + test_local_fs_read_write(TokioUringFs).await.unwrap(); + test_local_fs_copy_link(TokioUringFs, TokioUringFs) + .await + .unwrap(); + }) + } + + #[cfg(feature = "monoio")] + #[monoio::test] + async fn test_monoio_fs() { + use crate::disk::monoio::fs::MonoIoFs; + + test_local_fs_read_write(MonoIoFs).await.unwrap(); + test_local_fs_copy_link(MonoIoFs, MonoIoFs).await.unwrap(); + } + #[cfg(feature = "tokio")] #[tokio::test] async fn test_read_exact() {