Repository navigation
lib/model: Fixes on receive-only test setup and pulling - #5136
Merged
Merged
Conversation
AudriusButkevicius
approved these changes
Aug 19, 2018
calmh
pushed a commit
that referenced
this pull request
Sep 2, 2018
calmh
added a commit
to calmh/syncthing
that referenced
this pull request
Sep 2, 2018
* release: lib/model: Fixes on receive-only test setup and pulling (syncthing#5136) lib/fs: Don't add path separators at end of path (fixes syncthing#5144) (syncthing#5146) lib/fs: Evaluate root when watching not on fs creation (fixes syncthing#5043) (syncthing#5105)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Purpose
For some weird reason receive-only tests do show failures occurring during pulling. By
TestReceiveOnlyRevertNeedsrepeatedly I can consistently get the following issue:The problem is, that test file infos are generated without blocks and at this point in the puller, that results in an index out of range:
https://github.com/syncthing/syncthing/blob/master/lib/model/folder_sendrecv.go#L463
In production that can never happen, because the file infos are checked for consistency (at least one block if undeleted and regular).
The second small fix is that a file wasn't marked as done in the queue, if there was an error with it's parent directory.
As one if these issue is solely testing and the other is tiny, I don't believe this merits a changelog entry.
Testing
Running
TestReceiveOnlyRevertNeeds50x without this error.