From 550b9a1bfa7ae7d8b3b739120eba664a9388f900 Mon Sep 17 00:00:00 2001 From: Chinmay Shringi <31031919+ChinmayShringi@users.noreply.github.com> Date: Wed, 23 Oct 2024 12:57:38 -0400 Subject: [PATCH] fix: test case ut_lind_fs_rename (#61) Co-authored-by: lind --- src/tests/fs_tests.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/fs_tests.rs b/src/tests/fs_tests.rs index 09fd4c6..7e8cee8 100644 --- a/src/tests/fs_tests.rs +++ b/src/tests/fs_tests.rs @@ -2418,6 +2418,8 @@ pub mod fs_tests { let cage = interface::cagetable_getref(1); let old_path = "/test_dir"; + // Clean up the directory if it exists + let _ = cage.rmdir_syscall(old_path); assert_eq!(cage.mkdir_syscall(old_path, S_IRWXA), 0); assert_eq!(cage.rename_syscall(old_path, "/test_dir_renamed"), 0); // Remove the directory for a clean environment