diff options
| author | Alan Somers <asomers@FreeBSD.org> | 2019-06-26 23:10:20 +0000 |
|---|---|---|
| committer | Alan Somers <asomers@FreeBSD.org> | 2019-06-26 23:10:20 +0000 |
| commit | f74b33d9dbdc1235d409ab098d71277d33b8b8e1 (patch) | |
| tree | b002264392125ccff38d314737490b4e2a0f4f98 /tests/sys | |
| parent | 7fc0921d7e3c52f66ca8e47c0413ee46f6d73328 (diff) | |
Notes
Diffstat (limited to 'tests/sys')
| -rw-r--r-- | tests/sys/fs/fusefs/read.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index fa70949ab604b..cd82c0656ebd6 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -563,14 +563,13 @@ TEST_F(Read, mmap) expect_lookup(RELPATH, ino, bufsize); expect_open(ino, 0, 1); - /* mmap may legitimately try to read more data than is available */ EXPECT_CALL(*m_mock, process( ResultOf([=](auto in) { return (in.header.opcode == FUSE_READ && in.header.nodeid == ino && in.body.read.fh == Read::FH && in.body.read.offset == 0 && - in.body.read.size >= bufsize); + in.body.read.size == bufsize); }, Eq(true)), _) ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { @@ -608,16 +607,15 @@ TEST_F(Read, mmap_eof) len = getpagesize(); - expect_lookup(RELPATH, ino, 100000); + expect_lookup(RELPATH, ino, m_maxbcachebuf); expect_open(ino, 0, 1); - /* mmap may legitimately try to read more data than is available */ EXPECT_CALL(*m_mock, process( ResultOf([=](auto in) { return (in.header.opcode == FUSE_READ && in.header.nodeid == ino && in.body.read.fh == Read::FH && in.body.read.offset == 0 && - in.body.read.size >= bufsize); + in.body.read.size == (uint32_t)m_maxbcachebuf); }, Eq(true)), _) ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { @@ -802,14 +800,13 @@ TEST_F(Read, sendfile) expect_lookup(RELPATH, ino, bufsize); expect_open(ino, 0, 1); - /* Like mmap, sendfile may request more data than is available */ EXPECT_CALL(*m_mock, process( ResultOf([=](auto in) { return (in.header.opcode == FUSE_READ && in.header.nodeid == ino && in.body.read.fh == Read::FH && in.body.read.offset == 0 && - in.body.read.size >= bufsize); + in.body.read.size == bufsize); }, Eq(true)), _) ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { |
