fusefs: fix some intermittency in the Kqueue.data test
Expect the FUSE_GETATTR operations for bar and baz to come in either order. Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
3d15b234a4
commit
6fd2d8e148
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=347630
@ -121,6 +121,7 @@ TEST_F(Kqueue, data)
|
|||||||
uint64_t foo_ino = 42;
|
uint64_t foo_ino = 42;
|
||||||
uint64_t bar_ino = 43;
|
uint64_t bar_ino = 43;
|
||||||
uint64_t baz_ino = 44;
|
uint64_t baz_ino = 44;
|
||||||
|
Sequence seq;
|
||||||
|
|
||||||
ASSERT_EQ(0, sem_init(&sem0, 0, 0)) << strerror(errno);
|
ASSERT_EQ(0, sem_init(&sem0, 0, 0)) << strerror(errno);
|
||||||
ASSERT_EQ(0, sem_init(&sem1, 0, 0)) << strerror(errno);
|
ASSERT_EQ(0, sem_init(&sem1, 0, 0)) << strerror(errno);
|
||||||
@ -169,10 +170,11 @@ TEST_F(Kqueue, data)
|
|||||||
EXPECT_CALL(*m_mock, process(
|
EXPECT_CALL(*m_mock, process(
|
||||||
ResultOf([=](auto in) {
|
ResultOf([=](auto in) {
|
||||||
return (in->header.opcode == FUSE_GETATTR &&
|
return (in->header.opcode == FUSE_GETATTR &&
|
||||||
in->header.nodeid == bar_ino);
|
(in->header.nodeid == bar_ino ||
|
||||||
|
in->header.nodeid == baz_ino));
|
||||||
}, Eq(true)),
|
}, Eq(true)),
|
||||||
_)
|
_)
|
||||||
)
|
).InSequence(seq)
|
||||||
.WillOnce(Invoke(ReturnImmediate([&](auto in, auto out) {
|
.WillOnce(Invoke(ReturnImmediate([&](auto in, auto out) {
|
||||||
nready1 = m_mock->m_nready;
|
nready1 = m_mock->m_nready;
|
||||||
out->header.unique = in->header.unique;
|
out->header.unique = in->header.unique;
|
||||||
@ -182,10 +184,11 @@ TEST_F(Kqueue, data)
|
|||||||
EXPECT_CALL(*m_mock, process(
|
EXPECT_CALL(*m_mock, process(
|
||||||
ResultOf([=](auto in) {
|
ResultOf([=](auto in) {
|
||||||
return (in->header.opcode == FUSE_GETATTR &&
|
return (in->header.opcode == FUSE_GETATTR &&
|
||||||
in->header.nodeid == baz_ino);
|
(in->header.nodeid == bar_ino ||
|
||||||
|
in->header.nodeid == baz_ino));
|
||||||
}, Eq(true)),
|
}, Eq(true)),
|
||||||
_)
|
_)
|
||||||
)
|
).InSequence(seq)
|
||||||
.WillOnce(Invoke(ReturnImmediate([&](auto in, auto out) {
|
.WillOnce(Invoke(ReturnImmediate([&](auto in, auto out) {
|
||||||
nready2 = m_mock->m_nready;
|
nready2 = m_mock->m_nready;
|
||||||
out->header.unique = in->header.unique;
|
out->header.unique = in->header.unique;
|
||||||
|
Loading…
Reference in New Issue
Block a user