fusefs: rename the ReadCacheable.default_readahead test
The test didn't actually have anything to do with readahead. Rename it to "ReadCacheable.cache_block" Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
b5aaf286ea
commit
eadd12d35d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=349136
@ -628,8 +628,11 @@ TEST_F(Read_7_8, read)
|
||||
/* Deliberately leak fd. close(2) will be tested in release.cc */
|
||||
}
|
||||
|
||||
/* If the filesystem allows it, the kernel should try to readahead */
|
||||
TEST_F(ReadCacheable, default_readahead)
|
||||
/*
|
||||
* If cacheing is enabled, the kernel should try to read an entire cache block
|
||||
* at a time.
|
||||
*/
|
||||
TEST_F(ReadCacheable, cache_block)
|
||||
{
|
||||
const char FULLPATH[] = "mountpoint/some_file.txt";
|
||||
const char RELPATH[] = "some_file.txt";
|
||||
@ -637,9 +640,7 @@ TEST_F(ReadCacheable, default_readahead)
|
||||
uint64_t ino = 42;
|
||||
int fd;
|
||||
ssize_t bufsize = 8;
|
||||
/* hard-coded in fuse_internal.c */
|
||||
size_t default_maxreadahead = 65536;
|
||||
ssize_t filesize = default_maxreadahead * 2;
|
||||
ssize_t filesize = m_maxbcachebuf * 2;
|
||||
char *contents;
|
||||
char buf[bufsize];
|
||||
const char *contents1 = CONTENTS0 + bufsize;
|
||||
@ -650,7 +651,7 @@ TEST_F(ReadCacheable, default_readahead)
|
||||
|
||||
expect_lookup(RELPATH, ino, filesize);
|
||||
expect_open(ino, 0, 1);
|
||||
expect_read(ino, 0, default_maxreadahead, default_maxreadahead,
|
||||
expect_read(ino, 0, m_maxbcachebuf, m_maxbcachebuf,
|
||||
contents);
|
||||
|
||||
fd = open(FULLPATH, O_RDONLY);
|
||||
|
Loading…
Reference in New Issue
Block a user