Bug 248583 - fusefs(5): sys.fs.fusefs.forget.main fails after base r364063 and base r364067
Summary: fusefs(5): sys.fs.fusefs.forget.main fails after base r364063 and base r364067
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Alan Somers
URL:
Keywords: needs-qa, regression
Depends on:
Blocks:
 
Reported: 2020-08-10 19:43 UTC by Li-Wen Hsu
Modified: 2020-08-11 01:19 UTC (History)
2 users (show)

See Also:
asomers: mfc-stable12-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Li-Wen Hsu freebsd_committer 2020-08-10 19:43:09 UTC
sys.fs.fusefs.forget.main fails after [r364063, r364067]

https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16106/testReport/junit/sys.fs.fusefs/forget/main/
https://ci.freebsd.org/job/FreeBSD-head-i386-test/10207/testReport/junit/sys.fs.fusefs/forget/main/

It looks the mocking FS needs updating?

Stdout:

[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from Forget
[ RUN      ] Forget.ok
[       OK ] Forget.ok (3 ms)
[ RUN      ] Forget.invalidate_names
unknown file: Failure

Unexpected mock function call - taking default action specified at:
/usr/src/tests/sys/fs/fusefs/mockfs.cc:447:
    Function call: process(@0x801400180 135168-byte object <30-00 00-00 02-00 00-00 05-00 00-00 00-00 00-00 2A-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 57-52 00-00 00-00 00-00 01-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 ... 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00>, @0x7fffdfdfcf60 {})
Google Mock tried the following 5 expectations, but none matched:

/usr/src/tests/sys/fs/fusefs/utils.cc:179: tried expectation #0: EXPECT_CALL(*m_mock, process( ResultOf([=](auto in) { return (in.header.opcode == FUSE_ACCESS); }, Eq(true)), _))...
  Expected arg #0: is mapped by the given callable to a value that is equal to true
           Actual: 135168-byte object <30-00 00-00 02-00 00-00 05-00 00-00 00-00 00-00 2A-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 57-52 00-00 00-00 00-00 01-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 ... 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00>, which is mapped by the given callable to false (of type bool)
         Expected: to be called any number of times
           Actual: called once - satisfied and active
/usr/src/tests/sys/fs/fusefs/utils.cc:193: tried expectation #1: EXPECT_CALL(*m_mock, process( ResultOf([=](auto in) { return (in.header.opcode == FUSE_BMAP); }, Eq(true)), _))...
  Expected arg #0: is mapped by the given callable to a value that is equal to true
           Actual: 135168-byte object <30-00 00-00 02-00 00-00 05-00 00-00 00-00 00-00 2A-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 57-52 00-00 00-00 00-00 01-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 ... 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00>, which is mapped by the given callable to false (of type bool)
         Expected: to be called any number of times
           Actual: never called - satisfied and active
/usr/src/tests/sys/fs/fusefs/forget.cc:118: tried expectation #2: EXPECT_CALL(*m_mock, process( ResultOf([=](auto in) { return (in.header.opcode == FUSE_LOOKUP && in.header.nodeid == (1) && strcmp(in.body.lookup, (DNAME)) == 0); }, Eq(true)), _))...
  Expected arg #0: is mapped by the given callable to a value that is equal to true
           Actual: 135168-byte object <30-00 00-00 02-00 00-00 05-00 00-00 00-00 00-00 2A-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 57-52 00-00 00-00 00-00 01-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 ... 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00>, which is mapped by the given callable to false (of type bool)
         Expected: to be called any number of times
           Actual: called once - satisfied and active
/usr/src/tests/sys/fs/fusefs/forget.cc:134: tried expectation #3: EXPECT_CALL(*m_mock, process( ResultOf([=](auto in) { return (in.header.opcode == FUSE_LOOKUP && in.header.nodeid == (dir_ino) && strcmp(in.body.lookup, (FNAME)) == 0); }, Eq(true)), _))...
  Expected arg #0: is mapped by the given callable to a value that is equal to true
           Actual: 135168-byte object <30-00 00-00 02-00 00-00 05-00 00-00 00-00 00-00 2A-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 57-52 00-00 00-00 00-00 01-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 ... 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00>, which is mapped by the given callable to false (of type bool)
         Expected: to be called twice
           Actual: called once - unsatisfied and active
/usr/src/tests/sys/fs/fusefs/utils.cc:252: tried expectation #4: EXPECT_CALL(*m_mock, process( ResultOf([=](auto in) { return (in.header.opcode == FUSE_FORGET && in.header.nodeid == ino && in.body.forget.nlookup == nlookup); }, Eq(true)), _))...
  Expected arg #0: is mapped by the given callable to a value that is equal to true
           Actual: 135168-byte object <30-00 00-00 02-00 00-00 05-00 00-00 00-00 00-00 2A-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 57-52 00-00 00-00 00-00 01-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 ... 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00>, which is mapped by the given callable to false (of type bool)
         Expected: to be called once
           Actual: never called - unsatisfied and active
/usr/src/tests/sys/fs/fusefs/mockfs.cc:914: Failure
Value of: r > 0 || errno == EAGAIN
  Actual: false
Expected: true
Invalid argument
/usr/src/tests/sys/fs/fusefs/utils.cc:252: Failure
Actual function call count doesn't match EXPECT_CALL(*m_mock, process( ResultOf([=](auto in) { return (in.header.opcode == FUSE_FORGET && in.header.nodeid == ino && in.body.forget.nlookup == nlookup); }, Eq(true)), _))...
         Expected: to be called once
           Actual: never called - unsatisfied and active
[  FAILED  ] Forget.invalidate_names (4 ms)
[----------] 2 tests from Forget (7 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (7 ms total)
[  PASSED  ] 1 test.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] Forget.invalidate_names

 1 FAILED TEST
Comment 1 Alan Somers freebsd_committer 2020-08-10 20:32:19 UTC
Yes, I think you're correct.  mjg made several VFS changes in that range.  I'll fix it.
Comment 2 commit-hook freebsd_committer 2020-08-11 01:09:11 UTC
A commit references this bug:

Author: asomers
Date: Tue Aug 11 01:09:07 UTC 2020
New revision: 364094
URL: https://svnweb.freebsd.org/changeset/base/364094

Log:
  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

Changes:
  head/tests/sys/fs/fusefs/forget.cc
Comment 3 Alan Somers freebsd_committer 2020-08-11 01:19:45 UTC
No MFC is needed or desired, because there are no plans to MFC r364064.