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
[x] 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)
[x] Testing (addition of new tests or update to current tests)
[ ] Documentation (a change to man pages or other documentation)
Checklist:
[x] My code follows the UnifyFS code style requirements.
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
Checklist: