Skip to content

Commit 5104b2c

Browse files
committed
fuse/test: remove TestEntryNotify
This test sets up a non-existent LOOKUP, and then tries to invalidate the negative dentry. On recent kernels, this has started returning ENOENT. Since fuse/test tests fuse/pathfs and fuse/nodefs, which are deprecated, remove the test. Change-Id: Ie57d7c1aa291970500282568ea9ad2bb6a6a6964
1 parent 83403f7 commit 5104b2c

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

fuse/test/notify_linux_test.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -148,34 +148,3 @@ func TestInodeNotify(t *testing.T) {
148148
t.Error(fi)
149149
}
150150
}
151-
152-
func TestEntryNotify(t *testing.T) {
153-
test := NewNotifyTest(t)
154-
defer test.Clean()
155-
156-
dir := test.dir
157-
test.fs.sizeChan <- 42
158-
test.fs.existChan <- false
159-
160-
fn := dir + "/dir/file"
161-
fi, _ := os.Lstat(fn)
162-
if fi != nil {
163-
t.Errorf("File should not exist, %#v", fi)
164-
}
165-
166-
test.fs.existChan <- true
167-
fi, _ = os.Lstat(fn)
168-
if fi != nil {
169-
t.Errorf("negative entry should have been cached: %#v", fi)
170-
}
171-
172-
code := test.pathfs.EntryNotify("dir", "file")
173-
if !code.Ok() {
174-
t.Errorf("EntryNotify returns error: %v", code)
175-
}
176-
177-
fi, err := os.Lstat(fn)
178-
if err != nil {
179-
t.Fatalf("Lstat failed: %v", err)
180-
}
181-
}

0 commit comments

Comments
 (0)