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:
parent
07ec8073fe
commit
e18122e88b
18 changed files with 1536 additions and 59 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue