Skip to content

getcwd_syscall() updates#280

Merged
rennergade merged 9 commits intodevelopfrom
vlad_getcwd
Jul 2, 2024
Merged

getcwd_syscall() updates#280
rennergade merged 9 commits intodevelopfrom
vlad_getcwd

Conversation

@ve1nard
Copy link
Copy Markdown
Contributor

@ve1nard ve1nard commented Jun 27, 2024

Description

Fixes # (issue)

The following changes include a small fix for checking null pointers, more elaborate comments, and new unit tests for getcwd_syscall().

Type of change

  • More detailed comments for getcwd_syscall()
  • Added a condition to error-out null pointers passed as buf argument
  • New unit tests for getcwd_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_getcwd_valid_args()
  • Test B - ut_lind_fs_getcwd_invalid_args()

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

@Anway-Agte can you review this before Rupesh does?

Comment thread src/tests/fs_tests.rs
Comment thread src/tests/fs_tests.rs
Comment thread src/tests/fs_tests.rs Outdated
Comment thread src/tests/fs_tests.rs Outdated
@ve1nard ve1nard requested a review from Anway-Agte June 30, 2024 18:46
Comment thread src/tests/fs_tests.rs
Comment thread src/tests/fs_tests.rs
Comment thread src/tests/fs_tests.rs Outdated
Comment thread src/tests/fs_tests.rs
Comment thread src/tests/fs_tests.rs
Copy link
Copy Markdown
Member

@rupeshkoushik07 rupeshkoushik07 left a comment

Choose a reason for hiding this comment

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

looks good to me!

@ve1nard ve1nard requested a review from rennergade July 1, 2024 16:27
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.

Minor comment about the EFAULT check. I also don't really know why there are so many extra files in this PR.

Otherwise really great job on this one, incredibly thorough.

@ve1nard ve1nard requested a review from rennergade July 1, 2024 23:53
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.

Awesome. Great job!

@rennergade rennergade merged commit bdcd106 into develop Jul 2, 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.

4 participants