Skip to content

lseek_syscall and close_syscall updates#311

Merged
rennergade merged 8 commits intodevelopfrom
naman_lseek_close
Jul 26, 2024
Merged

lseek_syscall and close_syscall updates#311
rennergade merged 8 commits intodevelopfrom
naman_lseek_close

Conversation

@namanlalitnyu
Copy link
Copy Markdown
Contributor

@namanlalitnyu namanlalitnyu commented Jul 18, 2024

Description

Fixes # (issue)
The following changes include the tests and comments in the code for the lseek_syscall and close_syscall file system calls under RustPosix.
The tests were added to cover all the possible scenarios that might happen when calling the file system_calls lseek_syscall and close_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 lseek_syscall and close_syscall.
  • [] This change contains code reformatting for existing file system calls.

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_lseek_on_file()
  • Test B - ut_lind_fs_lseek_on_directory()
  • Test C - ut_lind_fs_lseek_invalid_whence()
  • Test D - ut_lind_fs_lseek_beyond_file_size()
  • Test E - ut_lind_fs_lseek_before_start_of_file()
  • Test F - ut_lind_fs_lseek_on_pipe()
  • Test G - ut_lind_fs_lseek_on_chardev()
  • Test H - ut_lind_fs_lseek_on_epoll()
  • Test I - ut_lind_fs_close_chardev()
  • Test J - ut_lind_fs_close_pipe()
  • Test K - ut_lind_fs_close_socket()
  • Test L - ut_lind_fs_close_directory()
  • Test M - ut_lind_fs_close_regular_file()

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 changed the title lseek_syscall and close_syscall updates lseek_syscall and close_syscall updates Jul 18, 2024
@namanlalitnyu namanlalitnyu marked this pull request as ready for review July 22, 2024 19:26
Copy link
Copy Markdown
Contributor

@davidge20 davidge20 left a comment

Choose a reason for hiding this comment

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

minor comments, overall great job explaining everything in detail!

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/safeposix/syscalls/fs_calls.rs Outdated
Comment thread src/safeposix/syscalls/fs_calls.rs
Comment thread src/tests/fs_tests.rs
@namanlalitnyu namanlalitnyu requested a review from davidge20 July 23, 2024 20:37
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
Comment thread src/safeposix/syscalls/fs_calls.rs
Comment thread src/tests/fs_tests.rs
@namanlalitnyu namanlalitnyu requested a review from Anway-Agte July 24, 2024 13:40
@namanlalitnyu
Copy link
Copy Markdown
Contributor Author

@davidge20 @Anway-Agte, I have addressed the review comments. Please can you review the changes once?

Copy link
Copy Markdown
Contributor

@davidge20 davidge20 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
Copy link
Copy Markdown
Contributor Author

@yashaswi2000, requesting your review of these changes.
Thanks!

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.

Great Job, nice comments!

@namanlalitnyu namanlalitnyu requested a review from rennergade July 26, 2024 00:08
@namanlalitnyu
Copy link
Copy Markdown
Contributor Author

@rennergade, requesting your review of these changes.
Thanks!

Comment thread src/safeposix/syscalls/fs_calls.rs Outdated
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.

This looks quite good though the comment I pointed out is pretty major. I'd double check everything to be consistent with that.

@namanlalitnyu namanlalitnyu requested a review from rennergade July 26, 2024 03:52
@rennergade rennergade merged commit c92ac2c into develop Jul 26, 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