opnsense-src/tests/sys
Alan Somers 55b80e2ca5 fusefs: fix invalid value for st_birthtime.tv_nsec
If a file system's on-disk format does not support st_birthtime, it
isn't clear what value it should return in stat(2).  Neither our man
page nor the OpenGroup specifies.  But our convention for UFS and
msdosfs is to return { .tv_sec = -1, .tv_nsec = 0 }.  fusefs is
different.  It returns { .tv_sec = -1, .tv_nsec = -1 }.  It's done that
ever since the initial import in SVN r241519.

Most software apparently handles this just fine.  It must, because we've
had no complaints.  But the Rust standard library will panic when
reading such a timestamp during std::fs::metadata, even if the caller
doesn't care about that particular value.  That's a separate bug, and
should be fixed.

Change our invalid value to match msdosfs and ufs, pacifying the Rust
standard library.

PR:		276602
MFC after:	1 week
Sponsored by:	Axcient
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D43590
2024-02-04 14:01:06 -07: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 tests: Use ifconfig -j instead of jexec ifconfig. 2023-10-06 18:40:07 +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 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
fs fusefs: fix invalid value for st_birthtime.tv_nsec 2024-02-04 14:01:06 -07:00
geom tests: don't run atf_* in a subshell 2023-11-27 13:15:59 -08:00
kern socket tests: improve error message 2024-02-01 13:37:26 -08: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 tests/net: enable if_clone_test:epair_ipv6_up_stress 2024-01-10 20:51:53 -08:00
netgraph ng_socket: with getsockname() return node ID for unnamed node 2023-11-27 20:11:38 -08:00
netinet tests/netinet: push variable 'sin' into function scope 2024-02-02 21:09:02 -08: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: ensure dummynet gets the correct direction after route-to 2024-02-02 17:55:16 +01: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 mlock tests: Add a regression test 2023-09-17 06:27:31 -04: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