From 2893232c0bfc4ae8f961b0c9b31b53e3628b34e5 Mon Sep 17 00:00:00 2001 From: fqwert Date: Mon, 26 Jun 2023 10:36:25 +0800 Subject: [PATCH] fix a test lint where the test could not delete files Signed-off-by: fqwert --- ylong_runtime/tests/async_fs.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ylong_runtime/tests/async_fs.rs b/ylong_runtime/tests/async_fs.rs index fa5c755..2b23e66 100644 --- a/ylong_runtime/tests/async_fs.rs +++ b/ylong_runtime/tests/async_fs.rs @@ -307,6 +307,10 @@ fn sdv_async_fs_set_permission() { perms.set_readonly(true); let ret = file.set_permissions(perms).await; assert!(ret.is_ok()); + let mut perms = file.metadata().await.unwrap().permissions(); + perms.set_readonly(false); + let ret = file.set_permissions(perms).await; + assert!(ret.is_ok()); }); runtime.block_on(handle).unwrap(); fs::remove_file("./tests/tmp_file5").unwrap(); -- Gitee