fusefs: adapt the tests to the fuse => fusefs rename
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
f9856d0813
commit
9821f1d323
@ -713,7 +713,7 @@
|
|||||||
file
|
file
|
||||||
..
|
..
|
||||||
fs
|
fs
|
||||||
fuse
|
fusefs
|
||||||
..
|
..
|
||||||
tmpfs
|
tmpfs
|
||||||
..
|
..
|
||||||
|
@ -7,7 +7,7 @@ TESTSDIR= ${TESTSBASE}/sys/fs
|
|||||||
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/fs
|
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/fs
|
||||||
|
|
||||||
#TESTS_SUBDIRS+= nullfs # XXX: needs rump
|
#TESTS_SUBDIRS+= nullfs # XXX: needs rump
|
||||||
TESTS_SUBDIRS+= fuse
|
TESTS_SUBDIRS+= fusefs
|
||||||
TESTS_SUBDIRS+= tmpfs
|
TESTS_SUBDIRS+= tmpfs
|
||||||
|
|
||||||
${PACKAGE}FILES+= h_funcs.subr
|
${PACKAGE}FILES+= h_funcs.subr
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
PACKAGE= tests
|
PACKAGE= tests
|
||||||
|
|
||||||
TESTSDIR= ${TESTSBASE}/sys/fs/fuse
|
TESTSDIR= ${TESTSBASE}/sys/fs/fusefs
|
||||||
|
|
||||||
# We could simply link all of these files into a single executable. But since
|
# We could simply link all of these files into a single executable. But since
|
||||||
# Kyua treats googletest programs as plain tests, it's better to separate them
|
# Kyua treats googletest programs as plain tests, it's better to separate them
|
@ -171,7 +171,7 @@ ProcessMockerT ReturnImmediate(
|
|||||||
* "Mounts" a filesystem to a temporary directory and services requests
|
* "Mounts" a filesystem to a temporary directory and services requests
|
||||||
* according to the programmed expectations.
|
* according to the programmed expectations.
|
||||||
*
|
*
|
||||||
* Operates directly on the fuse(4) kernel API, not the libfuse(3) user api.
|
* Operates directly on the fusefs(4) kernel API, not the libfuse(3) user api.
|
||||||
*/
|
*/
|
||||||
class MockFS {
|
class MockFS {
|
||||||
/*
|
/*
|
@ -40,10 +40,10 @@
|
|||||||
|
|
||||||
using namespace testing;
|
using namespace testing;
|
||||||
|
|
||||||
/* Check that fuse(4) is accessible and the current user can mount(2) */
|
/* Check that fusefs(4) is accessible and the current user can mount(2) */
|
||||||
void check_environment()
|
void check_environment()
|
||||||
{
|
{
|
||||||
const char *mod_name = "fuse";
|
const char *mod_name = "fusefs";
|
||||||
const char *devnode = "/dev/fuse";
|
const char *devnode = "/dev/fuse";
|
||||||
const char *usermount_node = "vfs.usermount";
|
const char *usermount_node = "vfs.usermount";
|
||||||
int usermount_val = 0;
|
int usermount_val = 0;
|
@ -66,7 +66,7 @@ void expect_release(uint64_t ino, ProcessMockerT r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void require_sync_resize_0() {
|
void require_sync_resize_0() {
|
||||||
const char *sync_resize_node = "vfs.fuse.sync_resize";
|
const char *sync_resize_node = "vfs.fusefs.sync_resize";
|
||||||
int val = 0;
|
int val = 0;
|
||||||
size_t size = sizeof(val);
|
size_t size = sizeof(val);
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ void require_sync_resize_0() {
|
|||||||
<< strerror(errno);
|
<< strerror(errno);
|
||||||
if (val != 0)
|
if (val != 0)
|
||||||
GTEST_SKIP() <<
|
GTEST_SKIP() <<
|
||||||
"vfs.fuse.sync_resize must be set to 0 for this test."
|
"vfs.fusefs.sync_resize must be set to 0 for this test."
|
||||||
" That sysctl will probably be removed soon.";
|
" That sysctl will probably be removed soon.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ virtual void SetUp() {
|
|||||||
class WriteThrough: public Write {
|
class WriteThrough: public Write {
|
||||||
|
|
||||||
virtual void SetUp() {
|
virtual void SetUp() {
|
||||||
const char *cache_mode_node = "vfs.fuse.data_cache_mode";
|
const char *cache_mode_node = "vfs.fusefs.data_cache_mode";
|
||||||
int val = 0;
|
int val = 0;
|
||||||
size_t size = sizeof(val);
|
size_t size = sizeof(val);
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ virtual void SetUp() {
|
|||||||
ASSERT_EQ(0, sysctlbyname(cache_mode_node, &val, &size, NULL, 0))
|
ASSERT_EQ(0, sysctlbyname(cache_mode_node, &val, &size, NULL, 0))
|
||||||
<< strerror(errno);
|
<< strerror(errno);
|
||||||
if (val != 1)
|
if (val != 1)
|
||||||
GTEST_SKIP() << "vfs.fuse.data_cache_mode must be set to 1 "
|
GTEST_SKIP() << "vfs.fusefs.data_cache_mode must be set to 1 "
|
||||||
"(writethrough) for this test";
|
"(writethrough) for this test";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ virtual void SetUp() {
|
|||||||
class WriteBack: public Write {
|
class WriteBack: public Write {
|
||||||
|
|
||||||
virtual void SetUp() {
|
virtual void SetUp() {
|
||||||
const char *node = "vfs.fuse.data_cache_mode";
|
const char *node = "vfs.fusefs.data_cache_mode";
|
||||||
int val = 0;
|
int val = 0;
|
||||||
size_t size = sizeof(val);
|
size_t size = sizeof(val);
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ virtual void SetUp() {
|
|||||||
ASSERT_EQ(0, sysctlbyname(node, &val, &size, NULL, 0))
|
ASSERT_EQ(0, sysctlbyname(node, &val, &size, NULL, 0))
|
||||||
<< strerror(errno);
|
<< strerror(errno);
|
||||||
if (val != 2)
|
if (val != 2)
|
||||||
GTEST_SKIP() << "vfs.fuse.data_cache_mode must be set to 2 "
|
GTEST_SKIP() << "vfs.fusefs.data_cache_mode must be set to 2 "
|
||||||
"(writeback) for this test";
|
"(writeback) for this test";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ TEST_F(Write, DISABLED_direct_io_short_write_iov)
|
|||||||
* write, then it must set the FUSE_WRITE_CACHE bit
|
* write, then it must set the FUSE_WRITE_CACHE bit
|
||||||
*/
|
*/
|
||||||
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236378 */
|
/* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236378 */
|
||||||
// TODO: check vfs.fuse.mmap_enable
|
// TODO: check vfs.fusefs.mmap_enable
|
||||||
TEST_F(Write, DISABLED_mmap)
|
TEST_F(Write, DISABLED_mmap)
|
||||||
{
|
{
|
||||||
const char FULLPATH[] = "mountpoint/some_file.txt";
|
const char FULLPATH[] = "mountpoint/some_file.txt";
|
Loading…
x
Reference in New Issue
Block a user