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
buildIssues caused by or requiring changes to the build system (scripts or Docker image)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
[TestRecvOnlyRevertNeeds] folder_recvonly_test.go:206: mkdir _recvonly: Access is denied.
which happens in a utility function generating files for testing in _recvonly/knownDir. Multiple tests use that dir, so the failures may be due to interference between tests. If every test used its own temporary dir, this could be ruled out as a cause.
There is something interesting going on that we should narrow down though, because there is no known way (to me) that that dir should get bad permissions, even if a test borks in the middle, and the tests run one after the other...
Sure, but frankly not interesting enough for me to want to spend time on (apart from that, I'd have no clue where to start looking). I initially wanted to just propose skipping it, then I saw that tests use the same directory, which in the past did mess with tests, so I figured I'd give that a shot first. And I was really frustrated by the red cross on the other PR even after multiple reruns.
Sure. So what appears to be happening here is that we now by default use file watching on folders, and when stopping that doesn't get shut down in time for the deferred os.Remove, and on Windows you cannot remove a folder that is being watched because It's open, or you cannot mkdir it again with the same name, or some such nonsense.
(Which makes me wonder how this works when pulling with the file watcher running...)
That sounds weird indeed, but shouldn't be a problem for pulling: Windows watcher (readdcw) is "natively recursive", so we only watch the folder root.
I don't have any idea how to wait for watching to be shut down before removing the test dir (except for stupidly retrying to remove until it works or times out).
Ah, that explains it. Then only the folder root is "locked" in this way. Disabling the watcher on the flaky tests seems to have solved them (it's passed 10 times or so now, with your changes merged as well as those apparently tickled it somehow a little extra)
buildIssues caused by or requiring changes to the build system (scripts or Docker image)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
Activity
calmh commentedon Aug 11, 2018
There is something interesting going on that we should narrow down though, because there is no known way (to me) that that dir should get bad permissions, even if a test borks in the middle, and the tests run one after the other...
imsodin commentedon Aug 11, 2018
Sure, but frankly not interesting enough for me to want to spend time on (apart from that, I'd have no clue where to start looking). I initially wanted to just propose skipping it, then I saw that tests use the same directory, which in the past did mess with tests, so I figured I'd give that a shot first. And I was really frustrated by the red cross on the other PR even after multiple reruns.
calmh commentedon Aug 11, 2018
Sure. So what appears to be happening here is that we now by default use file watching on folders, and when stopping that doesn't get shut down in time for the deferred os.Remove, and on Windows you cannot remove a folder that is being watched because It's open, or you cannot mkdir it again with the same name, or some such nonsense.
(Which makes me wonder how this works when pulling with the file watcher running...)
imsodin commentedon Aug 11, 2018
That sounds weird indeed, but shouldn't be a problem for pulling: Windows watcher (readdcw) is "natively recursive", so we only watch the folder root.
I don't have any idea how to wait for watching to be shut down before removing the test dir (except for stupidly retrying to remove until it works or times out).
lib/model: Run receive-only tests in temporary dirs (ref syncthing#5110)
calmh commentedon Aug 11, 2018
Ah, that explains it. Then only the folder root is "locked" in this way. Disabling the watcher on the flaky tests seems to have solved them (it's passed 10 times or so now, with your changes merged as well as those apparently tickled it somehow a little extra)
lib/model: Don't run watcher on recvonly tests (fixes syncthing#5110)