-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to "write_syscall" and "pwrite_syscall" #304
Conversation
@qianxichen233, Requesting your review of these changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good tests, minor refactoring. good work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job. Approved!
Description
Fixes # (issue)
The following changes include the tests and comments in the code for the
write_syscall
andpwrite_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
write_syscall
andpwrite_syscall
.Type of change
How Has This Been Tested?
Inorder to run the tests, we need to run
cargo test --lib
command inside thesafeposix-rust
directory.All the tests are present under this directory:
lind_project/src/safeposix-rust/src/tests/fs_tests.rs
ut_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: