Updates to "write_syscall" and "pwrite_syscall"#304
Merged
rennergade merged 4 commits intodevelopfrom Jul 16, 2024
Merged
Conversation
Contributor
Author
|
@qianxichen233, Requesting your review of these changes. |
Anway-Agte
reviewed
Jul 15, 2024
qianxichen233
approved these changes
Jul 16, 2024
Contributor
yashaswi2000
left a comment
There was a problem hiding this comment.
good tests, minor refactoring. good work!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes # (issue)
The following changes include the tests and comments in the code for the
write_syscallandpwrite_syscallfile system calls under RustPosix.The tests were added to cover all the possible scenarios that might happen when calling the file system_calls
write_syscallandpwrite_syscall.Type of change
How Has This Been Tested?
Inorder to run the tests, we need to run
cargo test --libcommand inside thesafeposix-rustdirectory.All the tests are present under this directory:
lind_project/src/safeposix-rust/src/tests/fs_tests.rsut_lind_fs_write_read_only_fd()ut_lind_fs_write_to_directory()ut_lind_fs_write_to_epoll()ut_lind_fs_write_to_regular_file()ut_lind_fs_write_to_chardev_file()ut_lind_fs_write_to_sockets()ut_lind_fs_pwrite_read_only_fd()ut_lind_fs_pwrite_to_file()ut_lind_fs_pwrite_to_directory()ut_lind_fs_pwrite_invalid_types()ut_lind_fs_pwrite_to_chardev_file()Checklist: