fusefs: fix the tests for nondefault values of vfs.maxbcachebuf
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
89efdc3591
commit
f854d6baa7
@ -163,7 +163,7 @@ TEST_F(AioRead, async_read_disabled)
|
||||
ssize_t bufsize = 50;
|
||||
char buf0[bufsize], buf1[bufsize];
|
||||
off_t off0 = 0;
|
||||
off_t off1 = 65536;
|
||||
off_t off1 = m_maxbcachebuf;
|
||||
struct aiocb iocb0, iocb1;
|
||||
volatile sig_atomic_t read_count = 0;
|
||||
|
||||
@ -243,13 +243,14 @@ TEST_F(AsyncRead, async_read)
|
||||
ssize_t bufsize = 50;
|
||||
char buf0[bufsize], buf1[bufsize];
|
||||
off_t off0 = 0;
|
||||
off_t off1 = 65536;
|
||||
off_t off1 = m_maxbcachebuf;
|
||||
off_t fsize = 2 * m_maxbcachebuf;
|
||||
struct aiocb iocb0, iocb1;
|
||||
sem_t sem;
|
||||
|
||||
ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno);
|
||||
|
||||
expect_lookup(RELPATH, ino, 131072);
|
||||
expect_lookup(RELPATH, ino, fsize);
|
||||
expect_open(ino, 0, 1);
|
||||
EXPECT_CALL(*m_mock, process(
|
||||
ResultOf([=](auto in) {
|
||||
|
@ -235,10 +235,13 @@ public:
|
||||
virtual void SetUp() {
|
||||
if (MAXPHYS < 2 * DFLTPHYS)
|
||||
GTEST_SKIP() << "MAXPHYS must be at least twice DFLTPHYS"
|
||||
<< "for this test";
|
||||
<< " for this test";
|
||||
m_async = true;
|
||||
m_maxwrite = MAXPHYS;
|
||||
WriteBack::SetUp();
|
||||
if (MAXPHYS < 2 * m_maxbcachebuf)
|
||||
GTEST_SKIP() << "MAXPHYS must be at least twice maxbcachebuf"
|
||||
<< " for this test";
|
||||
}
|
||||
};
|
||||
|
||||
@ -619,7 +622,7 @@ TEST_F(WriteThrough, pwrite)
|
||||
const char RELPATH[] = "some_file.txt";
|
||||
const char *CONTENTS = "abcdefgh";
|
||||
uint64_t ino = 42;
|
||||
uint64_t offset = 65536;
|
||||
uint64_t offset = m_maxbcachebuf;
|
||||
int fd;
|
||||
ssize_t bufsize = strlen(CONTENTS);
|
||||
|
||||
@ -767,8 +770,8 @@ TEST_F(WriteCluster, clustering)
|
||||
uint64_t ino = 42;
|
||||
int i, fd;
|
||||
void *wbuf, *wbuf2x;
|
||||
ssize_t bufsize = 65536;
|
||||
off_t filesize = 327680;
|
||||
ssize_t bufsize = m_maxbcachebuf;
|
||||
off_t filesize = 5 * bufsize;
|
||||
|
||||
wbuf = malloc(bufsize);
|
||||
ASSERT_NE(NULL, wbuf) << strerror(errno);
|
||||
@ -814,8 +817,8 @@ TEST_F(WriteCluster, DISABLED_cluster_write_err)
|
||||
uint64_t ino = 42;
|
||||
int i, fd;
|
||||
void *wbuf;
|
||||
ssize_t bufsize = 65536;
|
||||
off_t filesize = 262144;
|
||||
ssize_t bufsize = m_maxbcachebuf;
|
||||
off_t filesize = 4 * bufsize;
|
||||
|
||||
wbuf = malloc(bufsize);
|
||||
ASSERT_NE(NULL, wbuf) << strerror(errno);
|
||||
|
Loading…
x
Reference in New Issue
Block a user