mirror of
https://github.com/opnsense/src.git
synced 2026-02-25 19:05:20 -05:00
The FUSE protocol allows the client (kernel) to cache a file's size, if the server (userspace daemon) allows it. A well-behaved daemon obviously should not change a file's size while a client has it cached. But a buggy daemon might. If the kernel ever detects that that has happened, then it should invalidate the entire cache for that file. Previously, we would not only cache stale data, but in the case of a file extension while we had the size cached, we accidentally extended the cache with zeros. PR: 244178 Reported by: Ben RUBSON <ben.rubson@gmx.com> Reviewed by: cem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24012
87 lines
1.9 KiB
Makefile
87 lines
1.9 KiB
Makefile
# $FreeBSD$
|
|
|
|
.include <bsd.compiler.mk>
|
|
|
|
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+= bmap
|
|
GTESTS+= cache
|
|
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
|
|
# Suppress warnings that GCC generates for the libc++ and gtest headers.
|
|
CXXWARNFLAGS.gcc+= -Wno-placement-new -Wno-attributes
|
|
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80000
|
|
CXXWARNFLAGS+= -Wno-class-memaccess
|
|
.endif
|
|
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>
|