freebsd-src/tests/sys
Alan Somers 6efba04df3 fusefs: fix two bugs regarding _PC_MIN_HOLE_SIZE
Background:

If a user does pathconf(_, _PC_MIN_HOLE_SIZE) on a fusefs file system,
the kernel must actually issue a FUSE_LSEEK operation in order to
determine whether the server supports it.  We cache that result, so we
only have to send FUSE_LSEEK the first time that _PC_MIN_HOLE_SIZE is
requested on any given mountpoint.

Problem 1:

Unlike fpathconf, pathconf operates on files that may not be open.  But
FUSE_LSEEK requires the file to be open.  As described in PR 278135,
FUSE_LSEEK cannot be sent for unopened files, causing _PC_MIN_HOLE_size
to wrongly report EINVAL.  We never noticed that before because the
fusefs test suite only uses fpathconf, not pathconf.  Fix this bug by
opening the file if necessary.

Problem 2:

On a completely sparse file, with no data blocks at all, FUSE_LSEEK with
SEEK_DATA would fail to ENXIO.  That's correct behavior, but
fuse_vnop_pathconf wrongly interpreted that as "FUSE_LSEEK not
supported".  Fix the interpretation.

PR:		278135
MFC after:	1 week
Sponsored by:	Axcient
Differential Revision: https://reviews.freebsd.org/D44618
2024-06-24 10:02:02 -06:00
..
acl dirdeps: Update Makefile.depend* files with empty contents 2023-10-29 17:01:04 -04:00
aio Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
audit Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
auditpipe Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
capsicum tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
cddl zfs tests: Silence clang warning 2023-12-04 12:22:14 -05:00
common vnet tests: check for if_bridge.ko 2024-06-04 22:16:56 +02:00
compat32 tests: Don't recurse into sys/compat32 2023-05-16 02:06:34 +01:00
devrandom tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
fifo tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
file path_test: fix cap_rights_init usage 2024-02-15 08:58:39 -05:00
fs fusefs: fix two bugs regarding _PC_MIN_HOLE_SIZE 2024-06-24 10:02:02 -06:00
geom virstor: basic functional test 2024-06-10 10:32:22 -07:00
kern sendfile tests: Fix an error check in tcp_socketpair() 2024-06-21 14:18:22 -04:00
kqueue kqueue tests: Add a regression test 2024-01-27 13:51:13 -05:00
mac tests: Skip all tests that require mdconfig when /dev/mdctl missing 2023-09-02 13:16:22 -06:00
mqueue Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
net vnet tests: check for if_bridge.ko 2024-06-04 22:16:56 +02:00
netgraph tests/netgraph: start ng_ksocket(4) tests 2024-03-22 22:44:16 -07:00
netinet vnet tests: check for if_bridge.ko 2024-06-04 22:16:56 +02:00
netinet6 netinet6 tests: Restore an atf_check invocation 2024-01-27 13:51:14 -05:00
netipsec Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
netlink tests/netlink: improve recently added netlink_socket:membership 2024-01-10 20:51:53 -08:00
netmap netmap: fix unit tests 2023-12-29 07:46:46 +00:00
netpfil pf tests: test keepcounters when we exceed 32 bits 2024-06-21 13:49:17 +02:00
opencrypto Revert "cdefs: Remove __func__ define" 2023-11-27 14:59:54 -07:00
pjdfstest Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
posixshm posixshm largepage_mmap: fix a racy test 2024-01-03 16:39:53 +00:00
ses Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
sys bitstring: Support large bit strings. 2023-11-22 23:30:03 +01:00
vfs tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
vm soxstack: slience 32-bit gcc warning 2024-05-08 15:51:17 +01:00
vmm spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00