fusefs: fix the FUSE_FORGET unit test after r364064

Thanks to r364064, the name cache now returns a hit where previously it
would miss.  Adjust the expectations accordingly.

PR:		248583
Reported by:	lwhsu
MFC with:	r364064
This commit is contained in:
Alan Somers 2020-08-11 01:09:06 +00:00
parent 02511d2112
commit 8d2105da16

View File

@ -116,6 +116,7 @@ TEST_F(Forget, invalidate_names)
int err;
EXPECT_LOOKUP(FUSE_ROOT_ID, DNAME)
.Times(2)
.WillRepeatedly(Invoke(
ReturnImmediate([=](auto in __unused, auto& out) {
SET_OUT_HEADER_LEN(out, entry);
@ -142,7 +143,7 @@ TEST_F(Forget, invalidate_names)
out.body.entry.attr_valid = UINT64_MAX;
out.body.entry.entry_valid = UINT64_MAX;
})));
expect_forget(dir_ino, 2);
expect_forget(dir_ino, 1);
/* Access the file to cache its name */
ASSERT_EQ(0, access(FULLFPATH, F_OK)) << strerror(errno);