Added a clean-up step to ensure the test environment is always reset before the mkdir operation in the ut_lind_fs_pwrite_to_directory test case. The line let _ = cage.rmdir_syscall('/test_dir'); was introduced to remove the directory if it already exists, ensuring a clean environment for testing. This change enhances the reliability of the test by preventing conflicts from pre-existing directories.
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
cargo test ut_lind_fs_pwrite_to_directory
Checklist:
[x] My code follows the style guidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] Any dependent changes have been added to a pull request and/or merged in other modules (native-client, lind-glibc, lind-project)
Description
Fixes # (issue)
Added a clean-up step to ensure the test environment is always reset before the
mkdir
operation in theut_lind_fs_pwrite_to_directory
test case. The linelet _ = cage.rmdir_syscall('/test_dir');
was introduced to remove the directory if it already exists, ensuring a clean environment for testing. This change enhances the reliability of the test by preventing conflicts from pre-existing directories.Type of change
How Has This Been Tested?
cargo test ut_lind_fs_pwrite_to_directory
Checklist: