vfs: add tests and subsequent fixes

* Tests for VFS layer
  * Small fixes found during testing
  * Fix Close, Flush and Release behaviour for ReadFileHandle and WriteFileHandle
  * Fix nil object bugs on File
This commit is contained in:
Nick Craig-Wood 2017-10-29 21:14:05 +00:00
parent 07ec8073fe
commit e18122e88b
18 changed files with 1536 additions and 59 deletions

View file

@ -42,9 +42,9 @@ func TestWriteFileDoubleClose(t *testing.T) {
_, err = syscall.Write(fd2, buf)
assert.Error(t, err, "input/output error")
// close the dup - should produce an error
// close the dup - should not produce an error
err = syscall.Close(fd2)
assert.Error(t, err, "input/output error")
assert.NoError(t, err)
run.rm(t, "testdoubleclose")
}