Disabled a test for a feature that doesn't work on OS X.
parent
a88ad8dbf2
commit
eacbdb8d51
|
@ -456,7 +456,11 @@ type OpenFileOp struct {
|
||||||
// a particular inode go through the kernel, set this field to true to
|
// a particular inode go through the kernel, set this field to true to
|
||||||
// disable this behavior.
|
// 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
|
KeepPageCache bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -616,6 +616,12 @@ func (t *PageCacheTest) SingleFileHandle_KeepCache() {
|
||||||
func (t *PageCacheTest) TwoFileHandles_NoKeepCache() {
|
func (t *PageCacheTest) TwoFileHandles_NoKeepCache() {
|
||||||
t.fs.SetKeepCache(false)
|
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.
|
// Open the file.
|
||||||
f1, err := os.Open(path.Join(t.Dir, "foo"))
|
f1, err := os.Open(path.Join(t.Dir, "foo"))
|
||||||
AssertEq(nil, err)
|
AssertEq(nil, err)
|
||||||
|
|
Loading…
Reference in New Issue