Commit 8c884fd9 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Fix data race in TestUnionFsDisappearing.

parent 5f82a882
......@@ -911,9 +911,10 @@ func TestUnionFsDisappearing(t *testing.T) {
err = os.Remove(wd + "/mnt/file")
CheckSuccess(err)
oldRoot := wrFs.Root
state.ThreadSanitizerSync()
oldRoot := wrFs.Root
wrFs.Root = "/dev/null"
state.ThreadSanitizerSync()
time.Sleep((3 * entryTtl) / 2)
_, err = ioutil.ReadDir(wd + "/mnt")
......@@ -930,6 +931,7 @@ func TestUnionFsDisappearing(t *testing.T) {
// Restore, and wait for caches to catch up.
wrFs.Root = oldRoot
state.ThreadSanitizerSync()
time.Sleep((3 * entryTtl) / 2)
_, err = ioutil.ReadDir(wd + "/mnt")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment