Skip to content
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

Add tests for stat(), lstat() and fstat() #773

Merged
merged 5 commits into from
Jun 5, 2023
Merged

Conversation

wangvsa
Copy link
Collaborator

@wangvsa wangvsa commented May 24, 2023

Description

Add tests for stat(), lstat() and fstat(). The new test actually identified an issue in the current fstat() implementation.
The current implementation does not check properly if the input file descriptor is a valid one.
For example, open --> close --> fstat would cause a seg fault instead of returning an error on the client side. This has been fixed.

Also fixed a typo in the unlink test.

Motivation and Context

Currently missing test for stat family calls, including stat(), lstat(), fstat(), _xstat(), _lxstat(), _fxstat() and their 64-bit version calls.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Testing (addition of new tests or update to current tests)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the UnifyFS code style requirements.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commit messages are properly formatted.

Signed-off-by: Chen Wang <wangvsa@gmail.com>
Signed-off-by: Chen Wang <wangvsa@gmail.com>
…pose

Signed-off-by: Chen Wang <wangvsa@gmail.com>
Signed-off-by: Chen Wang <wangvsa@gmail.com>
Signed-off-by: Chen Wang <wangvsa@gmail.com>
Copy link
Member

@CamStan CamStan left a comment

Choose a reason for hiding this comment

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

Nice! Thanks @wangvsa!

@adammoody adammoody merged commit e07093f into LLNL:dev Jun 5, 2023
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