Repository navigation
test(ios): lock the folder a failing sync merge save writes to, since the core resets its mode - #4686
Merged
Merged
Conversation
… the core resets its mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AppStateLibraryTests.unsavedSyncMergeIsReportedsetCore/to 0o555 to make a sync merge's save fail. The core'sfs::write_private_blockingcallsensure_private_dir, which sets that folder back to 0700 before every write (core/crates/storage/src/fs.rs). So the save went through and the test failed on main.set_permissionsis refused with EPERM, so the save fails as the test intends.whileLocked(_:_:), which clears the flag in adeferon every way out of its body: normal return, a failed#expectand a thrown error. A failure to clear it is recorded as an issue, not dropped. A flag left set would make the fixture's temp folder undeletable.Test plan
integ/mac-keys-ui-r1at 3919e4a, failed at line 649 every time, alone too (1 of 52).AppStateLibraryTests52/52.app-state-*test roots carries the immutable flag (find ... -flags +uchgfinds none).