Skip to content

rmdir_syscall() updates#289

Merged
rennergade merged 13 commits intodevelopfrom
vlad_rmdir
Jul 9, 2024
Merged

rmdir_syscall() updates#289
rennergade merged 13 commits intodevelopfrom
vlad_rmdir

Conversation

@ve1nard
Copy link
Copy Markdown
Contributor

@ve1nard ve1nard commented Jul 6, 2024

Description

Fixes # (issue)

The following changes include new comments and unit tests for rmdir_syscall(). Moreover, a fix of the bug related to write permission of a parent directory inside rmdir_syscall() is proposed. In addition to that, a fix for lind_deltree() bug related to not setting a parent directory's write permission before iterating through child directories is included. Finally, the description for the bug related to the absence of checking search permission while walking the file tree is included in the ut_lind_fs_search_permission_bug_with_rmdir() unit test. The issue (#283) for that bug has been opened as well.

Type of change

  • More detailed comments for rmdir_syscall()
  • New unit tests for rmdir_syscall()
  • Bug fixes for rmdir_syscall() and lind_deltree()
  • Bug description inside ut_lind_fs_search_permission_bug_with_rmdir() unit test

How Has This Been Tested?

To run the tests, we need to run cargo test --lib command inside the safeposix-rust directory.

All the tests are present under this directory: lind_project/src/safeposix-rust/src/tests/fs_tests.rs

  • Test A - ut_lind_fs_rmdir_normal()
  • Test B - ut_lind_fs_rmdir_empty_path()
  • Test C - ut_lind_fs_rmdir_nonexist_dir()
  • Test D - ut_lind_fs_rmdir_root()
  • Test E - ut_lind_fs_rmdir_nonempty_dir()
  • Test F - ut_lind_fs_rmdir_nowriteperm_child_dir()
  • Test G - ut_lind_fs_rmdir_nowriteperm_parent_dir()
  • Test H - ut_lind_fs_search_permission_bug_with_rmdir()

Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been added to a pull request and/or merged in other modules (native-client, lind-glibc, lind-project)

Comment thread src/safeposix/syscalls/fs_calls.rs Outdated
Comment thread src/safeposix/syscalls/fs_calls.rs
Comment thread src/safeposix/syscalls/fs_calls.rs Outdated
Copy link
Copy Markdown
Contributor

@namanlalitnyu namanlalitnyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor comments, but the changes look good. Great job!

@ve1nard ve1nard requested a review from namanlalitnyu July 7, 2024 16:38
Copy link
Copy Markdown
Contributor

@namanlalitnyu namanlalitnyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ve1nard ve1nard requested review from rennergade and removed request for davidge20 July 7, 2024 23:21
@rennergade
Copy link
Copy Markdown
Contributor

@rupeshkoushik07 can you take a look at this one?

Copy link
Copy Markdown
Member

@rupeshkoushik07 rupeshkoushik07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Please resolve the conflicts

Comment thread src/safeposix/syscalls/fs_calls.rs
Copy link
Copy Markdown
Contributor

@rennergade rennergade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, one minor change requested.

@ve1nard ve1nard requested a review from rennergade July 9, 2024 20:51
Copy link
Copy Markdown
Contributor

@rennergade rennergade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

@rennergade rennergade merged commit 54fd9a6 into develop Jul 9, 2024
Anway-Agte pushed a commit that referenced this pull request Jul 15, 2024
* added a test for search permissions bug

* updates syscall description

* finished rmdir_syscall

* bug fix

* test changes

* fixed everything

* updated comments

* fixed according to the review

* performed cargo fmt

* added a comment for close_helper_inner

---------

Co-authored-by: lind <lind@nyu.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants