Skip to content

Add tests to BackupFS for metadata reuse and error handling - #81

Merged
john-behm-bertelsmann merged 1 commit into
masterfrom
fix/rename-and-metadata-reuse
Oct 8, 2026
Merged

john-behm-bertelsmann merged 1 commit into
masterfrom
fix/rename-and-metadata-reuse

Conversation

@john-behm-bertelsmann

Copy link
Copy Markdown
Collaborator
  • Implemented TestBackupFS_CreateAvoidsDuplicateLstat to ensure Lstat is not called multiple times during file creation.
  • Added TestBackupFS_RejectsEmptyPath to verify that operations with empty paths return appropriate errors.
  • Created TestBackupFS_CreateNormalizesUncleanPath to check path normalization during file creation.
  • Introduced TestBackupFS_OpenFileAvoidsDuplicateLstat to confirm Lstat calls are minimized when opening files.
  • Added TestBackupFS_RemoveAllReusesObservedMetadata to ensure metadata is reused during removal operations.
  • Implemented TestBackupFS_RemoveAllPreservesErrorsAndRollback to verify error handling during removal.
  • Created TestBackupFS_RenameOverwriteRollback to check rollback functionality during renaming.
  • Added TestBackupFS_RenameAvoidsDuplicateLstat to ensure efficient metadata handling during renaming.
  • Implemented TestBackupFS_SymlinkReusesResolvedMetadata to confirm symlink creation reuses metadata.
  • Added TestBackupFS_MkdirReusesResolvedMetadata to ensure directory creation reuses metadata.
  • Implemented TestBackupFS_ChmodAvoidsDuplicateLstat and TestBackupFS_ChownAvoidsDuplicateLstat to minimize Lstat calls during permission changes.
  • Created TestBackupFS_ChtimesAvoidsDuplicateLstat to ensure efficient handling of modification times.
  • Added utility type lstatCountingFS to count Lstat calls for testing purposes.

- Implemented TestBackupFS_CreateAvoidsDuplicateLstat to ensure Lstat is not called multiple times during file creation.
- Added TestBackupFS_RejectsEmptyPath to verify that operations with empty paths return appropriate errors.
- Created TestBackupFS_CreateNormalizesUncleanPath to check path normalization during file creation.
- Introduced TestBackupFS_OpenFileAvoidsDuplicateLstat to confirm Lstat calls are minimized when opening files.
- Added TestBackupFS_RemoveAllReusesObservedMetadata to ensure metadata is reused during removal operations.
- Implemented TestBackupFS_RemoveAllPreservesErrorsAndRollback to verify error handling during removal.
- Created TestBackupFS_RenameOverwriteRollback to check rollback functionality during renaming.
- Added TestBackupFS_RenameAvoidsDuplicateLstat to ensure efficient metadata handling during renaming.
- Implemented TestBackupFS_SymlinkReusesResolvedMetadata to confirm symlink creation reuses metadata.
- Added TestBackupFS_MkdirReusesResolvedMetadata to ensure directory creation reuses metadata.
- Implemented TestBackupFS_ChmodAvoidsDuplicateLstat and TestBackupFS_ChownAvoidsDuplicateLstat to minimize Lstat calls during permission changes.
- Created TestBackupFS_ChtimesAvoidsDuplicateLstat to ensure efficient handling of modification times.
- Added utility type lstatCountingFS to count Lstat calls for testing purposes.
@john-behm-bertelsmann
john-behm-bertelsmann merged commit aa0a1a1 into master Oct 8, 2026
15 checks passed
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.

1 participant