Commit 4255d6fd authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fuse/test: verify that rename of nonexistent returns ENOENT

parent 8020c188
...@@ -453,6 +453,16 @@ func TestRename(t *testing.T) { ...@@ -453,6 +453,16 @@ func TestRename(t *testing.T) {
} }
} }
func TestRenameNonExistent(t *testing.T) {
tc := NewTestCase(t)
defer tc.Cleanup()
err := os.Rename(tc.mnt+"/doesnotexist", tc.mnt+"/doesnotmatter")
if !os.IsNotExist(err) {
t.Errorf("got err %v, want ENOENT", err)
}
}
// Flaky test, due to rename race condition. // Flaky test, due to rename race condition.
func TestDelRename(t *testing.T) { func TestDelRename(t *testing.T) {
tc := NewTestCase(t) tc := NewTestCase(t)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment