Commit 6fe7f548 authored by Aaron Jacobs's avatar Aaron Jacobs

Updated a few tests for darwin's special entry cache behavior.

parent b9b5a4f5
......@@ -19,6 +19,7 @@ import (
"log"
"os"
"path"
"runtime"
"strings"
"syscall"
"testing"
......@@ -353,12 +354,17 @@ func (t *EntryCachingTest) StatRenumberStat() {
// But after waiting for the entry cache to expire, we should see the new
// IDs.
//
// Note that the cache is not guaranteed to expire on darwin. See notes on
// fuse.MountConfig.EnableVnodeCaching.
if runtime.GOOS != "darwin" {
time.Sleep(2 * t.lookupEntryTimeout)
fooAfter, dirAfter, barAfter = t.statAll()
ExpectEq(t.fs.FooID(), getInodeID(fooAfter))
ExpectEq(t.fs.DirID(), getInodeID(dirAfter))
ExpectEq(t.fs.BarID(), getInodeID(barAfter))
}
}
func (t *EntryCachingTest) StatMtimeStat() {
......@@ -395,6 +401,10 @@ func (t *EntryCachingTest) StatRenumberMtimeStat() {
// After waiting for the entry cache to expire, we should see fresh
// everything.
//
// Note that the cache is not guaranteed to expire on darwin. See notes on
// fuse.MountConfig.EnableVnodeCaching.
if runtime.GOOS != "darwin" {
time.Sleep(2 * t.lookupEntryTimeout)
fooAfter, dirAfter, barAfter = t.statAll()
......@@ -405,6 +415,7 @@ func (t *EntryCachingTest) StatRenumberMtimeStat() {
ExpectThat(fooAfter.ModTime(), timeutil.TimeEq(newMtime))
ExpectThat(dirAfter.ModTime(), timeutil.TimeEq(newMtime))
ExpectThat(barAfter.ModTime(), timeutil.TimeEq(newMtime))
}
}
////////////////////////////////////////////////////////////////////////
......
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