asomers d6a303386f fusefs: WIP fixing writeback cacheing
The current "writeback" cache mode, selected by the
vfs.fusefs.data_cache_mode sysctl, doesn't do writeback cacheing at all.  It
merely goes through the motions of using buf(9), but then writes every
buffer synchronously.  This commit:

* Enables delayed writes when the sysctl is set to writeback cacheing
* Fixes a cache-coherency problem when extending a file whose last page has
  just been written.
* Removes the "sync" mount option, which had been set unconditionally.
* Adjusts some SDT probes
* Adds several new tests that mimic what fsx does but with more control and
  without a real file system.  As I discover failures with fsx, I add
  regression tests to this file.
* Adds a test that ensures we can append to a file without reading any data
  from it.

This change is still incomplete.  Clustered writing is not yet supported,
and there are frequent "panic: vm_fault_hold: fault on nofault entry" panics
that I need to fix.

Sponsored by:	The FreeBSD Foundation
2019-06-11 16:32:33 +00:00

79 lines
1.6 KiB
Makefile

# $FreeBSD$
PACKAGE= tests
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
# out, so we get more granular reporting.
GTESTS+= access
GTESTS+= allow_other
GTESTS+= create
GTESTS+= default_permissions
GTESTS+= default_permissions_privileged
GTESTS+= destroy
GTESTS+= dev_fuse_poll
GTESTS+= fifo
GTESTS+= flush
GTESTS+= forget
GTESTS+= fsync
GTESTS+= fsyncdir
GTESTS+= getattr
GTESTS+= interrupt
GTESTS+= io
GTESTS+= link
GTESTS+= locks
GTESTS+= lookup
GTESTS+= mkdir
GTESTS+= mknod
GTESTS+= mount
GTESTS+= nfs
GTESTS+= notify
GTESTS+= open
GTESTS+= opendir
GTESTS+= read
GTESTS+= readdir
GTESTS+= readlink
GTESTS+= release
GTESTS+= releasedir
GTESTS+= rename
GTESTS+= rmdir
GTESTS+= setattr
GTESTS+= statfs
GTESTS+= symlink
GTESTS+= unlink
GTESTS+= write
GTESTS+= xattr
.for p in ${GTESTS}
SRCS.$p+= ${p}.cc
SRCS.$p+= getmntopts.c
SRCS.$p+= mockfs.cc
SRCS.$p+= utils.cc
.endfor
TEST_METADATA.default_permissions+= required_user="unprivileged"
TEST_METADATA.default_permissions_privileged+= required_user="root"
TEST_METADATA.mknod+= required_user="root"
TEST_METADATA.nfs+= required_user="root"
# TODO: drastically increase timeout after test development is mostly complete
TEST_METADATA+= timeout=10
FUSEFS= ${SRCTOP}/sys/fs/fuse
MOUNT= ${SRCTOP}/sbin/mount
CXXFLAGS+= -I${SRCTOP}/tests
CXXFLAGS+= -I${FUSEFS}
CXXFLAGS+= -I${MOUNT}
.PATH: ${MOUNT}
CXXSTD= c++14
LIBADD+= pthread
LIBADD+= gmock gtest
LIBADD+= util
WARNS?= 6
.include <bsd.test.mk>