Fixed FlushFSTest.Dup_FlushError for darwin.

geesefs-0-30-9
Aaron Jacobs 2015-03-23 10:43:32 +11:00
parent d2445f678d
commit fef2721042
1 changed files with 9 additions and 3 deletions

View File

@ -496,12 +496,18 @@ func (t *FlushFSTest) Dup_FlushError() {
// Configure a flush error.
t.setFlushError(fuse.ENOENT)
// Close by the first handle.
// Close by the first handle. On OS X, where the semantics of file handles
// are different (cf. https://github.com/osxfuse/osxfuse/issues/199), this
// does not result in an error.
err = t.f1.Close()
t.f1 = nil
AssertNe(nil, err)
ExpectThat(err, Error(HasSubstr("no such file")))
if runtime.GOOS == "darwin" {
AssertEq(nil, err)
} else {
AssertNe(nil, err)
ExpectThat(err, Error(HasSubstr("no such file")))
}
// Close by the second handle.
err = t.f2.Close()