From 9821f1d3231d4dea3e1319358f416425be2266a6 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 21 Mar 2019 00:11:43 +0000 Subject: [PATCH] fusefs: adapt the tests to the fuse => fusefs rename Sponsored by: The FreeBSD Foundation --- etc/mtree/BSD.tests.dist | 2 +- tests/sys/fs/Makefile | 2 +- tests/sys/fs/{fuse => fusefs}/Makefile | 2 +- tests/sys/fs/{fuse => fusefs}/access.cc | 0 tests/sys/fs/{fuse => fusefs}/create.cc | 0 .../sys/fs/{fuse => fusefs}/default_permissions.cc | 0 tests/sys/fs/{fuse => fusefs}/destroy.cc | 0 tests/sys/fs/{fuse => fusefs}/flush.cc | 0 tests/sys/fs/{fuse => fusefs}/fsync.cc | 0 tests/sys/fs/{fuse => fusefs}/fsyncdir.cc | 0 tests/sys/fs/{fuse => fusefs}/getattr.cc | 0 tests/sys/fs/{fuse => fusefs}/interrupt.cc | 0 tests/sys/fs/{fuse => fusefs}/link.cc | 0 tests/sys/fs/{fuse => fusefs}/locks.cc | 0 tests/sys/fs/{fuse => fusefs}/lookup.cc | 0 tests/sys/fs/{fuse => fusefs}/mkdir.cc | 0 tests/sys/fs/{fuse => fusefs}/mknod.cc | 0 tests/sys/fs/{fuse => fusefs}/mockfs.cc | 0 tests/sys/fs/{fuse => fusefs}/mockfs.hh | 2 +- tests/sys/fs/{fuse => fusefs}/open.cc | 0 tests/sys/fs/{fuse => fusefs}/opendir.cc | 0 tests/sys/fs/{fuse => fusefs}/read.cc | 0 tests/sys/fs/{fuse => fusefs}/readdir.cc | 0 tests/sys/fs/{fuse => fusefs}/readlink.cc | 0 tests/sys/fs/{fuse => fusefs}/release.cc | 0 tests/sys/fs/{fuse => fusefs}/releasedir.cc | 0 tests/sys/fs/{fuse => fusefs}/rename.cc | 0 tests/sys/fs/{fuse => fusefs}/rmdir.cc | 0 tests/sys/fs/{fuse => fusefs}/setattr.cc | 0 tests/sys/fs/{fuse => fusefs}/statfs.cc | 0 tests/sys/fs/{fuse => fusefs}/symlink.cc | 0 tests/sys/fs/{fuse => fusefs}/unlink.cc | 0 tests/sys/fs/{fuse => fusefs}/utils.cc | 4 ++-- tests/sys/fs/{fuse => fusefs}/utils.hh | 0 tests/sys/fs/{fuse => fusefs}/write.cc | 14 +++++++------- tests/sys/fs/{fuse => fusefs}/xattr.cc | 0 36 files changed, 13 insertions(+), 13 deletions(-) rename tests/sys/fs/{fuse => fusefs}/Makefile (99%) rename tests/sys/fs/{fuse => fusefs}/access.cc (100%) rename tests/sys/fs/{fuse => fusefs}/create.cc (100%) rename tests/sys/fs/{fuse => fusefs}/default_permissions.cc (100%) rename tests/sys/fs/{fuse => fusefs}/destroy.cc (100%) rename tests/sys/fs/{fuse => fusefs}/flush.cc (100%) rename tests/sys/fs/{fuse => fusefs}/fsync.cc (100%) rename tests/sys/fs/{fuse => fusefs}/fsyncdir.cc (100%) rename tests/sys/fs/{fuse => fusefs}/getattr.cc (100%) rename tests/sys/fs/{fuse => fusefs}/interrupt.cc (100%) rename tests/sys/fs/{fuse => fusefs}/link.cc (100%) rename tests/sys/fs/{fuse => fusefs}/locks.cc (100%) rename tests/sys/fs/{fuse => fusefs}/lookup.cc (100%) rename tests/sys/fs/{fuse => fusefs}/mkdir.cc (100%) rename tests/sys/fs/{fuse => fusefs}/mknod.cc (100%) rename tests/sys/fs/{fuse => fusefs}/mockfs.cc (100%) rename tests/sys/fs/{fuse => fusefs}/mockfs.hh (98%) rename tests/sys/fs/{fuse => fusefs}/open.cc (100%) rename tests/sys/fs/{fuse => fusefs}/opendir.cc (100%) rename tests/sys/fs/{fuse => fusefs}/read.cc (100%) rename tests/sys/fs/{fuse => fusefs}/readdir.cc (100%) rename tests/sys/fs/{fuse => fusefs}/readlink.cc (100%) rename tests/sys/fs/{fuse => fusefs}/release.cc (100%) rename tests/sys/fs/{fuse => fusefs}/releasedir.cc (100%) rename tests/sys/fs/{fuse => fusefs}/rename.cc (100%) rename tests/sys/fs/{fuse => fusefs}/rmdir.cc (100%) rename tests/sys/fs/{fuse => fusefs}/setattr.cc (100%) rename tests/sys/fs/{fuse => fusefs}/statfs.cc (100%) rename tests/sys/fs/{fuse => fusefs}/symlink.cc (100%) rename tests/sys/fs/{fuse => fusefs}/unlink.cc (100%) rename tests/sys/fs/{fuse => fusefs}/utils.cc (98%) rename tests/sys/fs/{fuse => fusefs}/utils.hh (100%) rename tests/sys/fs/{fuse => fusefs}/write.cc (97%) rename tests/sys/fs/{fuse => fusefs}/xattr.cc (100%) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 01efbf1d2a7b..71aec31abadd 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -713,7 +713,7 @@ file .. fs - fuse + fusefs .. tmpfs .. diff --git a/tests/sys/fs/Makefile b/tests/sys/fs/Makefile index ec7ebdfc449b..5b5e78068125 100644 --- a/tests/sys/fs/Makefile +++ b/tests/sys/fs/Makefile @@ -7,7 +7,7 @@ TESTSDIR= ${TESTSBASE}/sys/fs TESTSRC= ${SRCTOP}/contrib/netbsd-tests/fs #TESTS_SUBDIRS+= nullfs # XXX: needs rump -TESTS_SUBDIRS+= fuse +TESTS_SUBDIRS+= fusefs TESTS_SUBDIRS+= tmpfs ${PACKAGE}FILES+= h_funcs.subr diff --git a/tests/sys/fs/fuse/Makefile b/tests/sys/fs/fusefs/Makefile similarity index 99% rename from tests/sys/fs/fuse/Makefile rename to tests/sys/fs/fusefs/Makefile index c98020dc196d..d70e7a1a95a6 100644 --- a/tests/sys/fs/fuse/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -2,7 +2,7 @@ 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 # Kyua treats googletest programs as plain tests, it's better to separate them diff --git a/tests/sys/fs/fuse/access.cc b/tests/sys/fs/fusefs/access.cc similarity index 100% rename from tests/sys/fs/fuse/access.cc rename to tests/sys/fs/fusefs/access.cc diff --git a/tests/sys/fs/fuse/create.cc b/tests/sys/fs/fusefs/create.cc similarity index 100% rename from tests/sys/fs/fuse/create.cc rename to tests/sys/fs/fusefs/create.cc diff --git a/tests/sys/fs/fuse/default_permissions.cc b/tests/sys/fs/fusefs/default_permissions.cc similarity index 100% rename from tests/sys/fs/fuse/default_permissions.cc rename to tests/sys/fs/fusefs/default_permissions.cc diff --git a/tests/sys/fs/fuse/destroy.cc b/tests/sys/fs/fusefs/destroy.cc similarity index 100% rename from tests/sys/fs/fuse/destroy.cc rename to tests/sys/fs/fusefs/destroy.cc diff --git a/tests/sys/fs/fuse/flush.cc b/tests/sys/fs/fusefs/flush.cc similarity index 100% rename from tests/sys/fs/fuse/flush.cc rename to tests/sys/fs/fusefs/flush.cc diff --git a/tests/sys/fs/fuse/fsync.cc b/tests/sys/fs/fusefs/fsync.cc similarity index 100% rename from tests/sys/fs/fuse/fsync.cc rename to tests/sys/fs/fusefs/fsync.cc diff --git a/tests/sys/fs/fuse/fsyncdir.cc b/tests/sys/fs/fusefs/fsyncdir.cc similarity index 100% rename from tests/sys/fs/fuse/fsyncdir.cc rename to tests/sys/fs/fusefs/fsyncdir.cc diff --git a/tests/sys/fs/fuse/getattr.cc b/tests/sys/fs/fusefs/getattr.cc similarity index 100% rename from tests/sys/fs/fuse/getattr.cc rename to tests/sys/fs/fusefs/getattr.cc diff --git a/tests/sys/fs/fuse/interrupt.cc b/tests/sys/fs/fusefs/interrupt.cc similarity index 100% rename from tests/sys/fs/fuse/interrupt.cc rename to tests/sys/fs/fusefs/interrupt.cc diff --git a/tests/sys/fs/fuse/link.cc b/tests/sys/fs/fusefs/link.cc similarity index 100% rename from tests/sys/fs/fuse/link.cc rename to tests/sys/fs/fusefs/link.cc diff --git a/tests/sys/fs/fuse/locks.cc b/tests/sys/fs/fusefs/locks.cc similarity index 100% rename from tests/sys/fs/fuse/locks.cc rename to tests/sys/fs/fusefs/locks.cc diff --git a/tests/sys/fs/fuse/lookup.cc b/tests/sys/fs/fusefs/lookup.cc similarity index 100% rename from tests/sys/fs/fuse/lookup.cc rename to tests/sys/fs/fusefs/lookup.cc diff --git a/tests/sys/fs/fuse/mkdir.cc b/tests/sys/fs/fusefs/mkdir.cc similarity index 100% rename from tests/sys/fs/fuse/mkdir.cc rename to tests/sys/fs/fusefs/mkdir.cc diff --git a/tests/sys/fs/fuse/mknod.cc b/tests/sys/fs/fusefs/mknod.cc similarity index 100% rename from tests/sys/fs/fuse/mknod.cc rename to tests/sys/fs/fusefs/mknod.cc diff --git a/tests/sys/fs/fuse/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc similarity index 100% rename from tests/sys/fs/fuse/mockfs.cc rename to tests/sys/fs/fusefs/mockfs.cc diff --git a/tests/sys/fs/fuse/mockfs.hh b/tests/sys/fs/fusefs/mockfs.hh similarity index 98% rename from tests/sys/fs/fuse/mockfs.hh rename to tests/sys/fs/fusefs/mockfs.hh index 5061fd51524e..d9eb5888ae33 100644 --- a/tests/sys/fs/fuse/mockfs.hh +++ b/tests/sys/fs/fusefs/mockfs.hh @@ -171,7 +171,7 @@ ProcessMockerT ReturnImmediate( * "Mounts" a filesystem to a temporary directory and services requests * 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 { /* diff --git a/tests/sys/fs/fuse/open.cc b/tests/sys/fs/fusefs/open.cc similarity index 100% rename from tests/sys/fs/fuse/open.cc rename to tests/sys/fs/fusefs/open.cc diff --git a/tests/sys/fs/fuse/opendir.cc b/tests/sys/fs/fusefs/opendir.cc similarity index 100% rename from tests/sys/fs/fuse/opendir.cc rename to tests/sys/fs/fusefs/opendir.cc diff --git a/tests/sys/fs/fuse/read.cc b/tests/sys/fs/fusefs/read.cc similarity index 100% rename from tests/sys/fs/fuse/read.cc rename to tests/sys/fs/fusefs/read.cc diff --git a/tests/sys/fs/fuse/readdir.cc b/tests/sys/fs/fusefs/readdir.cc similarity index 100% rename from tests/sys/fs/fuse/readdir.cc rename to tests/sys/fs/fusefs/readdir.cc diff --git a/tests/sys/fs/fuse/readlink.cc b/tests/sys/fs/fusefs/readlink.cc similarity index 100% rename from tests/sys/fs/fuse/readlink.cc rename to tests/sys/fs/fusefs/readlink.cc diff --git a/tests/sys/fs/fuse/release.cc b/tests/sys/fs/fusefs/release.cc similarity index 100% rename from tests/sys/fs/fuse/release.cc rename to tests/sys/fs/fusefs/release.cc diff --git a/tests/sys/fs/fuse/releasedir.cc b/tests/sys/fs/fusefs/releasedir.cc similarity index 100% rename from tests/sys/fs/fuse/releasedir.cc rename to tests/sys/fs/fusefs/releasedir.cc diff --git a/tests/sys/fs/fuse/rename.cc b/tests/sys/fs/fusefs/rename.cc similarity index 100% rename from tests/sys/fs/fuse/rename.cc rename to tests/sys/fs/fusefs/rename.cc diff --git a/tests/sys/fs/fuse/rmdir.cc b/tests/sys/fs/fusefs/rmdir.cc similarity index 100% rename from tests/sys/fs/fuse/rmdir.cc rename to tests/sys/fs/fusefs/rmdir.cc diff --git a/tests/sys/fs/fuse/setattr.cc b/tests/sys/fs/fusefs/setattr.cc similarity index 100% rename from tests/sys/fs/fuse/setattr.cc rename to tests/sys/fs/fusefs/setattr.cc diff --git a/tests/sys/fs/fuse/statfs.cc b/tests/sys/fs/fusefs/statfs.cc similarity index 100% rename from tests/sys/fs/fuse/statfs.cc rename to tests/sys/fs/fusefs/statfs.cc diff --git a/tests/sys/fs/fuse/symlink.cc b/tests/sys/fs/fusefs/symlink.cc similarity index 100% rename from tests/sys/fs/fuse/symlink.cc rename to tests/sys/fs/fusefs/symlink.cc diff --git a/tests/sys/fs/fuse/unlink.cc b/tests/sys/fs/fusefs/unlink.cc similarity index 100% rename from tests/sys/fs/fuse/unlink.cc rename to tests/sys/fs/fusefs/unlink.cc diff --git a/tests/sys/fs/fuse/utils.cc b/tests/sys/fs/fusefs/utils.cc similarity index 98% rename from tests/sys/fs/fuse/utils.cc rename to tests/sys/fs/fusefs/utils.cc index b6776eafbf87..45756243d899 100644 --- a/tests/sys/fs/fuse/utils.cc +++ b/tests/sys/fs/fusefs/utils.cc @@ -40,10 +40,10 @@ 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() { - const char *mod_name = "fuse"; + const char *mod_name = "fusefs"; const char *devnode = "/dev/fuse"; const char *usermount_node = "vfs.usermount"; int usermount_val = 0; diff --git a/tests/sys/fs/fuse/utils.hh b/tests/sys/fs/fusefs/utils.hh similarity index 100% rename from tests/sys/fs/fuse/utils.hh rename to tests/sys/fs/fusefs/utils.hh diff --git a/tests/sys/fs/fuse/write.cc b/tests/sys/fs/fusefs/write.cc similarity index 97% rename from tests/sys/fs/fuse/write.cc rename to tests/sys/fs/fusefs/write.cc index de20b03b8f6f..4a670b74f9c7 100644 --- a/tests/sys/fs/fuse/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -66,7 +66,7 @@ void expect_release(uint64_t ino, ProcessMockerT r) } 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; size_t size = sizeof(val); @@ -74,7 +74,7 @@ void require_sync_resize_0() { << strerror(errno); if (val != 0) 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."; } @@ -100,7 +100,7 @@ virtual void SetUp() { class WriteThrough: public Write { 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; size_t size = sizeof(val); @@ -111,7 +111,7 @@ virtual void SetUp() { ASSERT_EQ(0, sysctlbyname(cache_mode_node, &val, &size, NULL, 0)) << strerror(errno); 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"; } @@ -121,7 +121,7 @@ virtual void SetUp() { class WriteBack: public Write { virtual void SetUp() { - const char *node = "vfs.fuse.data_cache_mode"; + const char *node = "vfs.fusefs.data_cache_mode"; int val = 0; size_t size = sizeof(val); @@ -132,7 +132,7 @@ virtual void SetUp() { ASSERT_EQ(0, sysctlbyname(node, &val, &size, NULL, 0)) << strerror(errno); 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"; } @@ -343,7 +343,7 @@ TEST_F(Write, DISABLED_direct_io_short_write_iov) * write, then it must set the FUSE_WRITE_CACHE bit */ /* 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) { const char FULLPATH[] = "mountpoint/some_file.txt"; diff --git a/tests/sys/fs/fuse/xattr.cc b/tests/sys/fs/fusefs/xattr.cc similarity index 100% rename from tests/sys/fs/fuse/xattr.cc rename to tests/sys/fs/fusefs/xattr.cc