Disabled a test for a feature that doesn't work on OS X.

geesefs-0-30-9
Aaron Jacobs 2015-07-29 16:24:47 +10:00
parent a88ad8dbf2
commit eacbdb8d51
2 changed files with 11 additions and 1 deletions

View File

@ -456,7 +456,11 @@ type OpenFileOp struct {
// a particular inode go through the kernel, set this field to true to
// disable this behavior.
//
// More discussion: http://goo.gl/cafzWF
// (More discussion: http://goo.gl/cafzWF)
//
// Note that on OS X it appears that the behavior is always as if this field
// is set to true, regardless of its value, at least for files opened in the
// same mode. (Cf. https://github.com/osxfuse/osxfuse/issues/223)
KeepPageCache bool
}

View File

@ -616,6 +616,12 @@ func (t *PageCacheTest) SingleFileHandle_KeepCache() {
func (t *PageCacheTest) TwoFileHandles_NoKeepCache() {
t.fs.SetKeepCache(false)
// SetKeepCache(false) doesn't work on OS X. See the notes on
// OpenFileOp.KeepPageCache.
if runtime.GOOS == "darwin" {
return
}
// Open the file.
f1, err := os.Open(path.Join(t.Dir, "foo"))
AssertEq(nil, err)