From b2f9195e90659d032a017f13dad7e72ff35bc3c2 Mon Sep 17 00:00:00 2001 From: asomers Date: Sat, 30 Mar 2019 00:54:01 +0000 Subject: [PATCH] fusefs: fix more tests when data caching is disabled readahead is also disallowed when data_cache_mode=0. This should've been part of r345720. Sponsored by: The FreeBSD Foundation --- tests/sys/fs/fusefs/read.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index 07b532ca4a1..dd56202519b 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -78,7 +78,7 @@ class AsyncRead: public AioRead { } }; -class ReadMmap: public Read { +class ReadCacheable: public Read { public: virtual void SetUp() { const char *node = "vfs.fusefs.data_cache_mode"; @@ -95,7 +95,7 @@ virtual void SetUp() { } }; -class ReadAhead: public Read, public WithParamInterface { +class ReadAhead: public ReadCacheable, public WithParamInterface { virtual void SetUp() { m_maxreadahead = GetParam(); Read::SetUp(); @@ -467,7 +467,7 @@ TEST_F(Read, keep_cache_disabled) /* Deliberately leak fd0 and fd1. */ } -TEST_F(ReadMmap, mmap) +TEST_F(ReadCacheable, mmap) { const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt"; @@ -600,7 +600,7 @@ TEST_F(Read, read) } /* If the filesystem allows it, the kernel should try to readahead */ -TEST_F(Read, default_readahead) +TEST_F(ReadCacheable, default_readahead) { const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt"; @@ -638,7 +638,7 @@ TEST_F(Read, default_readahead) } /* Reading with sendfile should work (though it obviously won't be 0-copy) */ -TEST_F(ReadMmap, sendfile) +TEST_F(ReadCacheable, sendfile) { const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt"; @@ -685,7 +685,7 @@ TEST_F(ReadMmap, sendfile) /* sendfile should fail gracefully if fuse declines the read */ /* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236466 */ -TEST_F(ReadMmap, DISABLED_sendfile_eio) +TEST_F(ReadCacheable, DISABLED_sendfile_eio) { const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt"; -- 2.45.0