You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have 3 file_* tests in the test suite. There are 6 operations that
need testing. There are tests required when the file exists and when it
does not. That makes 12 tests (which could be 6 compound tests, or even
all covered in one test).
The text was updated successfully, but these errors were encountered:
There are 6 different file operations that need testing:
CREATE, READ, DELETE, MODIFY, PERMISSIONS, OWNERSHIP.
The current tests cover CREATE, DELETE, RENAME.
A recent bug also found that there was a difference in behaviour of CREATE if the file existed vs. not, so other file operations were checked for missing records.
Test for all 12 of these combinations (and also add rename).
CREATE uses open with flags O_WRONLY|O_CREAT and optionally O_NOCTTY, O_NONBLOCK, O_TRUNC, O_APPEND.
READ uses open with flag O_RDONLY.
DELETE uses stat and unlink*.
MODIFY uses open with flags O_RDWR, O_CREAT.
PERMISSIONS uses stat and fchmod*.
OWNERSHIP uses stat and fchown*.
RENAME uses stat and rename.
Proposed work:
Augment the file_create test to include pre-existing target file condition.
Augment the file_delete test to include non-existing target file condition.
Augment the file_rename test to include a non-existing target file condition.
Add tests for file_read, file_modify, file_perms, file_owner for both non-existing and pre-existing cases.
Outstanding questions:
Should there be dirstat records for non-existing file targets for READ, PERMISSION, OWNERSHIP, RENAME and stat operations? (I'd suggest yes.)
From an email with @rgbriggs:
The text was updated successfully, but these errors were encountered: