fsImpl.Check: Bail out early on Linux.

To my great disappointment, I can't figure out a way to make this test
reliable on Linux. Hopefully the cited mailing list thread will come
Aaron Jacobs 2015-03-31 16:01:22 +11:00
parent 6b4a733e56
commit e859e64179
1 changed files with 11 additions and 0 deletions

View File

@ -17,6 +17,7 @@ package forgetfs
import (
@ -183,6 +184,16 @@ func (fs *fsImpl) Check() {
defer fs.mu.Unlock()
// On Linux we often don't receive forget ops, and never receive destroy ops
// (cf. http://goo.gl/EUbxEg, fuse-devel thread "Root inode lookup count").
// So there's not really much we can check here.
// TODO(jacobsa): Figure out why we don't receive destroy. If we can reliably
// receive it, we can treat it as "forget all".
if runtime.GOOS == "linux" {
for k, v := range fs.inodes {
// Special case: we don't require the root inode to have reached zero.
// OS X doesn't seem to send forgets for the root, and Linux only does