Skip to content

link and unlink syscalls#284

Merged
JustinCappos merged 9 commits intodevelopfrom
naman_link_unlink
Jul 3, 2024
Merged

link and unlink syscalls#284
JustinCappos merged 9 commits intodevelopfrom
naman_link_unlink

Conversation

@namanlalitnyu
Copy link
Copy Markdown
Contributor

@namanlalitnyu namanlalitnyu commented Jun 28, 2024

Description

Fixes # (issue)
The following changes include the tests and comments in the code for the "link_syscall" and "unlink_syscall" file system calls under RustPosix.
The tests were added to cover all the possible scenarios that might happen when calling the file system_call link_syscall and unlink_syscall.

Type of change

  • This change just contains the tests for an existing file system call.
  • This change contains the minor code changes and comments for link_syscall and unlink_syscall.

How Has This Been Tested?

Inorder 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_link_empty_path()
  • Test B - ut_lind_fs_link_nonexistent_oldpath()
  • Test C - ut_lind_fs_link_existing_newpath()
  • Test D - ut_lind_fs_unlink_empty_path()
  • Test E - ut_lind_fs_unlink_nonexistent_file()
  • Test F - ut_lind_fs_unlink_root_directory()
  • Test G - ut_lind_fs_unlink_directory()
  • Test H - ut_lind_fs_unlink_success()
  • Test I - ut_lind_fs_link_unlink_success()

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)

@namanlalitnyu namanlalitnyu requested a review from ve1nard June 28, 2024 15:22
@namanlalitnyu
Copy link
Copy Markdown
Contributor Author

@ve1nard can you please review my PR for link and unlink syscalls?

@namanlalitnyu namanlalitnyu requested a review from davidge20 June 28, 2024 15:29
@namanlalitnyu
Copy link
Copy Markdown
Contributor Author

@davidge20 can you please review this PR?

Copy link
Copy Markdown
Contributor

@ve1nard ve1nard left a comment

Choose a reason for hiding this comment

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

minor changes requested, great job overall

Comment thread src/safeposix/syscalls/fs_calls.rs Outdated
Comment thread src/safeposix/syscalls/fs_calls.rs Outdated
Comment thread src/tests/fs_tests.rs
@namanlalitnyu namanlalitnyu requested a review from ve1nard July 1, 2024 20:24
Copy link
Copy Markdown
Contributor

@ve1nard ve1nard left a comment

Choose a reason for hiding this comment

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

lgtm!

@rennergade
Copy link
Copy Markdown
Contributor

@rupeshkoushik07 can you review this one

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

@yashaswi2000 yashaswi2000 left a comment

Choose a reason for hiding this comment

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

LGTM

@namanlalitnyu namanlalitnyu requested review from JustinCappos and rennergade and removed request for rennergade July 2, 2024 22:11
Copy link
Copy Markdown
Member

@JustinCappos JustinCappos left a comment

Choose a reason for hiding this comment

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

Looks pretty good. A few minor asks.

Comment thread src/safeposix/syscalls/fs_calls.rs
Comment thread src/safeposix/syscalls/fs_calls.rs
Comment thread src/safeposix/syscalls/fs_calls.rs Outdated
Comment thread src/safeposix/syscalls/fs_calls.rs Outdated
Comment thread src/tests/fs_tests.rs
Copy link
Copy Markdown
Member

@JustinCappos JustinCappos left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes. LGTM

@JustinCappos JustinCappos merged commit c1ca9a6 into develop Jul 3, 2024
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.

6 participants