Skip to content

mmap_syscall() and munmap_syscall() updates#300

Merged
rennergade merged 9 commits intodevelopfrom
vlad_mmap_munmap
Jul 15, 2024
Merged

mmap_syscall() and munmap_syscall() updates#300
rennergade merged 9 commits intodevelopfrom
vlad_mmap_munmap

Conversation

@ve1nard
Copy link
Copy Markdown
Contributor

@ve1nard ve1nard commented Jul 11, 2024

Description

Fixes # (issue)

The following changes include more elaborate comments and new unit tests for mmap_syscall() and munmap_syscall().

Type of change

  • More detailed comments for mmap_syscall() and munmap_syscall()
  • New unit tests for mmap_syscall() and munmap_syscall()

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 - lut_lind_fs_mmap_zerolen()
  • Test B - ut_lind_fs_mmap_invalid_flags_none()
  • Test C - ut_lind_fs_mmap_invalid_flags_both()
  • Test D - ut_lind_fs_mmap_no_read()
  • Test E - ut_lind_fs_mmap_no_write()
  • Test F - ut_lind_fs_mmap_invalid_offset_len()
  • Test G - ut_lind_fs_mmap_chardev()
  • Test H - ut_lind_fs_mmap_unsupported_file()
  • Test I - ut_lind_fs_mmap_invalid_fildes()
  • Test J - ut_lind_fs_munmap_zerolen()

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)

@rennergade rennergade requested a review from qianxichen233 July 12, 2024 21:29
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.

Few minor changes, but looks good overall!

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
@ve1nard ve1nard requested a review from namanlalitnyu July 13, 2024 17:24
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 yashaswi2000 and removed request for qianxichen233 and rennergade July 13, 2024 23:44
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 really good only had a minor revision

@rennergade rennergade merged commit b49424a into develop Jul 15, 2024
Anway-Agte pushed a commit that referenced this pull request Jul 15, 2024
* finished mmap and munmap

* removed whitespace

* formatted

* fixed the conditional

* fixed the test

* fixed according to the review

* fixed the typo

---------

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.

3 participants