Home | History | Annotate | only in /src/tests/fs
History log of /src/tests/fs
RevisionDateAuthorComments
 1.7 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.6 31-Mar-2010  njoly The Atffile tp/tp-glob keys does not allow more than one word. Put new
union value on its own line.
 1.5 29-Mar-2010  pooka Add basic union test.
 1.4 30-Dec-2007  jmmv branches: 1.4.2;
Re-add the NetBSD CVS Id tag to the header. It just had to be quoted to
be accepted by the parser; i.e. no bug in the code :-)

Note to self: do not try to "fix" stuff the last minute before going to
sleep.
 1.3 29-Dec-2007  jmmv Back out the change to introduce the X-NetBSD-Id header entry. For some
reason the parser does not accept its contents... You know, one should
always test even trivial changes!

Will review this in more depth tomorrow to find the real root cause of the
problem and rule out a fix for ATF.
 1.2 26-Dec-2007  jmmv Add the NetBSD Id tag to the Atffiles. Issue raised by pooka@ a while ago.
 1.1 12-Nov-2007  jmmv Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.4.2.2 09-Jan-2008  matt sync with HEAD
 1.4.2.1 30-Dec-2007  matt file Atffile was added on branch matt-armv6 on 2008-01-09 01:59:05 +0000
 1.25 06-Jun-2022  nia branches: 1.25.4;
build system: Revert all the recent additions of MK[...] knobs that
allow conditionally disabling the building of certain user space
programs in the 'base' set.

There is not enough consensus that this is the right way and a few
people had strong objections, see source-changes-d@.
 1.24 27-May-2022  nia mk: Add a MKLFS flag for excluding the log-structured filesystem userspace
tools from the build.
 1.23 10-May-2014  martin Add a test case for PR kern/48787.
 1.22 21-Dec-2011  christos branches: 1.22.6; 1.22.16;
Add a test for the latest fifofs fix.
 1.21 10-Mar-2011  pooka branches: 1.21.4;
Add one simple test case which checks that zpool create results in
a mounted file system. Then run away as quickly as possible.
 1.20 18-Feb-2011  pooka Add test case for /->: conversion from PR kern/44523 by
Taylor R Campbell.

I adjusted the test to uudecode + bunzip2 the supplied image, and
removed the "null-finder" from the dirent code, since it had an
off-by-one which made the test fail.
 1.19 01-Aug-2010  pooka branches: 1.19.2;
nfs now has tests in it, so need to convert from SUBDIR to
TESTS_SUBDIR. Once again I failed to see that one coming.
 1.18 26-Jul-2010  pooka Add NFS service suitable for use in testing.
 1.17 20-Jul-2010  pooka common cannot be a TESTS_SUBDIR, since one of those without a test
behind it confuses atf-run. change to SUBDIR as hinted by jmmv.
 1.16 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.15 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.14 06-Jul-2010  pooka Add the most basic test for puffs(dtfs): mount/unmount. There's
still a lot of work to do here, but I want to get to testbuilding
the tree ;)

TODO examples:
* integrate this with rump_syspuffs (and remove the stupid ``sys'' from there)
* integrate with njoly's fs-independent tests
* cleanup a lot
* write more tests

*sigh*, I wish we'd had testing tools like this 5 years ago when
I was writing puffs. It would have made a lot of things a lot
better and a lot easier.
 1.13 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.12 05-Jul-2010  njoly Add test program that use sample code from kern/41937, and fs rump
helpers to check currently supported filesystems.

t_rmdirrace (1/1): 5 test cases
ext2fs_race: Passed.
ffs_race: Passed.
msdosfs_race: Passed.
sysvbfs_race: Passed.
tmpfs_race: Passed.
 1.11 28-Jun-2010  pooka add test for PR kern/43503
 1.10 14-Jun-2010  pooka Descend into ptyfs tests now that the necessary rump components are there.
 1.9 13-Apr-2010  pooka Build & install msdosfs snapshot test and deal with the happy happy
joy joy setlistdist etcetc. stuff.
 1.8 31-Mar-2010  pooka Add some basic tests for kernfs (getdents & changing hostname).

Per a "mad \"scientist\"" experiment, on i386 load kernfs support
from the installed kernel module instead of linking the driver in.
 1.7 30-Mar-2010  pooka Add basic test for umapfs functionality.

XXX: the reverse mapping case (last subsubtest in t_basic) does
not make any sense, but apparently that how umapfs works. I'm not
familiar enough with the code to determine if this is a wanted
feature or a pure and simple bug.
 1.6 30-Mar-2010  pooka Basic test for nullfs, which just checks that the two views act
somewhat sensibly.
 1.5 29-Mar-2010  pooka Add basic union test.
 1.4 08-Apr-2009  pooka descend into ffs
 1.3 26-Dec-2007  jmmv branches: 1.3.2; 1.3.14;
Enable the puffs tests.
 1.2 21-Nov-2007  jmmv Explicitly define TESTSDIR, because the automatic deduction of its value
breaks the build if some component of NETBSDSRCDIR is a symlink. Reported
by drochner@.
 1.1 12-Nov-2007  jmmv Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.3.14.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.3.2.2 09-Jan-2008  matt sync with HEAD
 1.3.2.1 26-Dec-2007  matt file Makefile was added on branch matt-armv6 on 2008-01-09 01:59:06 +0000
 1.19.2.1 05-Mar-2011  bouyer Sync with HEAD
 1.21.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.21.4.1 17-Apr-2012  yamt sync with head
 1.22.16.1 10-Aug-2014  tls Rebase.
 1.22.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.4.1 29-Jun-2024  perseant Implementation of exFAT filesystem, with compilation conditional on MKEXFATFS
make variable.
 1.2 23-Jan-2016  christos Define _KERNTYPES for things that need it.
 1.1 03-Nov-2010  christos add Makefile.inc everywhere so that we can set WARNS=4 by default. Amazing
how many bugs this found :-)
 1.3 23-Jun-2010  pooka If kernel modules are set to autoload, skip the vfslist part of
the check when determining if there is kernel support for a given
fs. Makes tmpfs tests run and fixes PR misc/43304.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file h_funcs.subr was added on branch matt-armv6 on 2008-01-09 01:59:06 +0000
 1.2 28-Apr-2024  rillig tests/cd9660: replace compressed blob with readable hexdump

This test is skipped in most circumstances because it creates a file
whose apparent size is 4.5 GB. It's an ISO 9660 image though,
containing mostly null bytes. Nevertheless, tmpfs doesn't allow such a
big file to be created, so this test is skipped in settings where /tmp
is on a tmpfs.

If the test is run, the ISO image is uncompressed, which takes several
minutes. Replace bzip2 with direct file creation from a hex dump of
that disk image, which is easier to inspect manually and also faster by
about 3 magnitudes.
 1.1 10-May-2014  martin branches: 1.1.2; 1.1.4; 1.1.8;
Add a test case for PR kern/48787.
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 10-May-2014  tls file Makefile was added on branch tls-maxphys on 2014-08-20 00:04:47 +0000
 1.1.4.2 10-Aug-2014  tls Rebase.
 1.1.4.1 10-May-2014  tls file Makefile was added on branch tls-earlyentropy on 2014-08-10 06:57:07 +0000
 1.1.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.1 10-May-2014  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 11:42:18 +0000
 1.1 28-Apr-2024  rillig tests/cd9660: replace compressed blob with readable hexdump

This test is skipped in most circumstances because it creates a file
whose apparent size is 4.5 GB. It's an ISO 9660 image though,
containing mostly null bytes. Nevertheless, tmpfs doesn't allow such a
big file to be created, so this test is skipped in settings where /tmp
is on a tmpfs.

If the test is run, the ISO image is uncompressed, which takes several
minutes. Replace bzip2 with direct file creation from a hex dump of
that disk image, which is easier to inspect manually and also faster by
about 3 magnitudes.
 1.2 28-Apr-2024  rillig tests/cd9660: replace compressed blob with readable hexdump

This test is skipped in most circumstances because it creates a file
whose apparent size is 4.5 GB. It's an ISO 9660 image though,
containing mostly null bytes. Nevertheless, tmpfs doesn't allow such a
big file to be created, so this test is skipped in settings where /tmp
is on a tmpfs.

If the test is run, the ISO image is uncompressed, which takes several
minutes. Replace bzip2 with direct file creation from a hex dump of
that disk image, which is easier to inspect manually and also faster by
about 3 magnitudes.
 1.1 10-May-2014  martin branches: 1.1.2; 1.1.4; 1.1.8;
Add a test case for PR kern/48787.
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 10-May-2014  tls file pr_48787.image.bz2.uue was added on branch tls-maxphys on 2014-08-20 00:04:47 +0000
 1.1.4.2 10-Aug-2014  tls Rebase.
 1.1.4.1 10-May-2014  tls file pr_48787.image.bz2.uue was added on branch tls-earlyentropy on 2014-08-10 06:57:07 +0000
 1.1.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.1 10-May-2014  yamt file pr_48787.image.bz2.uue was added on branch yamt-pagecache on 2014-05-22 11:42:18 +0000
 1.1 28-Apr-2024  rillig tests/cd9660: replace compressed blob with readable hexdump

This test is skipped in most circumstances because it creates a file
whose apparent size is 4.5 GB. It's an ISO 9660 image though,
containing mostly null bytes. Nevertheless, tmpfs doesn't allow such a
big file to be created, so this test is skipped in settings where /tmp
is on a tmpfs.

If the test is run, the ISO image is uncompressed, which takes several
minutes. Replace bzip2 with direct file creation from a hex dump of
that disk image, which is easier to inspect manually and also faster by
about 3 magnitudes.
 1.7 11-Jun-2024  rillig tests/cd9660: use absolute path for mounting filesystem

On amd64-compat32, the test failed with:
> rump_cd9660: "./pr_48787.image" is a relative path.
> rump_cd9660: using "/tmp/atf-run.dfxJMh/pr_48787.image" instead.
> assertion "PU_GETSFLAG(pu, PU_PUFFSDAEMON)" failed:
> file "/work/src/lib/libpuffs/puffs.c", line 718, function "puffs_cancel"
> rump_cd9660: puffs_daemon: Invalid argument
 1.6 28-Apr-2024  rillig tests/cd9660: replace compressed blob with readable hexdump

This test is skipped in most circumstances because it creates a file
whose apparent size is 4.5 GB. It's an ISO 9660 image though,
containing mostly null bytes. Nevertheless, tmpfs doesn't allow such a
big file to be created, so this test is skipped in settings where /tmp
is on a tmpfs.

If the test is run, the ISO image is uncompressed, which takes several
minutes. Replace bzip2 with direct file creation from a hex dump of
that disk image, which is easier to inspect manually and also faster by
about 3 magnitudes.
 1.5 30-Dec-2023  martin PR 57803: fix typo in test title.
 1.4 07-Jul-2014  pgoyette branches: 1.4.2; 1.4.6;
Update disk-space-available requirement to match reality, and leave a
little extra just in case. The test file is much larger than previously
indicated.

Thanks martin@ for detailed investigation.
 1.3 08-Jun-2014  pgoyette Convert size check to use 1K blocks (more human-friendly), and fix
atf_skip message to reference block size rather than bytes.

OK martin@
 1.2 15-May-2014  martin branches: 1.2.2;
Set a bigger timeout - this test needs > 3000s on my shark (mostly for
unpacking the test image)
 1.1 10-May-2014  martin Add a test case for PR kern/48787.
 1.2.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.1 15-May-2014  yamt file t_high_ino_big_file.sh was added on branch yamt-pagecache on 2014-05-22 11:42:18 +0000
 1.4.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.6.1 07-Jul-2014  tls file t_high_ino_big_file.sh was added on branch tls-maxphys on 2014-08-20 00:04:47 +0000
 1.4.2.2 10-Aug-2014  tls Rebase.
 1.4.2.1 07-Jul-2014  tls file t_high_ino_big_file.sh was added on branch tls-earlyentropy on 2014-08-10 06:57:07 +0000
 1.17 03-Jun-2023  lukem branches: 1.17.2;
bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
GCC_NO_warning
to
CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
 1.16 07-Sep-2020  mrg remove GCC_NO_ADDR_OF_PACKED_MEMBER for several subdir builds
that are now handled by lfs_accessors.h internally.
 1.15 07-Sep-2020  mrg avoid new GCC 9 warnings.
 1.14 01-Jun-2020  christos LIBISPRIVATE=yes
 1.13 13-Oct-2019  mrg introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints. many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
 1.12 04-Mar-2014  joerg branches: 1.12.26;
Make the abs() use check non-fatal for a bogus use in the LFS cleanerd.
 1.11 26-Jun-2013  reinoud Add UDF as one of the filesytems to test. Might help understand why rump is
misbehaving on it.
 1.10 05-Mar-2013  christos Highly uncool to stash a partial copy of the ti-rpc code here.
 1.9 31-Aug-2012  pooka branches: 1.9.2;
Hook ZFS tests to MKZFS instead of a homegrown variable.
 1.8 20-Aug-2012  pooka Add a vfstest zfs attachment. This is a compile-time option,
default off, due the large numbers of failing tests (some of them
look like quite trivial failures).
 1.7 11-Aug-2011  uch branches: 1.7.2;
add ATF tests for v7fs. patch by njoly@. thank you.
 1.6 11-Nov-2010  pooka Add rumpfs to list of file systems to be autotested.
 1.5 03-Aug-2010  drochner .PARSEDIR doesn't work. at least not for me. Use .CURDIR instead
which makes a build with objdir succeed.
 1.4 29-Jul-2010  pooka Include & use lfs megamaid.
 1.3 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.2 26-Jul-2010  pooka Add NFS to the list of file systems exercised by the "vfs" tests.

How it works:
NFS tests fork and exec the nfs service from fs/nfs/nfsservice.
The child then:
a) creates a FFS file system
b) mounts it
c) starts rpcbind
d) starts mountd
e) starts nfsd
f) handles requests

The client, as expected, does the standard RPC regotiation and
calls mount(MOUNT_NFS). It then proceeds to execute the test.

An individual test which executes everything described above and
does a few file operations on the NFS mount takes 0.16s wall time
on my laptop from start to finish. This means it is feasible to
run hundreds of tests while still getting results in a timely
fashion.

Like in other networked tests, the two processes are connected via
the rump shmif which uses mmapped files as ethernet busses. The
entire test suite can be executed by an unprivileged account.

As a side effect, these tests exercise also the kernel NFS server
in addition to the kernel NFS client.

While everything is currently targetted at executing the vfs tests,
there is no reason this could not be extended to exercise features
specific to NFS. For example, the server can run through all
exportable file system types, permissions can be tested, etc.
 1.1 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.7.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.2.1 30-Oct-2012  yamt sync with head
 1.9.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.2.1 23-Jun-2013  tls resync from head
 1.12.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.17.2.1 12-Aug-2024  perseant Add exFAT conditions to vfs tests
 1.6 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.5 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.4 13-Jul-2010  njoly Add testcase data argument to all fstest helper functions.
Needed by pooka for puffs fstest support.
 1.3 12-Jul-2010  njoly Update filesystem helper functions namespace (from XXX_mount to
XXX_fstest_mount) to avoid conflicts with existing functions such as
puffs_mount.
 1.2 05-Jul-2010  njoly Fix more copyrights, where i forgot to add my name.
 1.1 30-Jun-2010  njoly Add helper code and macros to ease writing filesystem tests with rump.
Support currently limited to ext2fs, ffs, msdos, sysvbfs and tmpfs.
 1.6 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.5 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.4 13-Jul-2010  njoly Add testcase data argument to all fstest helper functions.
Needed by pooka for puffs fstest support.
 1.3 12-Jul-2010  njoly Update filesystem helper functions namespace (from XXX_mount to
XXX_fstest_mount) to avoid conflicts with existing functions such as
puffs_mount.
 1.2 05-Jul-2010  njoly Fix more copyrights, where i forgot to add my name.
 1.1 30-Jun-2010  njoly Add helper code and macros to ease writing filesystem tests with rump.
Support currently limited to ext2fs, ffs, msdos, sysvbfs and tmpfs.
 1.1 13-Aug-2024  perseant branches: 1.1.2;
file fstest_exfatfs.c was initially added on branch perseant-exfatfs.
 1.1.2.3 08-Sep-2024  perseant Test with a non-zero dirmask, so the fs/vfs/t_unpriv tests don't fail
prematurely with EACCES. (They should error out with EPERM instead.)
 1.1.2.2 14-Aug-2024  perseant Use the correct name for newfs_exfatfs
 1.1.2.1 13-Aug-2024  perseant Add exFAT-specific filesystem shims for vfs tests.
 1.3 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.2 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.1 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.7 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.6 05-Aug-2012  riastradh Fix ffs_fstest_delfs's error branch for rump_pub_etfs_remove.

rump_pub_etfs_remove returns an error code, rather than setting errno
and returning -1.
 1.5 26-Jun-2011  christos branches: 1.5.2;
ggr, how many of those I will need to fix. Fallout from the bogus inclusion
of <signal.h> in rump_syscallargs.h.
 1.4 13-Jan-2011  pooka wrap system() in SIG_DFL so that child-bearing fs tests (puffs,
nfs) don't go cuckoo when the process executed by system() takes a
backstage left.
 1.3 07-Jan-2011  pooka add another fstype for ffs -o log
 1.2 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.1 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.5.2.1 30-Oct-2012  yamt sync with head
 1.8 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.7 30-Aug-2019  brad The cleaner is compiled into the ATF test harness for the LFS
filesystem tests. Use the new -J option to pass the raw device into
the cleaner. This avoids the not rump safe getdiskrawname call and
makes sure we use an internal rump device name for cleaning. This
should fix bin/54488.
 1.6 20-Jan-2019  gson branches: 1.6.2;
Call rump_pub_lwproc_newlwp() in the lfs cleaner thread to make its
rump system calls all use the same lwp. Hopefully this will fix
PR kern/53884. Also call rump_pub_lwproc_releaselwp() at the end.
 1.5 30-Aug-2015  dholland branches: 1.5.14; 1.5.16;
Remove rubbish.
 1.4 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.3 29-Jul-2010  pooka whitespace
 1.2 29-Jul-2010  pooka Include & use lfs megamaid.
 1.1 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.5.16.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.16.1 10-Jun-2019  christos Sync with HEAD
 1.5.14.1 26-Jan-2019  pgoyette Sync with HEAD
 1.6.2.1 02-Sep-2019  martin Pull up following revision(s) (requested by brad in ticket #110):

libexec/lfs_cleanerd/lfs_cleanerd.c: revision 1.59
libexec/lfs_cleanerd/lfs_cleanerd.8: revision 1.19
sbin/resize_lfs/resize_lfs.c: revision 1.15
usr.sbin/puffs/rump_lfs/rump_lfs.c: revision 1.19
libexec/lfs_cleanerd/lfs_cleanerd.c: revision 1.60
lib/libutil/getdiskrawname.c: revision 1.6
tests/fs/common/fstest_lfs.c: revision 1.7

Use getdiskrawname to find the device name.
Reviewed by Christos

-

Teach getdiskrawname and getdiskcookedname about zvols.
Reviewed by Christos

-

Add support for passing the raw device name separate from the
filesystem. This is useful in the case where the cleaner is compiled
into code, such as rump_lfs and the ATF tests. This helps to fix
bin/54488

-

The cleaner is compiled into rump_lfs and executed as a thread. Pass
in the raw device using the new -J option. This avoids the use of
getdiskrawname which is not particularly rump safe in this context and
insures that the rump container device is used for cleaning, not the
outer device.
 1.4 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.3 26-Mar-2012  njoly Initialise permissions mask to a sensible value (0755).
While here convert leading spaces to tabs.
 1.2 30-Jul-2010  pooka branches: 1.2.6;
Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.1 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.2.6.1 17-Apr-2012  yamt sync with head
 1.13 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.12 17-Jun-2020  kamil branches: 1.12.8;
Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.11 05-Oct-2019  mrg sprintf->snprintf
 1.10 01-Feb-2019  mrg don't check the return value of execvp() for failure to call err().
assume if it returns at all something has failed.
 1.9 28-Feb-2011  pooka branches: 1.9.44;
g/c use of unused variable too
 1.8 28-Feb-2011  pooka g/c unused variable
 1.7 28-Feb-2011  pooka bump nfdsargv[]�size belatedly (and add a few extra for needs of future bugs)
 1.6 10-Feb-2011  njoly Do initialise allocated file system args structures for puffs and nfs
(fix some puffs tests failures with MALLOC_OPTIONS=J).
While here, detect and report args allocation failure.

ok from pooka.
 1.5 31-Dec-2010  pooka branches: 1.5.2;
Configure two network addresses for the nfs server. One exports
/myexport r/w to the client in the same subnet and the other one
exports /myexport r/o to the client in the same subnet.
 1.4 26-Aug-2010  pooka Put the workaround for PR kern/43799 into the common nfs unmount routine.
 1.3 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.2 30-Jul-2010  pooka Wait for child (rumpnfsd) to die before declaring unmount successful.
(yes, should be in delfs, but delfs doesn't work due to the cleanup hassle)
 1.1 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.5.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.5.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.9.44.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.44.1 10-Jun-2019  christos Sync with HEAD
 1.12.8.1 02-Aug-2025  perseant Sync with HEAD
 1.14 03-Aug-2023  andvar fix typos in comments and one definition, mainly s/sucket/socket/.
 1.13 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.12 01-Feb-2019  mrg don't check the return value of execvp() for failure to call err().
assume if it returns at all something has failed.
 1.11 09-Sep-2013  pooka branches: 1.11.26;
Remove what looks like an outdated assert (there was something very sneaky
about this code, but my memory is fading ...)
 1.10 10-Feb-2011  njoly branches: 1.10.4; 1.10.10;
Do initialise allocated file system args structures for puffs and nfs
(fix some puffs tests failures with MALLOC_OPTIONS=J).
While here, detect and report args allocation failure.

ok from pooka.
 1.9 07-Jan-2011  pooka branches: 1.9.2;
Don't panic if "unnecessary" dir already exists.
(helpful when running the test without atf-run)
 1.8 07-Jan-2011  pooka Add a puffs-p2k-ffs file system type to automated tests. Inspired
by the file handle problem in p2k.
 1.7 29-Dec-2010  yamt don't assume atomic read/write on socketpair. puffs_kargs at least is
too large to assume atomic read/write. this makes some tests including
fs/puffs/t_basic pass on my environment.
 1.6 01-Nov-2010  pooka Make the shovel threads resilient to file server exit.
 1.5 31-Oct-2010  pgoyette Fix format strings so it builds on amd64
 1.4 31-Oct-2010  pooka Since rump implicit threads now bind to proc1 instead of proc0, we
need our shovel threads bound to proc1 instead of proc0 in order
to have access to the same set of descriptors as the implicit thread
which opens the fd in the rump kernel.

Also, sprinkle some printfs and make failure more dramatic.

fixes the puffs tests. pointed out by pgoyette.
 1.3 01-Sep-2010  pooka update to new rump lwp/proc interfaces
 1.2 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.1 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.9.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.10.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.11.26.1 10-Jun-2019  christos Sync with HEAD
 1.3 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.2 16-Mar-2014  njoly Retrict rumpfs to the provided size, like other filesystems.
 1.1 11-Nov-2010  pooka branches: 1.1.6; 1.1.12;
Add rumpfs to list of file systems to be autotested.
 1.1.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.2 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.1 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.3 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.2 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.1 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.5 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.4 02-Jul-2013  reinoud branches: 1.4.6; 1.4.10;
Use the new extension to newfs_udf to generate a decent image for rump to work
on instead of an FFS(!) version.
 1.3 30-Jun-2013  martin Initialize mount args version info.
Add comment about a bogusly used "newfs" where "newfs_udf" is meant.
 1.2 30-Jun-2013  martin Fix copy & pasto, notice by Nicolas Joly, one step closer to solving
PR kern/47974.
 1.1 26-Jun-2013  reinoud Add UDF as one of the filesytems to test. Might help understand why rump is
misbehaving on it.
 1.4.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.10.1 02-Jul-2013  tls file fstest_udf.c was added on branch tls-maxphys on 2014-08-20 00:04:47 +0000
 1.4.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.6.1 02-Jul-2013  yamt file fstest_udf.c was added on branch yamt-pagecache on 2014-05-22 11:42:18 +0000
 1.2 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.1 11-Aug-2011  uch add ATF tests for v7fs. patch by njoly@. thank you.
 1.3 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.2 16-Dec-2018  hannken Have to hijack sysctl() and modctl() for zfs commands.

Should fix PR kern/53422
 1.1 20-Aug-2012  pooka branches: 1.1.4; 1.1.32; 1.1.34;
Add a vfstest zfs attachment. This is a compile-time option,
default off, due the large numbers of failing tests (some of them
look like quite trivial failures).
 1.1.34.1 10-Jun-2019  christos Sync with HEAD
 1.1.32.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 20-Aug-2012  yamt file fstest_zfs.c was added on branch yamt-pagecache on 2012-10-30 18:59:52 +0000
 1.45 15-Aug-2025  perseant Rework the optional building of ZFS tests to make it easier to add other
optional filesystems in future. Verified to produce identical binaries.
 1.44 15-Mar-2020  martin branches: 1.44.8;
Skip tests when we know there is not enough space available
 1.43 15-Mar-2020  martin Hardcode a check for ZFS and too little free space in workdir to skip
ZFS tests if the atf working directory is size restricted (ZFS has a
hardcoded minimal size of 64MB for a storage pool and 128 MB disk size).
 1.42 19-Jun-2018  gson branches: 1.42.2;
No semicolon after macro do ... while (0) wrapper.
 1.41 13-Jan-2017  christos branches: 1.41.12;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.40 29-Aug-2015  dholland branches: 1.40.2;
Fix glaringly wrong indent.
 1.39 24-Mar-2015  riastradh zfs tests don't actually need privileges.
 1.38 26-Jun-2013  reinoud Add UDF as one of the filesytems to test. Might help understand why rump is
misbehaving on it.
 1.37 16-Mar-2013  jmmv Mark the zfs tests as requiring root.

This is wrong. The zfs tests already use rump so they should not require
root. However, I've already spent much more time than I wanted trying to
figure out why that's the case without much luck. If you can find why,
just remove this hack.
 1.36 20-Aug-2012  pooka branches: 1.36.2;
Add a vfstest zfs attachment. This is a compile-time option,
default off, due the large numbers of failing tests (some of them
look like quite trivial failures).
 1.35 11-Aug-2011  uch branches: 1.35.2;
add ATF tests for v7fs. patch by njoly@. thank you.
 1.34 22-Mar-2011  jmmv Remove unnecessary (and broken) cleanup routines.

The cleanup routines were being used to kill the rump process and to delete
the temporary image file. These are things automatically done by atf-run,
but it looks like this code was added here to workaround a previous bug in
the atf-run code.

Note that, in the existing form, the cleanup routines segfault (haven't
spent the time to track down why). atf-run does not care about this
(although it should), buy Kyua does.

As a side effect, this has a teeny-tiny performance speedup in the execution
of the tests including this file.

OKed by njoly@.
 1.33 05-Mar-2011  pooka Put p2k_ffs back there -- i can't repeat any problems in my qemu/anita
runs.
 1.32 07-Jan-2011  pooka Apparently the atf in the qemu runs doesn't like p2k_ffs and hangs
completely. Remove it for until I have a chance to debug what's
going on.
 1.31 07-Jan-2011  pooka Adjust atf_check_type() to make it work again.
Do we need tests for the tests? ;)
 1.30 07-Jan-2011  pooka Set an extra xvar indicating MOUNT_FOO
 1.29 07-Jan-2011  pooka antipasto
 1.28 07-Jan-2011  pooka add another fstype for ffs -o log
 1.27 07-Jan-2011  pooka adjust another place where X-fs.type is set
 1.26 07-Jan-2011  pooka Use our internal name instead of MOUNT_FOO to identify file system
since otherwise we now run into dupes (e.g. nfs and nfsro, puffs
and p2k_ffs).
 1.25 07-Jan-2011  pooka Add a puffs-p2k-ffs file system type to automated tests. Inspired
by the file handle problem in p2k.
 1.24 31-Dec-2010  pooka Introduce r/o tests. They do two mounts: the first one is r/w and
runs a generator which primes the fs. The second one is r/o and
does the actual testing. Also, introduce a nfsro fstype which does
a clientside r/w mount for a r/o server export.

requested by yamt

(one nfsro test currently fails with EROFS vs. EACCES. Hopefully
someone else can debate the correct errno)
 1.23 31-Dec-2010  pooka Sprinkle some KNF. No functional change.
 1.22 11-Nov-2010  pooka Add rumpfs to list of file systems to be autotested.
 1.21 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.20 26-Aug-2010  pooka include some necessary headers to fix build
 1.19 25-Aug-2010  pooka * fail with errnos
* in case unmount fails, call rump_pub_vfs_mount_print() to print
mountpoint status and dump active vnodes.
 1.18 09-Aug-2010  pooka allow overriding of defaults
 1.17 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.16 28-Jul-2010  pooka Move nfstestargs to header "because I need them". A more sweeping
action would be good here.
 1.15 28-Jul-2010  pooka Add FSTEST_CONSTRUCTOR/FSTEST_DESTRUCTOR which create/mount the
file system with default params. Make ATF_FS_APPLY use the
constructor (can't use the destructor due to the (useless) cleanup).
 1.14 26-Jul-2010  pooka Add NFS to the list of file systems exercised by the "vfs" tests.

How it works:
NFS tests fork and exec the nfs service from fs/nfs/nfsservice.
The child then:
a) creates a FFS file system
b) mounts it
c) starts rpcbind
d) starts mountd
e) starts nfsd
f) handles requests

The client, as expected, does the standard RPC regotiation and
calls mount(MOUNT_NFS). It then proceeds to execute the test.

An individual test which executes everything described above and
does a few file operations on the NFS mount takes 0.16s wall time
on my laptop from start to finish. This means it is feasible to
run hundreds of tests while still getting results in a timely
fashion.

Like in other networked tests, the two processes are connected via
the rump shmif which uses mmapped files as ethernet busses. The
entire test suite can be executed by an unprivileged account.

As a side effect, these tests exercise also the kernel NFS server
in addition to the kernel NFS client.

While everything is currently targetted at executing the vfs tests,
there is no reason this could not be extended to exercise features
specific to NFS. For example, the server can run through all
exportable file system types, permissions can be tested, etc.
 1.13 20-Jul-2010  njoly Update ATF_TC_FSADD macro use ATF cleanup function. And call
xx_fstest_delfs() from here instead of test body.
 1.12 19-Jul-2010  pooka * namespace some macros under FSTEST
* inline atf_check_tc() since this is a header
 1.11 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.10 13-Jul-2010  pooka Run puffs/dtfs as part of the vfs tests.
 1.9 13-Jul-2010  njoly Add testcase data argument to all fstest helper functions.
Needed by pooka for puffs fstest support.
 1.8 13-Jul-2010  pooka Make the FSTYPE macros take tc instead of derivative type "type".

ok njoly
 1.7 12-Jul-2010  njoly Update filesystem helper functions namespace (from XXX_mount to
XXX_fstest_mount) to avoid conflicts with existing functions such as
puffs_mount.
 1.6 12-Jul-2010  njoly Pass down the test case data to the test function, to be able to use
meta-data informations such as srcdir. Requested by pooka.

While here remove fstype argument, and define it as a custom meta-data
(X-fs.type) instead.
 1.5 09-Jul-2010  njoly Get rid of home made filesystem type strings and use MOUNT_xxx ones
instead. While here provide some macros which do test for a specific
type.
 1.4 09-Jul-2010  njoly Pass down the filesystem type to the test funtion to allow fs-specific
callpoints.

Adjust t_rmdirrace by moving LFS test specific code from common/lfs.c,
and do skip sysvbfs which does not support rmdir(2).

from pooka.
 1.3 08-Jul-2010  pooka Add LFS to vfs test list. TODO: start cleanerd too.

It fails in a number of different ways. Some of them seem to appear
as a function of the file system size (i'm not sure if it's because
the lack of the cleaner or not. i'm guessing ``no'', though).

ok njoly
 1.2 05-Jul-2010  njoly Fix more copyrights, where i forgot to add my name.
 1.1 30-Jun-2010  njoly Add helper code and macros to ease writing filesystem tests with rump.
Support currently limited to ext2fs, ffs, msdos, sysvbfs and tmpfs.
 1.35.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.35.2.1 30-Oct-2012  yamt sync with head
 1.36.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.36.2.1 23-Jun-2013  tls resync from head
 1.40.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.41.12.1 25-Jun-2018  pgoyette Sync with HEAD
 1.42.2.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.44.8.2 15-Aug-2025  perseant Update to match the change just committed to HEAD.
 1.44.8.1 12-Aug-2024  perseant Rewrite ZFS test macros into a more scalable form; add a parallel set of
macros for exFATfs.
 1.8 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.7 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.6 13-Jul-2010  njoly Add testcase data argument to all fstest helper functions.
Needed by pooka for puffs fstest support.
 1.5 12-Jul-2010  njoly Update filesystem helper functions namespace (from XXX_mount to
XXX_fstest_mount) to avoid conflicts with existing functions such as
puffs_mount.
 1.4 11-Jul-2010  pooka Remove the lfs race condition hack now that it's properly in the
test instead of the fs-specific part.
 1.3 09-Jul-2010  njoly Pass down the filesystem type to the test funtion to allow fs-specific
callpoints.

Adjust t_rmdirrace by moving LFS test specific code from common/lfs.c,
and do skip sysvbfs which does not support rmdir(2).

from pooka.
 1.2 08-Jul-2010  pooka fill in PR number now that we have one
 1.1 08-Jul-2010  pooka Add LFS to vfs test list. TODO: start cleanerd too.

It fails in a number of different ways. Some of them seem to appear
as a function of the file system size (i'm not sure if it's because
the lack of the cleaner or not. i'm guessing ``no'', though).

ok njoly
 1.6 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.5 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.4 13-Jul-2010  njoly Add testcase data argument to all fstest helper functions.
Needed by pooka for puffs fstest support.
 1.3 12-Jul-2010  njoly Update filesystem helper functions namespace (from XXX_mount to
XXX_fstest_mount) to avoid conflicts with existing functions such as
puffs_mount.
 1.2 05-Jul-2010  njoly Fix more copyrights, where i forgot to add my name.
 1.1 30-Jun-2010  njoly Add helper code and macros to ease writing filesystem tests with rump.
Support currently limited to ext2fs, ffs, msdos, sysvbfs and tmpfs.
 1.3 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.2 28-Jul-2010  pooka Move nfstestargs to header "because I need them". A more sweeping
action would be good here.
 1.1 26-Jul-2010  pooka Add NFS to the list of file systems exercised by the "vfs" tests.

How it works:
NFS tests fork and exec the nfs service from fs/nfs/nfsservice.
The child then:
a) creates a FFS file system
b) mounts it
c) starts rpcbind
d) starts mountd
e) starts nfsd
f) handles requests

The client, as expected, does the standard RPC regotiation and
calls mount(MOUNT_NFS). It then proceeds to execute the test.

An individual test which executes everything described above and
does a few file operations on the NFS mount takes 0.16s wall time
on my laptop from start to finish. This means it is feasible to
run hundreds of tests while still getting results in a timely
fashion.

Like in other networked tests, the two processes are connected via
the rump shmif which uses mmapped files as ethernet busses. The
entire test suite can be executed by an unprivileged account.

As a side effect, these tests exercise also the kernel NFS server
in addition to the kernel NFS client.

While everything is currently targetted at executing the vfs tests,
there is no reason this could not be extended to exercise features
specific to NFS. For example, the server can run through all
exportable file system types, permissions can be tested, etc.
 1.5 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.4 26-Jul-2010  pooka catch "child died"
 1.3 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.2 13-Jul-2010  pooka off_t -> uint64_t to hopefully avoid some lp64 signedness whines.
 1.1 13-Jul-2010  pooka Run puffs/dtfs as part of the vfs tests.
 1.8 09-Jul-2019  maya return return atf_no_error() instead of 0 for consistency.

suggested by moritzbuhl in https://github.com/NetBSD/src/pull/11/
 1.7 06-Feb-2013  hannken branches: 1.7.30;
Test taking a snapshot from a stressed file system.
Checks snapshot meta data only with fsck.

OK: Antti Kantee <pooka@netbsd.org>
 1.6 12-Feb-2011  bouyer branches: 1.6.4; 1.6.10;
Test the right fd after rump_sys_open().
 1.5 07-Nov-2010  jmmv branches: 1.5.2;
Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 31-May-2010  pooka Now that atf gdb/coredump conflicts have been solved (thanks jmmv!),
remove USE_ATF ifdefs.
 1.2 16-Apr-2010  pooka Add the typical #ifdef USE_ATF stuff so I can debug the test if it
goes wrong.
 1.1 13-Apr-2010  pooka Split snapshot test into fs-independent backend and fs-specific frontend.

I really wish all our fs tests were like this (in principle, that
is. I'm not talking about this hacky implementation). I've been
wishing this for quite a few years now. Seems like my wishes don't
come true.
 1.5.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.6.10.1 25-Feb-2013  tls resync with head
 1.6.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.5 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.4 13-Jul-2010  njoly Add testcase data argument to all fstest helper functions.
Needed by pooka for puffs fstest support.
 1.3 12-Jul-2010  njoly Update filesystem helper functions namespace (from XXX_mount to
XXX_fstest_mount) to avoid conflicts with existing functions such as
puffs_mount.
 1.2 05-Jul-2010  njoly Fix more copyrights, where i forgot to add my name.
 1.1 30-Jun-2010  njoly Add helper code and macros to ease writing filesystem tests with rump.
Support currently limited to ext2fs, ffs, msdos, sysvbfs and tmpfs.
 1.6 29-Jul-2010  pooka Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
 1.5 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.4 13-Jul-2010  njoly Add testcase data argument to all fstest helper functions.
Needed by pooka for puffs fstest support.
 1.3 12-Jul-2010  njoly Update filesystem helper functions namespace (from XXX_mount to
XXX_fstest_mount) to avoid conflicts with existing functions such as
puffs_mount.
 1.2 05-Jul-2010  njoly Fix more copyrights, where i forgot to add my name.
 1.1 30-Jun-2010  njoly Add helper code and macros to ease writing filesystem tests with rump.
Support currently limited to ext2fs, ffs, msdos, sysvbfs and tmpfs.
 1.4 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.3 31-Mar-2010  njoly Use tp-glob keys when requesting for test pattern.
 1.2 29-Mar-2010  pooka regression test for fifos on ffs

XXX: same test apart for mount/unmount could be used on other
fifo-supporting file systems (r/w support required, though).
 1.1 08-Apr-2009  pooka branches: 1.1.2;
regression test for kern/40948
 1.1.2.2 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.1.2.1 08-Apr-2009  jym file Atffile was added on branch jym-xensuspend on 2009-05-13 19:19:22 +0000
 1.22 15-May-2020  christos PR/55102: Kamil Rytarowski: Duplicate fifo_vnodeop_entries,
fifo_vnodeop_opv_desc symbols.

Many filesystems ffs, lfs, ulfs, chfs, ext2fs etc. use fifofs
internally for their fifo vnops. NFS does too, but it also needs
networking anyway. Unfortunately fifofs brings in a lot of the
networking code so that the rumpkernel is not well partition. In
addition the fifo code is rarely used.

The existing hack depended on duplicating the above symbols and
adding minimal functionality for the majority of the the tests
(except the ffs and the puffs one). In these two cases both symbols
were loaded and the symbol sizes clashed which broke the sanitizers.
While this can be fixed with weak symbols and other kinds of
indirection, it is more straight forward to select between the
minimal and the full fifofs implementation by introducing a new
shared library librumpvfs_nofifofs.
 1.21 10-Apr-2020  christos New extended attributes test (does not work until we commit kernel changes)
 1.20 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.19 22-Mar-2017  jdolecek branches: 1.19.12;
add tests for the mount update from rw to rw+log, which used to case the panic
reported in PR kern/52056
 1.18 07-Jan-2015  pooka branches: 1.18.2; 1.18.4;
Move sysproxy support into a separate component, rumpkern_sysproxy,
instead of it being always provided by the rump kernel base. This
move accomplishes two things:

1) it is no longer necessary to provide sysproxy hypercall stubs for
platforms which do not want to use sysproxy
2) it is easier to reason about the security aspects, since configurations
not linking the sysproxy component simply do not support remote
system calls

discussed on rumpkernel-users
 1.17 18-Jan-2012  bouyer Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
 1.16 09-Mar-2011  tron branches: 1.16.4;
Don't descend into non-existing subdirectory "clients".
 1.15 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.14 19-Nov-2010  pooka branches: 1.14.2;
test snapshots on ffsv2 too
 1.13 05-Nov-2010  pooka test fss with underlying fs mounted with MNT_LOG
 1.12 23-Sep-2010  he Reorder the library specifications, so that we don't depend on the
library dependencies recorded in shared libraries, allowing these
to be linked statically as well.
 1.11 19-Jul-2010  pooka Need to use the ${PRINTOBJDIR} trick for LIBISPRIVATE ...
 1.10 19-Jul-2010  pooka Include h_fsmacros instead of ffs.c and link in test lib.
 1.9 14-Jul-2010  pooka Convert "The Original" rename race test from to vfs and retire the
ffs/tmpfs versions. The only difference is that the origamical
one mounted ffs with MNT_LOG (and therein actually lay the bug).
 1.8 30-Jun-2010  njoly Small xfail testcase to exercise 48k ffs image mount, from problem
reported by Hubert Feyrer on netbsd-users@.
 1.7 12-Apr-2010  pooka test for the very basic snapshot features
 1.6 29-Mar-2010  pooka regression test for fifos on ffs

XXX: same test apart for mount/unmount could be used on other
fifo-supporting file systems (r/w support required, though).
 1.5 31-Jan-2010  mlelstv filesystems now use getdisksize() which is in librumpdev_disk.
 1.4 02-May-2009  pooka branches: 1.4.2;
Merge librumpfs_ufs into librumpfs_ffs. This reflects what happened
with the ffs kernel module and follows the trend of retiring ufs.
It also allows to get rid of a special case kludge in runtime module
loading, since ufs was not really a module. librumpfs_ufs is now
obsoleted and ffs consumers should be linked solely against
librumpfs_ffs.
 1.3 26-Apr-2009  pooka Use rump_sys_mount() instead of ukfs_mount(). Just a few more
steps and we can have a switch for if we want to run tests against
a rump kernel or a real kernel.
 1.2 14-Apr-2009  pooka WARNS=4
 1.1 08-Apr-2009  pooka regression test for kern/40948
 1.4.2.2 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.4.2.1 02-May-2009  jym file Makefile was added on branch jym-xensuspend on 2009-05-13 19:19:22 +0000
 1.14.2.7 11-Feb-2011  bouyer Add a test which cause the kernel to walk a quota list where all entries
are not in the header disk block, and at last 2 of them are in the same
non-header disk block.
 1.14.2.6 09-Feb-2011  bouyer Check that upgrading a R/O to R/W mount will properly enable quota2.
 1.14.2.5 07-Feb-2011  bouyer Test clearing of quota entries
 1.14.2.4 02-Feb-2011  bouyer Check that the kernel enforces the quota limits and grace times.
 1.14.2.3 30-Jan-2011  bouyer Add tests cases for quotactl("set")
 1.14.2.2 28-Jan-2011  bouyer Add rump versions of quota utilities, to be used by tests.
Add a test which figures if we can retrieve quota values from
the kernel.
 1.14.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.16.4.1 17-Apr-2012  yamt sync with head
 1.18.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.18.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.19.12.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.12.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5 20-Aug-2020  gson Remove non-functional cleanup code from test_case() and test_case_root().
It had no effect because RUMP_SOCKETS_LIST is not set in the shell
running the cleanup phase. Even if RUMP_SOCKETS_LIST had been set,
the code would still not have worked correctly because it ran
rump.halt via "atf_check -s exit:1", which would cause the first
successful halting of a rump processes to be treated as a failure
and abort the cleanup without halting any other rump processes still
running.
 1.4 17-Aug-2020  gson Remove unused function rump_shutdown()
 1.3 08-Oct-2016  gson Incrase timeout for the benefit of the walk_list_user test case which
sometimes times out under qemu under Linux, where the timing is more
accurate than under qemu under NetBSD where the the 60 second timeout
typically takes more than 60 seconds to trigger.
 1.2 29-Jul-2013  skrll branches: 1.2.8;
Slow hardware needs longer, especially for default_deny_user_big
 1.1 18-Jan-2012  bouyer branches: 1.1.4; 1.1.8;
Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
 1.1.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.4.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.2 17-Apr-2012  yamt sync with head
 1.1.4.1 18-Jan-2012  yamt file ffs_common.sh was added on branch yamt-pagecache on 2012-04-17 00:09:03 +0000
 1.2.8.1 04-Nov-2016  pgoyette Sync with HEAD
 1.2 24-Aug-2012  jmmv h_ffs_server.c is not a test program. Remove unnecessary traces of atf.
 1.1 18-Jan-2012  bouyer branches: 1.1.4;
Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
 1.1.4.3 30-Oct-2012  yamt sync with head
 1.1.4.2 17-Apr-2012  yamt sync with head
 1.1.4.1 18-Jan-2012  yamt file h_ffs_server.c was added on branch yamt-pagecache on 2012-04-17 00:09:03 +0000
 1.3 18-Jan-2012  bouyer Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
 1.2 06-Mar-2011  bouyer branches: 1.2.4;
merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file h_quota2_server.c was initially added on branch bouyer-quota2.
 1.1.2.3 07-Feb-2011  bouyer Add an option to mount the filesystem -o log to rump quota servers.
Add some quota tests on a WAPBL-enabled filesystem.
 1.1.2.2 30-Jan-2011  bouyer Add a command-line flag to toggle foreground/background
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2.4.1 17-Apr-2012  yamt sync with head
 1.6 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.5 13-Jan-2017  christos branches: 1.5.26;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.4 30-Sep-2012  bouyer branches: 1.4.12;
Add test cases for the bug fixed in sys/ufs/ufs/ufs_quota2.c 1.35:
when a on-disk block/inode allocation triggers allocating a new
quota entry, the new quota entry is not in the quota2 header block,
and the allocation will later be denied, the changes to the quota block would
not be flushed to disk, leading to list corruption (detected by fsck).
 1.3 11-Jun-2011  christos branches: 1.3.2; 1.3.4; 1.3.6; 1.3.8;
Turn warns on for all tests and fix all the bugs.
 1.2 06-Mar-2011  bouyer branches: 1.2.2;
merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 02-Feb-2011  bouyer branches: 1.1.2;
file h_quota2_tests.c was initially added on branch bouyer-quota2.
 1.1.2.5 13-Feb-2011  bouyer Add a test checking that an unlinked file cleaned by the log replay keeps
quotas up to date.
 1.1.2.4 12-Feb-2011  bouyer Add some quota+snapshot tests.
 1.1.2.3 07-Feb-2011  bouyer Add an option to mount the filesystem -o log to rump quota servers.
Add some quota tests on a WAPBL-enabled filesystem.
 1.1.2.2 03-Feb-2011  bouyer Change semantic of limits to allow up to the limit inclued (instead of
up to one less than the limit: I feel that if my limit is 1000 inodes
I should be able to create 1000 files, not 999).
Keep the previous semantic for quota1 dquot, the conversion functions
will add or remove 1 when converting limits from/to the new format.

Adjust test for this change.
 1.1.2.1 02-Feb-2011  bouyer Check that the kernel enforces the quota limits and grace times.
 1.2.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.6.1 01-Nov-2012  matt sync with netbsd-6-0-RELEASE.
 1.3.4.1 01-Oct-2012  riz Pull up following revision(s) (requested by bouyer in ticket #580):
tests/fs/ffs/h_quota2_tests.c: revision 1.4
tests/fs/ffs/t_miscquota.sh: revision 1.7
sys/ufs/ufs/ufs_quota2.c: revision 1.35
Fix quota2 list corruption issue when defaultquotas are 0 (deny any file
and block allocation).
When quota2_check() is called with an uid not yet in the list,
getinoquota2() will call quota2_q2ealloc() to allocate a new entry for this
uid. quota2_q2ealloc() will remove an entry from the free list and
put it at the head of the corresponding hash list, and flush the block
containing the header if it's not the one also containing the allocated entry.
quota2_q2ealloc() then return the alocated entry and corresponding block
to caller (getinoquota2() here), which returns it to quota2_check().
quota2_check() then checks if the allocation can succeed, and returns and
error if not and calls brelse() on the buffer (because from his POW no
change was made to the entry), effectively discarding changes
to the entry that may have been made by quota2_q2ealloc().
Fix by always bwrite()ing the entry in quota2_q2ealloc(), and re-reading
the entry in caller.
Add test cases for the bug fixed in sys/ufs/ufs/ufs_quota2.c 1.35:
when a on-disk block/inode allocation triggers allocating a new
quota entry, the new quota entry is not in the quota2 header block,
and the allocation will later be denied, the changes to the quota block would
not be flushed to disk, leading to list corruption (detected by fsck).
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.4.12.1 20-Mar-2017  pgoyette Sync with HEAD
 1.5.26.1 02-Aug-2025  perseant Sync with HEAD
 1.4 18-Jan-2012  bouyer Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
 1.3 12-Mar-2011  bouyer branches: 1.3.4;
Add support for multiple rump servers in shutdown and cleanup
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 28-Jan-2011  bouyer branches: 1.1.2;
file quotas_common.sh was initially added on branch bouyer-quota2.
 1.1.2.6 07-Feb-2011  bouyer Add an option to mount the filesystem -o log to rump quota servers.
Add some quota tests on a WAPBL-enabled filesystem.
 1.1.2.5 02-Feb-2011  bouyer Check that the kernel enforces the quota limits and grace times.
 1.1.2.4 31-Jan-2011  bouyer Extract code to shut down the rump server and check the filesystem image
to a function.
 1.1.2.3 30-Jan-2011  bouyer Ask the rump server to background itself, to avoid a race at startup where
a rump command could be run before the server is available.
Add a sleep after shutdown to workaround a race where the fsck would run
before the server is fully showdown (testing for the existence of the
socket seems to not be enough).
 1.1.2.2 30-Jan-2011  bouyer Add tests cases for quotactl("set")
 1.1.2.1 28-Jan-2011  bouyer Add rump versions of quota utilities, to be used by tests.
Add a test which figures if we can retrieve quota values from
the kernel.
 1.3.4.1 17-Apr-2012  yamt sync with head
 1.4 18-Jan-2012  bouyer Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
 1.3 09-Mar-2011  bouyer branches: 1.3.4;
Use librumphijack for quota commands instead of rumpifed versions.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 07-Feb-2011  bouyer branches: 1.1.2;
file t_clearquota.sh was initially added on branch bouyer-quota2.
 1.1.2.1 07-Feb-2011  bouyer Test clearing of quota entries
 1.3.4.1 17-Apr-2012  yamt sync with head
 1.3 17-Nov-2022  chs Restore backward compatibility of UFS2 with previous NetBSD releases by
disabling support in UFS2 for extended attributes (including ACLs).
Add a new variant of UFS2 called "UFS2ea" that does support extended attributes.
Add new fsck_ffs operations "-c ea" and "-c no-ea" to convert file systems
from UFS2 to UFS2ea and vice-versa (both of which delete all existing extended
attributes in the process).
 1.2 12-Apr-2020  christos branches: 1.2.2;
make sure that 0 length files get their extattrs cleaned up on deletion
(there was an optimization to not call truncate if size == 0).
 1.1 10-Apr-2020  christos New extended attributes test (does not work until we commit kernel changes)
 1.2.2.3 21-Apr-2020  martin Sync with HEAD
 1.2.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.2.1 12-Apr-2020  martin file t_extattr.c was added on branch phil-wifi on 2020-04-13 08:05:23 +0000
 1.7 09-Jul-2019  maya return return atf_no_error() instead of 0 for consistency.

suggested by moritzbuhl in https://github.com/NetBSD/src/pull/11/
 1.6 13-Jan-2017  christos branches: 1.6.14;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.5 07-Nov-2010  jmmv branches: 1.5.28;
Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 31-May-2010  pooka Now that atf gdb/coredump conflicts have been solved (thanks jmmv!),
remove USE_ATF ifdefs.
 1.2 01-May-2010  pooka fix !USE_ATF
 1.1 29-Mar-2010  pooka regression test for fifos on ffs

XXX: same test apart for mount/unmount could be used on other
fifo-supporting file systems (r/w support required, though).
 1.5.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4 18-Jan-2012  bouyer Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
 1.3 09-Mar-2011  bouyer branches: 1.3.4;
Use librumphijack for quota commands instead of rumpifed versions.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 28-Jan-2011  bouyer branches: 1.1.2;
file t_getquota.sh was initially added on branch bouyer-quota2.
 1.1.2.9 05-Mar-2011  bouyer Also check that repquota doesn't report any overquota user
 1.1.2.8 11-Feb-2011  bouyer Add a test which cause the kernel to walk a quota list where all entries
are not in the header disk block, and at last 2 of them are in the same
non-header disk block.
 1.1.2.7 07-Feb-2011  bouyer Add an option to mount the filesystem -o log to rump quota servers.
Add some quota tests on a WAPBL-enabled filesystem.
 1.1.2.6 02-Feb-2011  bouyer Check that the kernel enforces the quota limits and grace times.
 1.1.2.5 31-Jan-2011  bouyer Extract code to shut down the rump server and check the filesystem image
to a function.
 1.1.2.4 30-Jan-2011  bouyer Remove rump.halt race workaround now that it's fixed in rump
Ajust for new quota tools output
 1.1.2.3 30-Jan-2011  bouyer Ask the rump server to background itself, to avoid a race at startup where
a rump command could be run before the server is available.
Add a sleep after shutdown to workaround a race where the fsck would run
before the server is fully showdown (testing for the existence of the
socket seems to not be enough).
 1.1.2.2 30-Jan-2011  bouyer Remove unused function
 1.1.2.1 28-Jan-2011  bouyer Add rump versions of quota utilities, to be used by tests.
Add a test which figures if we can retrieve quota values from
the kernel.
 1.3.4.1 17-Apr-2012  yamt sync with head
 1.9 05-Dec-2021  msaitoh s/shapshot/snapshot/
 1.8 22-Jan-2013  dholland spelling
 1.7 30-Sep-2012  bouyer Add test cases for the bug fixed in sys/ufs/ufs/ufs_quota2.c 1.35:
when a on-disk block/inode allocation triggers allocating a new
quota entry, the new quota entry is not in the quota2 header block,
and the allocation will later be denied, the changes to the quota block would
not be flushed to disk, leading to list corruption (detected by fsck).
 1.6 13-Feb-2012  dholland branches: 1.6.2; 1.6.4; 1.6.6;
Update reference output to match yesterday's fix. ok martin@ for releng
 1.5 01-Feb-2012  dholland Reimplement repquota -x to print in tabular form instead of XML.
 1.4 18-Jan-2012  bouyer Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
 1.3 09-Mar-2011  bouyer branches: 1.3.4;
Use librumphijack for quota commands instead of rumpifed versions.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 11-Feb-2011  bouyer branches: 1.1.2;
file t_miscquota.sh was initially added on branch bouyer-quota2.
 1.1.2.4 13-Feb-2011  bouyer Add a test checking that an unlinked file cleaned by the log replay keeps
quotas up to date.
 1.1.2.3 12-Feb-2011  bouyer Add some quota+snapshot tests.
 1.1.2.2 11-Feb-2011  bouyer This test requires root
 1.1.2.1 11-Feb-2011  bouyer Add a test which cause the kernel to walk a quota list where all entries
are not in the header disk block, and at last 2 of them are in the same
non-header disk block.
 1.3.4.3 23-Jan-2013  yamt sync with head
 1.3.4.2 30-Oct-2012  yamt sync with head
 1.3.4.1 17-Apr-2012  yamt sync with head
 1.6.6.2 25-Feb-2013  tls resync with head
 1.6.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.4.1 01-Nov-2012  matt sync with netbsd-6-0-RELEASE.
 1.6.2.1 01-Oct-2012  riz Pull up following revision(s) (requested by bouyer in ticket #580):
tests/fs/ffs/h_quota2_tests.c: revision 1.4
tests/fs/ffs/t_miscquota.sh: revision 1.7
sys/ufs/ufs/ufs_quota2.c: revision 1.35
Fix quota2 list corruption issue when defaultquotas are 0 (deny any file
and block allocation).
When quota2_check() is called with an uid not yet in the list,
getinoquota2() will call quota2_q2ealloc() to allocate a new entry for this
uid. quota2_q2ealloc() will remove an entry from the free list and
put it at the head of the corresponding hash list, and flush the block
containing the header if it's not the one also containing the allocated entry.
quota2_q2ealloc() then return the alocated entry and corresponding block
to caller (getinoquota2() here), which returns it to quota2_check().
quota2_check() then checks if the allocation can succeed, and returns and
error if not and calls brelse() on the buffer (because from his POW no
change was made to the entry), effectively discarding changes
to the entry that may have been made by quota2_q2ealloc().
Fix by always bwrite()ing the entry in quota2_q2ealloc(), and re-reading
the entry in caller.
Add test cases for the bug fixed in sys/ufs/ufs/ufs_quota2.c 1.35:
when a on-disk block/inode allocation triggers allocating a new
quota entry, the new quota entry is not in the quota2 header block,
and the allocation will later be denied, the changes to the quota block would
not be flushed to disk, leading to list corruption (detected by fsck).
 1.14 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.13 27-Nov-2012  jakllsch branches: 1.13.12;
Add fsbsizeovermaxbsize test that tests mouting a FS with block size greater
than MAXBSIZE.
 1.12 27-Nov-2012  jakllsch Rename fsbsize2big to fsbsizeovermaxphys to accurately match what it tests.
Additionally, compute failing size dynamically by doubling MAXPHYS instead
of assuming 128K will be too big enough.
 1.11 07-Nov-2010  jmmv branches: 1.11.6; 1.11.12;
Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.10 09-Aug-2010  pooka add comment saying why the other test doesn't use fstest
 1.9 09-Aug-2010  pooka * convert 48k fs image test to FSTEST_CON/DESTRO
* make sure hugeblocksize doesn't accidentally succeed
 1.8 09-Aug-2010  pooka Check that mounting a file system with blocksize > MAXPHYS returns an error.
 1.7 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.6 19-Jul-2010  pooka Include h_fsmacros instead of ffs.c and link in test lib.
 1.5 13-Jul-2010  njoly Add testcase data argument to all fstest helper functions.
Needed by pooka for puffs fstest support.
 1.4 13-Jul-2010  enami Make this compile again.
 1.3 05-Jul-2010  pooka * fill PR number to xfail now that we have one -- let's try not
to add any xfail tests without an associated PR
* move xfail to the correct place
 1.2 05-Jul-2010  jmmv Use expect_fail instead of defining xfail. Looks like I missed this one
during the import of atf 0.10. Thanks pooka@.
 1.1 30-Jun-2010  njoly Small xfail testcase to exercise 48k ffs image mount, from problem
reported by Hubert Feyrer on netbsd-users@.
 1.11.12.1 25-Feb-2013  tls resync with head
 1.11.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.13.12.1 20-Mar-2017  pgoyette Sync with HEAD
 1.5 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.4 15-Mar-2012  joerg branches: 1.4.14;
Add __printflike attribution to use vprintf and friends with an argument
as format string.
 1.3 16-Jun-2011  joerg branches: 1.3.2;
Use proper format strings.
 1.2 06-Mar-2011  bouyer branches: 1.2.2;
merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file t_quota2_1.c was initially added on branch bouyer-quota2.
 1.1.2.2 30-Jan-2011  bouyer Use 80000 for gid offset instead of 60000, just in case ...
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.2.1 17-Apr-2012  yamt sync with head
 1.4.14.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6 20-Aug-2021  andvar fix various typos in comments and log messages.
 1.5 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.4 15-Mar-2012  joerg branches: 1.4.14;
Add __printflike attribution to use vprintf and friends with an argument
as format string.
 1.3 16-Jun-2011  joerg branches: 1.3.2;
Use proper format strings.
 1.2 06-Mar-2011  bouyer branches: 1.2.2;
merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 09-Feb-2011  bouyer branches: 1.1.2;
file t_quota2_remount.c was initially added on branch bouyer-quota2.
 1.1.2.1 09-Feb-2011  bouyer Check that upgrading a R/O to R/W mount will properly enable quota2.
 1.2.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.2.1 17-Apr-2012  yamt sync with head
 1.4.14.1 20-Mar-2017  pgoyette Sync with HEAD
 1.4 18-Jan-2012  bouyer Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
 1.3 09-Mar-2011  bouyer branches: 1.3.4;
Use librumphijack for quota commands instead of rumpifed versions.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 02-Feb-2011  bouyer branches: 1.1.2;
file t_quotalimit.sh was initially added on branch bouyer-quota2.
 1.1.2.4 07-Feb-2011  bouyer Add an option to mount the filesystem -o log to rump quota servers.
Add some quota tests on a WAPBL-enabled filesystem.
 1.1.2.3 03-Feb-2011  bouyer Change semantic of limits to allow up to the limit inclued (instead of
up to one less than the limit: I feel that if my limit is 1000 inodes
I should be able to create 1000 files, not 999).
Keep the previous semantic for quota1 dquot, the conversion functions
will add or remove 1 when converting limits from/to the new format.

Adjust test for this change.
 1.1.2.2 02-Feb-2011  bouyer Check that a new id properly get limits from the defaults.
 1.1.2.1 02-Feb-2011  bouyer Check that the kernel enforces the quota limits and grace times.
 1.3.4.1 17-Apr-2012  yamt sync with head
 1.13 14-Jul-2010  pooka Convert "The Original" rename race test from to vfs and retire the
ffs/tmpfs versions. The only difference is that the origamical
one mounted ffs with MNT_LOG (and therein actually lay the bug).
 1.12 30-Jun-2010  pooka qemu has been fixed, so remove timeout
(not that it helped in the first place ...)
 1.11 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.10 30-May-2010  dholland Use PATH_MAX instead of MAXPATHLEN and include limits.h.
 1.9 14-Oct-2009  pooka Adjust names of external rump control interfaces to match the
new rump_pub namespace.
 1.8 17-Sep-2009  pooka Set timeout to 20 because for some reason this test hangs in qemu.
(Well, it *still* hangs even after the timeout has passed, but at
least there's multiple problems to debug now)
 1.7 03-Aug-2009  pooka rump_fakeblk -> rump_etfs
 1.6 03-May-2009  pooka branches: 1.6.2;
Mount test fs onto /mp instead of /. This way it can be unmounted
and we can detect vnode reference leaks.
 1.5 29-Apr-2009  pooka * register fakeblk
* fix error message
 1.4 26-Apr-2009  pooka Use rump_sys_mount() instead of ukfs_mount(). Just a few more
steps and we can have a switch for if we want to run tests against
a rump kernel or a real kernel.
 1.3 14-Apr-2009  pooka Add atf_tc_fail_errno(), which appends strerror(errno) to the
message string. Adding it to h_macros suggested by jmmv
 1.2 08-Apr-2009  pooka Hmm, this case was for MNT_LOG so enable it. No wonder I couldn't
repeat the problem with the patch reverted. regression test
regression.
 1.1 08-Apr-2009  pooka regression test for kern/40948
 1.6.2.2 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.6.2.1 03-May-2009  jym file t_renamerace.c was added on branch jym-xensuspend on 2009-05-13 19:19:22 +0000
 1.4 18-Jan-2012  bouyer Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
 1.3 09-Mar-2011  bouyer branches: 1.3.4;
Use librumphijack for quota commands instead of rumpifed versions.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 30-Jan-2011  bouyer branches: 1.1.2;
file t_setquota.sh was initially added on branch bouyer-quota2.
 1.1.2.7 07-Feb-2011  bouyer Add an option to mount the filesystem -o log to rump quota servers.
Add some quota tests on a WAPBL-enabled filesystem.
 1.1.2.6 02-Feb-2011  bouyer Check that the kernel enforces the quota limits and grace times.
 1.1.2.5 31-Jan-2011  bouyer Extract code to shut down the rump server and check the filesystem image
to a function.
 1.1.2.4 30-Jan-2011  bouyer Also set and check the grace time in edquota tests.
 1.1.2.3 30-Jan-2011  bouyer Remove rump.halt race workaround now that it's fixed in rump
Ajust for new quota tools output
 1.1.2.2 30-Jan-2011  bouyer Ask the rump server to background itself, to avoid a race at startup where
a rump command could be run before the server is available.
Add a sleep after shutdown to workaround a race where the fsck would run
before the server is fully showdown (testing for the existence of the
socket seems to not be enough).
 1.1.2.1 30-Jan-2011  bouyer Add tests cases for quotactl("set")
 1.3.4.1 17-Apr-2012  yamt sync with head
 1.7 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.6 06-Feb-2013  hannken branches: 1.6.12;
Test taking a snapshot from a stressed file system.
Checks snapshot meta data only with fsck.

OK: Antti Kantee <pooka@netbsd.org>
 1.5 05-Nov-2010  pooka branches: 1.5.6; 1.5.12;
remove newline from error
 1.4 31-May-2010  pooka Now that atf gdb/coredump conflicts have been solved (thanks jmmv!),
remove USE_ATF ifdefs.
 1.3 13-Apr-2010  pooka Split snapshot test into fs-independent backend and fs-specific frontend.

I really wish all our fs tests were like this (in principle, that
is. I'm not talking about this hacky implementation). I've been
wishing this for quite a few years now. Seems like my wishes don't
come true.
 1.2 12-Apr-2010  pooka move check next to operation
 1.1 12-Apr-2010  pooka test for the very basic snapshot features
 1.5.12.1 25-Feb-2013  tls resync with head
 1.5.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.12.1 20-Mar-2017  pgoyette Sync with HEAD
 1.3 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.2 06-Feb-2013  hannken branches: 1.2.12;
Test taking a snapshot from a stressed file system.
Checks snapshot meta data only with fsck.

OK: Antti Kantee <pooka@netbsd.org>
 1.1 05-Nov-2010  pooka branches: 1.1.6; 1.1.12;
test fss with underlying fs mounted with MNT_LOG
 1.1.12.1 25-Feb-2013  tls resync with head
 1.1.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.12.1 20-Mar-2017  pgoyette Sync with HEAD
 1.3 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.2 06-Feb-2013  hannken branches: 1.2.12;
Test taking a snapshot from a stressed file system.
Checks snapshot meta data only with fsck.

OK: Antti Kantee <pooka@netbsd.org>
 1.1 19-Nov-2010  pooka branches: 1.1.6; 1.1.12;
test snapshots on ffsv2 too
 1.1.12.1 25-Feb-2013  tls resync with head
 1.1.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.12.1 20-Mar-2017  pgoyette Sync with HEAD
 1.1 22-Mar-2017  jdolecek branches: 1.1.2; 1.1.4;
add tests for the mount update from rw to rw+log, which used to case the panic
reported in PR kern/52056
 1.1.4.2 26-Apr-2017  pgoyette Sync with HEAD
 1.1.4.1 22-Mar-2017  pgoyette file t_update_log.c was added on branch pgoyette-localcount on 2017-04-26 02:53:32 +0000
 1.1.2.2 21-Apr-2017  bouyer Sync with HEAD
 1.1.2.1 22-Mar-2017  bouyer file t_update_log.c was added on branch bouyer-socketcan on 2017-04-21 16:54:10 +0000
 1.2 21-Dec-2011  christos branches: 1.2.4;
correct install dir
 1.1 21-Dec-2011  christos Add a test for the latest fifofs fix.
 1.2.4.2 17-Apr-2012  yamt sync with head
 1.2.4.1 21-Dec-2011  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:03 +0000
 1.2 10-Jan-2017  christos more tests needing <sys/stat.h>
 1.1 21-Dec-2011  christos branches: 1.1.4; 1.1.24;
Add a test for the latest fifofs fix.
 1.1.24.1 20-Mar-2017  pgoyette Sync with HEAD
 1.1.4.2 17-Apr-2012  yamt sync with head
 1.1.4.1 21-Dec-2011  yamt file t_fifo.c was added on branch yamt-pagecache on 2012-04-17 00:09:03 +0000
 1.2 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.1 18-Feb-2011  pooka branches: 1.1.2; 1.1.46;
Add test case for /->: conversion from PR kern/44523 by
Taylor R Campbell.

I adjusted the test to uudecode + bunzip2 the supplied image, and
removed the "null-finder" from the dirent code, since it had an
off-by-one which made the test fail.
 1.1.46.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1 18-Feb-2011  bouyer file Makefile was added on branch bouyer-quota2 on 2011-03-05 15:10:53 +0000
 1.1 18-Feb-2011  pooka branches: 1.1.2;
Add test case for /->: conversion from PR kern/44523 by
Taylor R Campbell.

I adjusted the test to uudecode + bunzip2 the supplied image, and
removed the "null-finder" from the dirent code, since it had an
off-by-one which made the test fail.
 1.1.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1 18-Feb-2011  bouyer file colon.hfs.bz2.uue was added on branch bouyer-quota2 on 2011-03-05 15:10:53 +0000
 1.8 24-Nov-2023  riastradh tests: Audit RZ abuse.

RZ succeeds if x is zero, and fails if x is nonzero, treating a
nonzero value as a error number as in errno(3) to print the message.

The following library routines instead return -1 on failure and set
errno to the error code:

fuse_opt_add_arg
fuse_opt_add_opt
fuse_opt_add_opt_escaped
fuse_opt_insert_arg
lseek
system

So use RL instead for those -- succeeds if x is zero, and fails if x
is -1.

This shouldn't make any tests newly fail or newly succeed -- the
functions in question only ever return 0 or -1 -- but if the tests
were already failing anywhere, they will now fail with meaningful
messages.

TBD: dlinfo, which isn't fit for RL or RZ since it reports errors via
dlerror() rather than errno.
 1.7 09-Jul-2019  maya return return atf_no_error() instead of 0 for consistency.

suggested by moritzbuhl in https://github.com/NetBSD/src/pull/11/
 1.6 13-Jan-2017  christos branches: 1.6.14;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.5 25-Feb-2011  martin branches: 1.5.2; 1.5.28;
Remove xfail for sparc64, alignement issues have been fixed
 1.4 24-Feb-2011  pooka adjust location of xfail in previous for more accuracy
 1.3 24-Feb-2011  pooka xfail PR kern/44631 on sparc64
 1.2 22-Feb-2011  pooka make the timeouts a bit more generous for really slow systems
 1.1 18-Feb-2011  pooka Add test case for /->: conversion from PR kern/44523 by
Taylor R Campbell.

I adjusted the test to uudecode + bunzip2 the supplied image, and
removed the "null-finder" from the dirent code, since it had an
off-by-one which made the test fail.
 1.5.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.5.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.5.2.1 25-Feb-2011  bouyer file t_pathconvert.c was added on branch bouyer-quota2 on 2011-03-05 15:10:53 +0000
 1.6.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.1 31-Mar-2010  pooka Add some basic tests for kernfs (getdents & changing hostname).

Per a "mad \"scientist\"" experiment, on i386 load kernfs support
from the installed kernel module instead of linking the driver in.
 1.5 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.4 10-Jun-2014  he branches: 1.4.24;
Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.
 1.3 08-Jun-2010  pooka branches: 1.3.12; 1.3.22;
Use rump component libs on all platforms. I'll add kernel module
autoloading as a separate test later.
 1.2 26-Apr-2010  pooka Undo infamous "mad \"scientist\"" experiment. There is no need
for complicated application frobbing to get a kernel module loaded
into rump -- it will be loaded from the host automatically now.
 1.1 31-Mar-2010  pooka Add some basic tests for kernfs (getdents & changing hostname).

Per a "mad \"scientist\"" experiment, on i386 load kernfs support
from the installed kernel module instead of linking the driver in.
 1.3.22.1 10-Aug-2014  tls Rebase.
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.24.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.3 31-May-2010  pooka branches: 1.3.28;
Now that atf gdb/coredump conflicts have been solved (thanks jmmv!),
remove USE_ATF ifdefs.
 1.2 26-Apr-2010  pooka Undo infamous "mad \"scientist\"" experiment. There is no need
for complicated application frobbing to get a kernel module loaded
into rump -- it will be loaded from the host automatically now.
 1.1 31-Mar-2010  pooka Add some basic tests for kernfs (getdents & changing hostname).

Per a "mad \"scientist\"" experiment, on i386 load kernfs support
from the installed kernel module instead of linking the driver in.
 1.3.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.2 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.1 28-Jun-2010  pooka add test for PR kern/43503
 1.5 21-Oct-2025  perseant Add tests for LFS resize and new fcntl commands.
 1.4 13-Oct-2025  perseant Add test cases to show whether newfs_lfs creates a file system that
fsck_lfs can understand; and whether orphans (files still in use, after
removal, at the time of a system crash) are removed at fs mount time.
 1.3 18-Aug-2020  perseant Add skipped test for in-kernel roll-forward agent
 1.2 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.1 28-Jun-2010  pooka branches: 1.1.46;
add test for PR kern/43503
 1.1.46.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 13-Oct-2025  perseant Add test cases to show whether newfs_lfs creates a file system that
fsck_lfs can understand; and whether orphans (files still in use, after
removal, at the time of a system crash) are removed at fs mount time.
 1.4 30-Oct-2025  perseant Add a seed parameter to differentiate between files, and correct the logic
for appending files so that the resultant file matches the expectation.
Pass the t_rfw tests again.
 1.3 29-Oct-2025  martin Use default test timeout (3min) for now for all this tests.
The timeouts cause artificial failures on many slower test setups
and the tests run sucessfull if given enough time.

Example from an sh3 machine:

t_fcntl (1/1): 4 test cases
cleanseg32: [330.482904s] Passed.
cleanseg64: [321.895482s] Passed.
coalesce32: [20.214675s] Passed.
coalesce64: [20.613933s] Passed.

We may reduce timeouts again after we have working logs from various
architectures.
 1.2 21-Oct-2025  perseant Make the test files smaller so that they write more quickly. To avoid
a timeout on slower platforms reported by martin@.
 1.1 21-Oct-2025  perseant Add tests for LFS resize and new fcntl commands.
 1.2 30-Oct-2025  perseant Add a seed parameter to differentiate between files, and correct the logic
for appending files so that the resultant file matches the expectation.
Pass the t_rfw tests again.
 1.1 13-Oct-2025  perseant Add test cases to show whether newfs_lfs creates a file system that
fsck_lfs can understand; and whether orphans (files still in use, after
removal, at the time of a system crash) are removed at fs mount time.
 1.8 09-Jul-2019  maya return return atf_no_error() instead of 0 for consistency.

suggested by moritzbuhl in https://github.com/NetBSD/src/pull/11/
 1.7 13-Jan-2017  christos branches: 1.7.14;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.6 22-Feb-2011  pooka branches: 1.6.26;
make the timeouts a bit more generous for really slow systems
 1.5 15-Nov-2010  pooka branches: 1.5.2;
double the timeout for slow hosts (from 1 to 2 seconds)
 1.4 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.3 03-Jul-2010  jmmv Re-add PR number and expected failure condition (as a comment, because the
problem is resolved). Per pooka's request.
 1.2 03-Jul-2010  jmmv Replace custom xfail settings with the new expected failure support in
atf 0.10.
 1.1 28-Jun-2010  pooka add test for PR kern/43503
 1.5.2.1 05-Mar-2011  bouyer Sync with HEAD
 1.6.26.1 20-Mar-2017  pgoyette Sync with HEAD
 1.7.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 30-Oct-2025  perseant Add a seed parameter to differentiate between files, and correct the logic
for appending files so that the resultant file matches the expectation.
Pass the t_rfw tests again.
 1.1 21-Oct-2025  perseant Add tests for LFS resize and new fcntl commands.
 1.8 30-Oct-2025  perseant Add a seed parameter to differentiate between files, and correct the logic
for appending files so that the resultant file matches the expectation.
Pass the t_rfw tests again.
 1.7 18-Oct-2025  perseant Convert the rfw64 test to expect success, following sys/ufs/lfs/lfs_rfw.c
rev 1.39.
 1.6 13-Oct-2025  perseant Convert t_rfw:rfw64 test case to expect-fail.
 1.5 13-Oct-2025  perseant Add test cases to show whether newfs_lfs creates a file system that
fsck_lfs can understand; and whether orphans (files still in use, after
removal, at the time of a system crash) are removed at fs mount time.
 1.4 27-Aug-2025  perseant Add extra checks, and report intermediate status as a debugging aid.
Separate tests for 32-bit LFS (expect fail) and 64-bit (skip, unable to test).
 1.3 23-Aug-2020  riastradh Nix trailing whitespace.
 1.2 23-Aug-2020  perseant Expand test to cover more failure cases. Change from skipped to expect fail
in anticipation of working roll-forward code.
 1.1 18-Aug-2020  perseant Add skipped test for in-kernel roll-forward agent
 1.4 30-Oct-2025  perseant Add a seed parameter to differentiate between files, and correct the logic
for appending files so that the resultant file matches the expectation.
Pass the t_rfw tests again.
 1.3 29-Oct-2025  perseant Use a pseudorandom number with a well-known seed to provide file data
pattern, rather than a pattern that repeats every 256 bytes. Write
pattern files to the test file system in blocks rather than one byte at a
time, significantly speeding up the test.
 1.2 18-Oct-2025  perseant Explicitly specify the segment size so the future tests can use the value.
The specified size is the same that was previously auto-selected, so there
is no effective change.
 1.1 13-Oct-2025  perseant Add test cases to show whether newfs_lfs creates a file system that
fsck_lfs can understand; and whether orphans (files still in use, after
removal, at the time of a system crash) are removed at fs mount time.
 1.4 30-Oct-2025  perseant Add a seed parameter to differentiate between files, and correct the logic
for appending files so that the resultant file matches the expectation.
Pass the t_rfw tests again.
 1.3 26-Oct-2025  andvar s/creat /create/ in few more comments and error log messages.
 1.2 18-Oct-2025  perseant Explicitly specify the segment size so the future tests can use the value.
The specified size is the same that was previously auto-selected, so there
is no effective change.
 1.1 13-Oct-2025  perseant Add test cases to show whether newfs_lfs creates a file system that
fsck_lfs can understand; and whether orphans (files still in use, after
removal, at the time of a system crash) are removed at fs mount time.
 1.2 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.1 13-Apr-2010  pooka Add msdosfs snapshot test. This one just slightly different from
the ffs test because msdosfs doesn't support VFS_SNAPSHOT, only
VFS_SUSPEND, i.e. we need external storage for the snapshot instead
of internal storage.
 1.3 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.2 07-Jan-2015  pooka branches: 1.2.16;
edit one more particularly well-hidden site needing -lrumpkern_sysproxy
 1.1 13-Apr-2010  pooka Add msdosfs snapshot test. This one just slightly different from
the ffs test because msdosfs doesn't support VFS_SNAPSHOT, only
VFS_SUSPEND, i.e. we need external storage for the snapshot instead
of internal storage.
 1.2.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.3 10-Jun-2014  martin branches: 1.3.6;
Properly initialize arguments for the tmpfs mounted in this test.
Pointed out by pooka@.
 1.2 06-Feb-2013  hannken branches: 1.2.6;
Test taking a snapshot from a stressed file system.
Checks snapshot meta data only with fsck.

OK: Antti Kantee <pooka@netbsd.org>
 1.1 13-Apr-2010  pooka branches: 1.1.6; 1.1.12;
Add msdosfs snapshot test. This one just slightly different from
the ffs test because msdosfs doesn't support VFS_SNAPSHOT, only
VFS_SUSPEND, i.e. we need external storage for the snapshot instead
of internal storage.
 1.1.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.12.1 25-Feb-2013  tls resync with head
 1.1.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 10-Aug-2014  tls Rebase.
 1.3.6.1 20-Mar-2017  pgoyette Sync with HEAD
 1.11 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.10 08-Jan-2015  pooka branches: 1.10.16;
fix MKZFS=yes ports
 1.9 10-Jun-2014  he Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.
 1.8 24-Feb-2012  joerg branches: 1.8.2; 1.8.8;
Fix obvious code issues and remove the original -Wno-error for clang
builds to not hide them in the future:
(1) Don't use a pointer to a local variables if all that is done is
comparing it against NULL. The function itself works fine for that
purpose.

(2) Initialise the fail counter, giving the test a chance to work
reliably.
 1.7 13-Feb-2012  bouyer When I split non-quota-specific functions out from ../ffs/quotas_common.sh
I forgot to ajust this test.
Fix PR bin/46015
 1.6 30-May-2011  joerg branches: 1.6.4;
Ignore warnings when building with clang for now.
 1.5 12-Mar-2011  bouyer Add a test for rpc.rquotad(8)
 1.4 23-Sep-2010  he Reorder the library specifications, so that we don't depend on the
library dependencies recorded in shared libraries, allowing these
to be linked statically as well.
 1.3 28-Jul-2010  pooka install to right place. from pgoyette
 1.2 28-Jul-2010  pooka Add test for service interruption while mountd handles SIGHUP.
This is an xfail test for the problem described in PR kern/5844

per highly surreptitious nudge from mrg
 1.1 26-Jul-2010  pooka Add NFS service suitable for use in testing.
 1.6.4.1 17-Apr-2012  yamt sync with head
 1.8.8.1 10-Aug-2014  tls Rebase.
 1.8.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 23-Jan-2016  christos Define _KERNTYPES for things that need it.
 1.8 04-Jun-2021  hannken Test "mountdhup" has to pass now.
 1.7 16-Jul-2019  martin branches: 1.7.8;
PR misc/54382: whenever open(2) is called with O_CREAT, make sure to
pass an open mode argument.
 1.6 13-Jan-2017  christos branches: 1.6.14;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.5 24-Feb-2012  joerg branches: 1.5.14;
Fix obvious code issues and remove the original -Wno-error for clang
builds to not hide them in the future:
(1) Don't use a pointer to a local variables if all that is done is
comparing it against NULL. The function itself works fine for that
purpose.

(2) Initialise the fail counter, giving the test a chance to work
reliably.
 1.4 26-Jun-2011  christos branches: 1.4.2;
more fallout from rump_syscallargs.h including <signal.h>
 1.3 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.2 01-Aug-2010  pooka * apparently operations can also fail with EIO and EOPNOTSUPP while
mountd hup is in progress. strange, since I can't remember seeing
those a few days ago when i ran this quite a lot. anyway, don't
make those errnos fatal failures.
* also in the "apparently" sector, although this test fails 100%
reliably on my development host, it does not always trigger in the
anita run. so apply the current "race condition test" idiom
 1.1 28-Jul-2010  pooka Add test for service interruption while mountd handles SIGHUP.
This is an xfail test for the problem described in PR kern/5844

per highly surreptitious nudge from mrg
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.5.14.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.8.1 06-Jun-2021  cjep sync with head
 1.10 28-May-2023  hannken Add RUMPHIJACK option "blanket=/DEV" so mount_ffs may canonicalise
and mount the device path. Cannot use "/rump/DEV" here as the device
path is embedded in "struct ufs_args" where it doesnt get hijacked.
 1.9 20-Aug-2020  riastradh Nix trailing whitespace.
 1.8 20-Aug-2020  gson Add cleanup of possible leftover rump processes, replacing the
non-working cleanup code just removed from ffs_common.sh. Fixes
PR bin/48892 with respect to the t_rquotad test.
 1.7 13-May-2019  bad Get rid of all the -lrumpdev and -lrumpvfs that are no longer needed
after moving rump's mainbus from rumpdev to rumpkern.

Produces the same atf-run results as before.
 1.6 08-Mar-2019  msaitoh s/ are are / are /
s/ a a / a /
 1.5 10-Aug-2016  kre branches: 1.5.14;

+ -lrumpdev
 1.4 13-Mar-2014  gson Add -lrumpnet_netinet6 to the rump_server invocation, to stop
rpc.rquotad from printing the error message "rpc.rquotad:
_svc_tli_create: could not open connection for udp6: Address family
not supported by protocol family". The error message currently ends
up in /dev/null because it is printed to stderr after calling daemon()
with noclose=0, but if the daemonization is moved to a later point to
fix the race condition of PR misc/48282, it will actually appear on
stderr and break the test, which is expecting stderr to be empty.
 1.3 13-Aug-2012  pgoyette branches: 1.3.2;
Remove nfsd options as they are no longer needed.
 1.2 13-Feb-2012  bouyer When I split non-quota-specific functions out from ../ffs/quotas_common.sh
I forgot to ajust this test.
Fix PR bin/46015
 1.1 12-Mar-2011  bouyer branches: 1.1.4;
Add a test for rpc.rquotad(8)
 1.1.4.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 17-Apr-2012  yamt sync with head
 1.3.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.14.1 10-Jun-2019  christos Sync with HEAD
 1.17 03-Jun-2023  lukem bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
GCC_NO_warning
to
CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
 1.16 07-Mar-2021  christos Add blocklist support to libwrap which enables all programs using libwrap
to block access from hosts we deny. (libwrap support from Greg A. Woods)
 1.15 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.14 13-Oct-2019  mrg introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints. many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
 1.13 15-Aug-2019  kamil Avoid symbol clashes in fs/nfs/nfsservice under MKSANITIZER

Remove symbol conflicts for: __getmntinfo13
 1.12 13-Aug-2016  christos branches: 1.12.14; 1.12.16;
The required initialization order for net rump net services is:
rumpnet rumpnet_net [rumpnet_netinet6] rumpnet_netinet.
We need rumpnent_net first because of if_init1() and to initialize loopback.
 1.11 23-Dec-2015  christos Use the original nfsd.
 1.10 23-Dec-2015  christos add get_net.c
 1.9 08-Nov-2015  christos Use the regular mountd, and include the rpcbind stuff here.
 1.8 08-Jan-2015  pooka one more MKZFS fix (how many subdirs does this place have?)
 1.7 06-Mar-2013  christos don't refer to things that are irrelevant or never existed.
 1.6 19-Jul-2011  dholland branches: 1.6.2; 1.6.8;
Remove nonexistent include directory from CPPFLAGS.
PR 45068 from Henning Petersen.
 1.5 18-Dec-2010  joerg Don't force debug build.
 1.4 03-Aug-2010  drochner .PARSEDIR doesn't work. at least not for me. Use .CURDIR instead
which makes a build with objdir succeed.
 1.3 26-Jul-2010  pooka Install the exports file too so that the server can find it.
 1.2 26-Jul-2010  pooka fix TESTSDIR
 1.1 26-Jul-2010  pooka Add NFS service suitable for use in testing.
 1.6.8.1 23-Jun-2013  tls resync from head
 1.6.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.16.1 16-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #64):

tests/fs/nfs/nfsservice/Makefile: revision 1.13

Avoid symbol clashes in fs/nfs/nfsservice under MKSANITIZER

Remove symbol conflicts for: __getmntinfo13
 1.12.14.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12.14.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 26-Jul-2010  pooka Add NFS service suitable for use in testing.
 1.2 31-Dec-2010  pooka Configure two network addresses for the nfs server. One exports
/myexport r/w to the client in the same subnet and the other one
exports /myexport r/o to the client in the same subnet.
 1.1 26-Jul-2010  pooka Add NFS service suitable for use in testing.
 1.2 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.1 26-Jul-2010  pooka Add NFS service suitable for use in testing.
 1.12 08-Nov-2015  christos Use the regular mountd, and include the rpcbind stuff here.
 1.11 08-Nov-2015  christos Don't use POLL again.
 1.10 08-Nov-2015  christos make this work with the new fdset stuff.
 1.9 21-Aug-2015  christos don't abuse %m in printf
fix error messages
 1.8 19-Oct-2013  christos fix unused variable warnings
 1.7 22-Jan-2012  christos branches: 1.7.6;
From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
 1.6 30-Aug-2011  plunky branches: 1.6.2;
Apply casts to cases where xdrproc_t is expected but is not
strictly passed, for example because the second argument is
a different kind of pointer.
 1.5 31-Dec-2010  pooka Don't broadcast unmntall with SIGTERM -- it just makes the atf default
cleanup kill hang for a while.
 1.4 28-Jul-2010  pooka Defer definitely-nonreentrant signal handler to thread context.
This protects from rump kernel reentry and makes things not
crash && burn.
 1.3 27-Jul-2010  macallan initialize a few variables to shut up compiler warnings
 1.2 26-Jul-2010  pooka comment out lp64-offensive line (the syslog() calls are not used currently)
 1.1 26-Jul-2010  pooka Add NFS service suitable for use in testing.
 1.6.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.2.1 17-Apr-2012  yamt sync with head
 1.7.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7 23-Dec-2015  christos Use the original nfsd.
 1.6 23-Dec-2015  christos ggr, make debug static. I hate that the copy of this and the original
source has diverged so much!
 1.5 21-Aug-2015  christos don't abuse %m in printf
fix error messages
 1.4 19-Oct-2013  christos fix unused variable warnings
 1.3 28-Jul-2010  pooka branches: 1.3.6; 1.3.12;
Make sure we are not executed in non-debug mode (which forks).
 1.2 27-Jul-2010  macallan initialize a few variables to shut up compiler warnings
 1.1 26-Jul-2010  pooka Add NFS service suitable for use in testing.
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1 26-Jul-2010  pooka Add NFS service suitable for use in testing.
 1.11 17-Jun-2020  kamil Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
 1.10 23-Apr-2020  joerg Replace noatf global with conditional compilation
 1.9 08-Nov-2015  christos make this work with the new fdset stuff.
 1.8 12-May-2014  christos CID 975238: Unchecked returns
 1.7 28-Feb-2011  pooka branches: 1.7.4; 1.7.10; 1.7.20;
make netcfg produce sensible results in a non-atf env
 1.6 31-Dec-2010  pooka branches: 1.6.2;
Configure two network addresses for the nfs server. One exports
/myexport r/w to the client in the same subnet and the other one
exports /myexport r/o to the client in the same subnet.
 1.5 02-Sep-2010  pooka Actually use the imagename parameter. Also, fail with err instead
of atf_tc_fail since we are not directly under the control of atf.
 1.4 05-Aug-2010  pooka remove leftover debug printf
 1.3 30-Jul-2010  pooka Revert macroization, as the default mountpath doesn't match the
default export path.
 1.2 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.1 26-Jul-2010  pooka Add NFS service suitable for use in testing.
 1.6.2.1 05-Mar-2011  bouyer Sync with HEAD
 1.7.20.1 10-Aug-2014  tls Rebase.
 1.7.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.2 31-Mar-2010  njoly Use tp-glob keys when requesting for test pattern.
 1.1 30-Mar-2010  pooka Basic test for nullfs, which just checks that the two views act
somewhat sensibly.
 1.5 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.4 10-Jun-2014  he branches: 1.4.24;
Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.
 1.3 10-Apr-2010  pooka branches: 1.3.12; 1.3.22;
Rename librumpfs_nullfs to librumpfs_null to make the basename the
same as with the kernel module (and hence MOUNT_NULL).

I added the old name to the obsolete list, but given that it was
in-tree for only a bit over a week, I'll remove the entries in a
few weeks.
 1.2 30-Mar-2010  pooka anti-pasto
 1.1 30-Mar-2010  pooka Basic test for nullfs, which just checks that the two views act
somewhat sensibly.
 1.3.22.1 10-Aug-2014  tls Rebase.
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.24.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6 28-Jul-2024  bad use explicit failure messages

log which directory couldn't be created instead of giving numbers or using
the same indescript string multiple times.
 1.5 26-Jun-2020  jruoho branches: 1.5.8;
Reference PRs consistently.
 1.4 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.3 09-Jun-2010  pooka branches: 1.3.28;
``twistymount'' regression test for scenario described in PR kern/43439
 1.2 31-May-2010  pooka Now that atf gdb/coredump conflicts have been solved (thanks jmmv!),
remove USE_ATF ifdefs.
 1.1 30-Mar-2010  pooka Basic test for nullfs, which just checks that the two views act
somewhat sensibly.
 1.3.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.5.8.1 02-Aug-2025  perseant Sync with HEAD
 1.2 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.1 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.2 06-Jul-2010  pooka fix TESTSDIR
 1.1 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.1 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.1 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.1 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.1 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.3 22-May-2017  christos there is no more UsePrivilegeSeparation
 1.2 11-Feb-2011  pooka Use sshd's pidfile instead of $! and wait for the pidfile to appear.
This plugs a race condition where sshd did not have a chance to
open a sucket before we attempted to connect to it.
 1.1 06-Jul-2010  pooka branches: 1.1.2;
Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.1.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.10 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.9 24-May-2017  christos give it more time.
 1.8 05-Sep-2016  christos PR/51461: Mateusz Poszwa: Processes hang when attempting to read from an empty file on psshfs mount, add unit test:

When a process attempts to read from an empty file originating from
psshfs mount, it waits indefinitely. Until the hanged process is
interrupted, the mounted filesystem appears to work as expected,
except for the directory containing the empty file. Processes trying
to list that directory also hang, and cause misbehaviour of the
containing directory. It is possible to create a chain of hanged
processes trying to read directories up to the mount point. At the
same time, psshfs generates some network traffic (around 5KB/s, in
my case). Interrupting the first hanged process causes emission of
an error message by all other hanged processes, and psshfs ceases
to generate network traffic. Subsequent trials to list any affected
directory or if one of the affected directories is the mount point
to unmount the filesystem, fail with the same error.
 1.7 16-Mar-2013  jmmv Use /bin/sh for a temporary script instead of querying the name of the
shell from atf-config.
 1.6 12-Aug-2011  riastradh branches: 1.6.2; 1.6.8;
Cache vattr in psshfs's setattr.

This means within the cache window, a setattr that wouldn't change the
remote file's attributes from our current view of them will not be
relayed to the server and wait for the server to answer. Thus, e.g., a
process with a periodic timer interrupt that calls open(2) in a loop
can make progress with much higher probability than without caching.

XXX The test case doesn't work, so it's currently disabled. It needs
to stop the child of sshd that is handling an sftp session, not sshd
itself, and it's not obvious how to do that.

ok pooka
 1.5 31-Mar-2011  pooka Make sure test doesn't pass if file system could not be read at all.
 1.4 11-Feb-2011  pooka Use sshd's pidfile instead of $! and wait for the pidfile to appear.
This plugs a race condition where sshd did not have a chance to
open a sucket before we attempted to connect to it.
 1.3 06-Jan-2011  pooka branches: 1.3.2;
Add a test for ls, which is just a lazy scheme to have some testing
for puffs_cc(3).
 1.2 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.1 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.3.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.6.8.1 23-Jun-2013  tls resync from head
 1.6.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.1 11-Jun-2010  pooka Add some ptyfs tests.

Note: I'm not adding these to the build yet, since they depend on
some other other cleanup I might get done only after the weekend.
Even so, t_nullpts serves a simple example of how to repeat the
crash described in PR kern/43456 (just remove "rump_sys_" from the
calls and it should compile and you should get a host kernel panic
instead of a coredump).
 1.6 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.5 10-Jun-2014  he branches: 1.5.24;
Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.
 1.4 13-Oct-2011  plunky branches: 1.4.8; 1.4.18;
max WARNS is 4
 1.3 18-Dec-2010  christos remove NOGCCERROR, WARNS?=5
 1.2 18-Dec-2010  joerg Don't force debug build. XXX Why does this have NOGCCERROR=1 set?
 1.1 11-Jun-2010  pooka Add some ptyfs tests.

Note: I'm not adding these to the build yet, since they depend on
some other other cleanup I might get done only after the weekend.
Even so, t_nullpts serves a simple example of how to repeat the
crash described in PR kern/43456 (just remove "rump_sys_" from the
calls and it should compile and you should get a host kernel panic
instead of a coredump).
 1.4.18.1 10-Aug-2014  tls Rebase.
 1.4.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.24.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.5 10-Jan-2011  hannken branches: 1.5.28;
Add layer_revoke() that adjusts the lower vnode use count to be at least as
high as the upper vnode count before passing down the VOP_REVOKE().

This way vclean() check for active (vp->v_usecount > 1) vnodes gets it right.

Should fix PR kern/43456.
 1.4 03-Jul-2010  jmmv Replace custom xfail settings with the new expected failure support in
atf 0.10.
 1.3 16-Jun-2010  pooka Fix test: we need to mount /dev/pts to /null/dev/pts, not /dev to
/null/dev: we're interested in /dev/pts and nullfs doesn't traverse
underlying mountpoints.

(I had code for nullfs mountpoint traversal in the tree i used to
test this originally... but I assume the rest of the world doesn't.
Before this change the test would still fail, but fail in the wrong
place and due to the wrong reason.)
 1.2 16-Jun-2010  pooka Set xfail for tests which have a PR for them.
 1.1 11-Jun-2010  pooka Add some ptyfs tests.

Note: I'm not adding these to the build yet, since they depend on
some other other cleanup I might get done only after the weekend.
Even so, t_nullpts serves a simple example of how to repeat the
crash described in PR kern/43456 (just remove "rump_sys_" from the
calls and it should compile and you should get a host kernel panic
instead of a coredump).
 1.5.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.2 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.1 11-Jun-2010  pooka branches: 1.1.28;
Add some ptyfs tests.

Note: I'm not adding these to the build yet, since they depend on
some other other cleanup I might get done only after the weekend.
Even so, t_nullpts serves a simple example of how to repeat the
crash described in PR kern/43456 (just remove "rump_sys_" from the
calls and it should compile and you should get a host kernel panic
instead of a coredump).
 1.1.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.5 30-Dec-2007  jmmv branches: 1.5.2;
Re-add the NetBSD CVS Id tag to the header. It just had to be quoted to
be accepted by the parser; i.e. no bug in the code :-)

Note to self: do not try to "fix" stuff the last minute before going to
sleep.
 1.4 29-Dec-2007  jmmv Use proper specification for a glob pattern.
 1.3 29-Dec-2007  jmmv Back out the change to introduce the X-NetBSD-Id header entry. For some
reason the parser does not accept its contents... You know, one should
always test even trivial changes!

Will review this in more depth tomorrow to find the real root cause of the
problem and rule out a fix for ATF.
 1.2 26-Dec-2007  jmmv Add the NetBSD Id tag to the Atffiles. Issue raised by pooka@ a while ago.
 1.1 26-Dec-2007  jmmv Beleatedly add some regression tests for a couple of problems I found in
psshfs and that pooka@ already fixed a while ago. These were rather tricky
to get working.
 1.5.2.2 09-Jan-2008  matt sync with HEAD
 1.5.2.1 30-Dec-2007  matt file Atffile was added on branch matt-armv6 on 2008-01-09 01:59:06 +0000
 1.16 15-May-2020  christos PR/55102: Kamil Rytarowski: Duplicate fifo_vnodeop_entries,
fifo_vnodeop_opv_desc symbols.

Many filesystems ffs, lfs, ulfs, chfs, ext2fs etc. use fifofs
internally for their fifo vnops. NFS does too, but it also needs
networking anyway. Unfortunately fifofs brings in a lot of the
networking code so that the rumpkernel is not well partition. In
addition the fifo code is rarely used.

The existing hack depended on duplicating the above symbols and
adding minimal functionality for the majority of the the tests
(except the ffs and the puffs one). In these two cases both symbols
were loaded and the symbol sizes clashed which broke the sanitizers.
While this can be fixed with weak symbols and other kinds of
indirection, it is more straight forward to select between the
minimal and the full fifofs implementation by introducing a new
shared library librumpvfs_nofifofs.
 1.15 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.14 10-Jun-2014  he branches: 1.14.24;
Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.
 1.13 12-Nov-2010  pooka branches: 1.13.12; 1.13.22;
Remove accidentally committed part (which I need to run these tests
for a -current rump kernel on NetBSD 5.1)
 1.12 12-Nov-2010  pooka Add test case for problem described by yamt in PR kern/44086.
"large writes with PUFFS_KFLAG_NOCACHE_PAGE ends up with EIO"
 1.11 31-Jul-2010  pooka Fuzztest puffs mount. There are n different levels of testing:
each one pours more and more sane garbage into the args to that
the mount progresses further and further. Level 8 (at least when
writing this comment) should be the one where mounting actually
succeeds.

Our metric of success is crash / no crash.
 1.10 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.9 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.8 12-Jul-2010  pooka put stuff requiring -lpuffs behind -DPUFFSDUMP
 1.7 11-Jul-2010  pooka WARNS=2
 1.6 11-Jul-2010  pooka Add some basic tests for inactive/reclaim. To make this possible,
adjust the read/write shovel threads so, that we can tap into the
operations between puffs(9) and the file server.
 1.5 07-Jul-2010  pooka Add test cases for file servers which present the root node not as
a directory but as a regular file, symbolic link (although that
can't be unmounted without killing the server!), fifo or character
device.
 1.4 06-Jul-2010  pooka Add the most basic test for puffs(dtfs): mount/unmount. There's
still a lot of work to do here, but I want to get to testbuilding
the tree ;)

TODO examples:
* integrate this with rump_syspuffs (and remove the stupid ``sys'' from there)
* integrate with njoly's fs-independent tests
* cleanup a lot
* write more tests

*sigh*, I wish we'd had testing tools like this 5 years ago when
I was writing puffs. It would have made a lot of things a lot
better and a lot easier.
 1.3 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.2 26-Dec-2007  jmmv branches: 1.2.2;
Install the data files.
 1.1 26-Dec-2007  jmmv Beleatedly add some regression tests for a couple of problems I found in
psshfs and that pooka@ already fixed a while ago. These were rather tricky
to get working.
 1.2.2.2 09-Jan-2008  matt sync with HEAD
 1.2.2.1 26-Dec-2007  matt file Makefile was added on branch matt-armv6 on 2008-01-09 01:59:07 +0000
 1.13.22.1 10-Aug-2014  tls Rebase.
 1.13.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.24.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.3 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 26-Dec-2007  jmmv branches: 1.1.2; 1.1.6;
Beleatedly add some regression tests for a couple of problems I found in
psshfs and that pooka@ already fixed a while ago. These were rather tricky
to get working.
 1.1.6.1 18-May-2008  yamt sync with head.
 1.1.2.2 09-Jan-2008  matt sync with HEAD
 1.1.2.1 26-Dec-2007  matt file h_have_puffs.c was added on branch matt-armv6 on 2008-01-09 01:59:07 +0000
 1.2 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.1 26-Dec-2007  jmmv branches: 1.1.2;
Beleatedly add some regression tests for a couple of problems I found in
psshfs and that pooka@ already fixed a while ago. These were rather tricky
to get working.
 1.1.2.2 09-Jan-2008  matt sync with HEAD
 1.1.2.1 26-Dec-2007  matt file ssh_config.in was added on branch matt-armv6 on 2008-01-09 01:59:08 +0000
 1.2 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.1 26-Dec-2007  jmmv branches: 1.1.2;
Beleatedly add some regression tests for a couple of problems I found in
psshfs and that pooka@ already fixed a while ago. These were rather tricky
to get working.
 1.1.2.2 09-Jan-2008  matt sync with HEAD
 1.1.2.1 26-Dec-2007  matt file ssh_host_key was added on branch matt-armv6 on 2008-01-09 01:59:08 +0000
 1.2 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.1 26-Dec-2007  jmmv branches: 1.1.2;
Beleatedly add some regression tests for a couple of problems I found in
psshfs and that pooka@ already fixed a while ago. These were rather tricky
to get working.
 1.1.2.2 09-Jan-2008  matt sync with HEAD
 1.1.2.1 26-Dec-2007  matt file ssh_host_key.pub was added on branch matt-armv6 on 2008-01-09 01:59:08 +0000
 1.4 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.3 29-Dec-2007  jmmv branches: 1.3.2;
Copy the host key into the work directory and tell the server to use this
instead of the source file, because we need to set strict permissions on it.
Otherwise sshd refuses to start.

Note that we cannot set the permissions of the installed ssh_config_key file
to 400 because unprivileged users could then be unable to run the tests.
 1.2 28-Dec-2007  jmmv Properly capture the output of the SSH server. Its -e flag is supposed to
be used alongside -D, but as this was not documented I thought it was a bug
and "fixed" -e's behavior locally (so I got the correct output before, but
nobody else).

Also, fix a race condition that could cause the SSH server to not be killed
if the pid file was not written before the kill, which might happen on very
fast machines. There still may be a problem when trying to do the connection
if the server has not yet finished initialization...
 1.1 26-Dec-2007  jmmv Beleatedly add some regression tests for a couple of problems I found in
psshfs and that pooka@ already fixed a while ago. These were rather tricky
to get working.
 1.3.2.2 09-Jan-2008  matt sync with HEAD
 1.3.2.1 29-Dec-2007  matt file sshd_config.in was added on branch matt-armv6 on 2008-01-09 01:59:09 +0000
 1.14 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.13 01-Dec-2016  hannken - Change vcache_reclaim() to always call VOP_INACTIVE() before VOP_RECLAIM().
When called from vrecycle() or vgone() there is a window where the refcount
is greater than zero and another thread could get and release a reference
that would miss VOP_INACTIVE() as the refcount doesn't drop to zero.

Adjust test fs/puffs/t_basic: test VOP_INACTIVE count being greater zero.

- Make vrecycle() more robust by checking v_usecount first and preventing
further references across vn_lock(). Fixes a deadlock where one thread
starts unmount, second thread locks a directory and allocates a vnode
and first thread tries to vrecycle() the directory.
First thread holds vfs_busy and wants vnode, second thread holds vnode
and wants vfs_busy.

- With these fixes in place change cleanvnode() to use vget()/vrecycle()
to reclaim the vnode.
 1.12 19-Oct-2013  christos branches: 1.12.8;
fix unused variable warnings
 1.11 04-Apr-2011  plunky branches: 1.11.4; 1.11.10;
reinstate #ifdef PUFFSDUMP around otherwise unused function
which requires symbols from -lpuffs, not linked
 1.10 10-Feb-2011  pooka update /dev/null rump minor to make test pass again
 1.9 15-Nov-2010  pooka branches: 1.9.2;
Add test case for PR kern/44093 (fixed already, but tested to fail
without fix applied).
 1.8 27-Aug-2010  pooka Now that atf issue #53 has been fixed, remove the
child-must-dies-before-parent kludge.
 1.7 30-Jul-2010  pooka Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
 1.6 12-Jul-2010  pooka put stuff requiring -lpuffs behind -DPUFFSDUMP
 1.5 11-Jul-2010  pooka WARNS=2
 1.4 11-Jul-2010  pooka Add some basic tests for inactive/reclaim. To make this possible,
adjust the read/write shovel threads so, that we can tap into the
operations between puffs(9) and the file server.
 1.3 07-Jul-2010  pooka Add test cases for file servers which present the root node not as
a directory but as a regular file, symbolic link (although that
can't be unmounted without killing the server!), fifo or character
device.
 1.2 06-Jul-2010  pooka Call rump_init() only after we have fork&exec'd the file server.
Otherwise the test would on rare occasions hang (I guess this was
due to calling sprintf/close between fork&exec in a threaded
program?).
 1.1 06-Jul-2010  pooka Add the most basic test for puffs(dtfs): mount/unmount. There's
still a lot of work to do here, but I want to get to testbuilding
the tree ;)

TODO examples:
* integrate this with rump_syspuffs (and remove the stupid ``sys'' from there)
* integrate with njoly's fs-independent tests
* cleanup a lot
* write more tests

*sigh*, I wish we'd had testing tools like this 5 years ago when
I was writing puffs. It would have made a lot of things a lot
better and a lot easier.
 1.9.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.11.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.8.2 20-Mar-2017  pgoyette Sync with HEAD
 1.12.8.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.7 16-Sep-2021  andvar fix typos in word "successful".
 1.6 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.5 21-Apr-2012  manu branches: 1.5.14;
Do not set PUFFS_KFLAG_CACHE_FS_TTL for PUFFS tests
 1.4 27-Aug-2010  pooka branches: 1.4.6; 1.4.8;
poll the putter fd instead of doing a blocking read. Long story
short: we don't have to wait for the fs syncer to run for the
close to succeed.
 1.3 16-Aug-2010  pooka Make random garbage more widely available.
 1.2 02-Aug-2010  pooka the old thread which does not return not returning a value
undetectable to all but the sh3 compiler trick
 1.1 31-Jul-2010  pooka Fuzztest puffs mount. There are n different levels of testing:
each one pours more and more sane garbage into the args to that
the mount progresses further and further. Level 8 (at least when
writing this comment) should be the one where mounting actually
succeeds.

Our metric of success is crash / no crash.
 1.4.8.1 23-Apr-2012  riz Pull up following revision(s) (requested by manu in ticket #195):
lib/libskey/skeysubr.c: revision 1.27
lib/libkvm/kvm_getloadavg.c: revision 1.11
lib/libwrap/update.c: revision 1.9
lib/liby/yyerror.c: revision 1.9
lib/libpuffs/puffs_ops.3: revision 1.30
lib/libwrap/misc.c: revision 1.10
lib/libwrap/hosts_access.c: revision 1.20
lib/libpuffs/pnode.c: revision 1.11
lib/libperfuse/subr.c: revision 1.17
lib/libpuffs/pnode.c: revision 1.12
lib/libperfuse/subr.c: revision 1.18
lib/libwrap/options.c: revision 1.15
lib/libwrap/fix_options.c: revision 1.11
lib/libperfuse/ops.c: revision 1.52
lib/libperfuse/ops.c: revision 1.53
lib/libperfuse/ops.c: revision 1.54
lib/libwrap/hosts_ctl.c: revision 1.5
lib/libintl/gettext.c: revision 1.27
lib/libwrap/shell_cmd.c: revision 1.6
lib/libpuffs/dispatcher.c: revision 1.39
lib/libperfuse/perfuse_priv.h: revision 1.27
lib/libwrap/socket.c: revision 1.19
lib/libpuffs/puffs.3: revision 1.50
lib/libperfuse/perfuse_priv.h: revision 1.28
lib/libpuffs/puffs_priv.h: revision 1.45
lib/libpuffs/puffs.3: revision 1.51
lib/libperfuse/perfuse_priv.h: revision 1.29
lib/libwrap/percent_x.c: revision 1.5
lib/libpuffs/puffs.3: revision 1.52
lib/libperfuse/debug.c: revision 1.11
sys/fs/puffs/puffs_vnops.c: revision 1.165
lib/libwrap/tcpd.h: revision 1.13
sys/fs/puffs/puffs_vnops.c: revision 1.166
lib/libwrap/eval.c: revision 1.7
sys/fs/puffs/puffs_msgif.h: revision 1.78
sys/fs/puffs/puffs_vfsops.c: revision 1.101
lib/libwrap/rfc931.c: revision 1.9
lib/libwrap/clean_exit.c: revision 1.5
lib/libpuffs/puffs.h: revision 1.120
lib/libc/stdlib/jemalloc.c: revision 1.27
lib/librmt/rmtlib.c: revision 1.26
lib/libpuffs/puffs.h: revision 1.121
sys/fs/puffs/puffs_sys.h: revision 1.79
lib/librumpclient/rumpclient.c: revision 1.48
lib/libwrap/refuse.c: revision 1.5
lib/libperfuse/perfuse.c: revision 1.26
lib/libperfuse/perfuse.c: revision 1.27
tests/fs/puffs/t_fuzz.c: revision 1.5
lib/libperfuse/perfuse.c: revision 1.28
lib/libpuffs/dispatcher.c: revision 1.40
sys/fs/puffs/puffs_node.c: revision 1.24
lib/libwrap/diag.c: revision 1.9
lib/libintl/textdomain.c: revision 1.13
Use C89 function definition
Add name and atttribute cache with filesytem provided TTL.
lookup, create, mknod, mkdir, symlink, getattr and setattr messages
have been extended so that attributes and their TTL can be provided
by the filesytem. lookup, create, mknod, mkdir, and symlink messages
are also extended so that the filesystem can provide name TTL.
Add PUFFS_KFLAG_CACHE_FS_TTL flag to puffs_init(3) to use name and
attribute cache with filesystem provided TTL.
lookup, create, mknod, mkdir, symlink, getattr and setattr messages
have been extended so that attributes and their TTL can be provided
by the filesytem. lookup, create, mknod, mkdir, and symlink messages
are also extended so that the filesystem can provide name TTL.
The filesystem updates attributes and TTL using
puffs_pn_getvap(3), puffs_pn_getvattl(3), and puffs_pn_getcnttl(3)
Use new PUFFS_KFLAG_CACHE_FS_TTL option to puffs_init(3) so that
FUSE TTL on name and attributes are used. This save many PUFFS
operations and improves performances.
PUFFS_KFLAG_CACHE_FS_TTL is #ifdef'ed in many places for now so that
libperfuse can still be used on netbsd-5.
Split file system.
Comma fixes.
Remove dangling &quot;and&quot;.
Bump date for previous.
- Makesure update_va does not change vnode size when it should not. For
instance when doing a fault-issued VOP_GETPAGES within VOP_WRITE, changing
size leads to panic: genfs_getpages: past eof.
-Handle ticks wrap around for vnode name andattribute timeout
- When using PUFFS_KFLAG_CACHE_FS_TTL, do not use puffs_node to carry
attribute and TTL fora newly created node. Instead extend puffs_newinfo
and add puffs_newinfo_setva() and puffs_newinfo_setttl()
- Remove node_mk_common_final in libperfuse. It used to set uid/gid for
a newly created vnode but has been made redundant along time ago since
uid and gid are properly set in FUSE header.
- In libperfuse, check for corner case where opc = 0 on INACTIVE and RECLAIM
(how is it possible? Check for it to avoid a crash anyway)
- In libperfuse, make sure we unlimit RLIMIT_AS and RLIMIT_DATA so that
we do notrun out of memory because the kernel is lazy at reclaiming vnodes.
- In libperfuse, cleanup style of perfuse_destroy_pn()
Do not set PUFFS_KFLAG_CACHE_FS_TTL for PUFFS tests
 1.4.6.1 23-May-2012  yamt sync with head.
 1.5.14.1 20-Mar-2017  pgoyette Sync with HEAD
 1.2 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.1 12-Nov-2010  pooka branches: 1.1.28;
Add test case for problem described by yamt in PR kern/44086.
"large writes with PUFFS_KFLAG_NOCACHE_PAGE ends up with EIO"
 1.1.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.8 06-Jul-2010  pooka Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
 1.7 05-Jul-2010  jmmv Properly mark some test cases as having a cleanup routine. Stupidity of
the API? Most likely; will revise it.

Fixes atf-run breaking when running t_psshfs. This does not resolve the
underlying issue though, which is atf-run getting confused trying to
unmount the temporary mount point by itself (I think). (I'm now wondering
if atf should be bothering about unmounting stuff at all. Maybe not. It is
a tricky and uncommon thing.)
 1.6 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.5 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.4 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3 29-Dec-2007  jmmv branches: 1.3.2; 1.3.6;
Copy the host key into the work directory and tell the server to use this
instead of the source file, because we need to set strict permissions on it.
Otherwise sshd refuses to start.

Note that we cannot set the permissions of the installed ssh_config_key file
to 400 because unprivileged users could then be unable to run the tests.
 1.2 28-Dec-2007  jmmv Properly capture the output of the SSH server. Its -e flag is supposed to
be used alongside -D, but as this was not documented I thought it was a bug
and "fixed" -e's behavior locally (so I got the correct output before, but
nobody else).

Also, fix a race condition that could cause the SSH server to not be killed
if the pid file was not written before the kill, which might happen on very
fast machines. There still may be a problem when trying to do the connection
if the server has not yet finished initialization...
 1.1 26-Dec-2007  jmmv Beleatedly add some regression tests for a couple of problems I found in
psshfs and that pooka@ already fixed a while ago. These were rather tricky
to get working.
 1.3.6.1 18-May-2008  yamt sync with head.
 1.3.2.2 09-Jan-2008  matt sync with HEAD
 1.3.2.1 29-Dec-2007  matt file t_psshfs.sh was added on branch matt-armv6 on 2008-01-09 01:59:09 +0000
 1.5 23-Jan-2016  christos Define _KERNTYPES for things that need it.
 1.4 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.3 06-Jul-2010  pooka * need TESTSDIR
* remove force-fed -g
 1.2 06-Jul-2010  pooka NO ATFFILE HERE
 1.1 06-Jul-2010  pooka Move the Delectable Test File System from share/examples/puffs/dtfs
to tests/fs/puffs/h_dtfs.

No functional change (apart from adjusting the Makefile for test builds).
 1.2 21-Jul-2010  pooka support pathconf (more or less copypasted from ufs). for njoly's tests.
 1.1 06-Jul-2010  pooka Move the Delectable Test File System from share/examples/puffs/dtfs
to tests/fs/puffs/h_dtfs.

No functional change (apart from adjusting the Makefile for test builds).
 1.2 14-Jul-2010  pooka prevent rename of source directory under itself
 1.1 06-Jul-2010  pooka Move the Delectable Test File System from share/examples/puffs/dtfs
to tests/fs/puffs/h_dtfs.

No functional change (apart from adjusting the Makefile for test builds).
 1.5 16-Sep-2021  andvar fix typos in word "successful".
 1.4 19-Oct-2013  christos fix unused variable warnings
 1.3 01-Mar-2011  pooka branches: 1.3.4; 1.3.10;
Reset node's parent pointer when it's removed. Technically the
parent still exists, but allows us to avoid complicated g/c algorithms
if the parent *is* removed.
 1.2 14-Jul-2010  pooka branches: 1.2.2;
prevent rename of source directory under itself
 1.1 06-Jul-2010  pooka Move the Delectable Test File System from share/examples/puffs/dtfs
to tests/fs/puffs/h_dtfs.

No functional change (apart from adjusting the Makefile for test builds).
 1.2.2.1 05-Mar-2011  bouyer Sync with HEAD
 1.3.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.4 23-Sep-2019  christos Restore binary compatibility by using the statvfs90 structure internally.
 1.3 04-Nov-2012  christos branches: 1.3.30;
add missing includes
 1.2 12-Aug-2010  pooka branches: 1.2.6; 1.2.12;
return correct errno
 1.1 06-Jul-2010  pooka Move the Delectable Test File System from share/examples/puffs/dtfs
to tests/fs/puffs/h_dtfs.

No functional change (apart from adjusting the Makefile for test builds).
 1.2.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.3.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10 19-Oct-2013  christos fix unused variable warnings
 1.9 31-Jan-2012  njoly branches: 1.9.6;
Check directory write access for DELETE operation. And while here,
small indentation adjust.
 1.8 01-Mar-2011  pooka branches: 1.8.4;
Reset node's parent pointer when it's removed. Technically the
parent still exists, but allows us to avoid complicated g/c algorithms
if the parent *is* removed.
 1.7 21-Jul-2010  pooka branches: 1.7.2;
support pathconf (more or less copypasted from ufs). for njoly's tests.
 1.6 14-Jul-2010  pooka Check that nobody raced us into the source dir while it was unlocked
in preparation for rename.
 1.5 14-Jul-2010  pooka Return correct error values from a bunch of questionable renames.

There's no substitute for single-stepping do_sys_rename() into ffs
when trying to figure out what error should come from what layer...
well, at least apart from TNT.
 1.4 14-Jul-2010  pooka * remove target node from right directory
* remove what i guess to be a useless if-clause (although with
file systems you can never be sure)
 1.3 14-Jul-2010  pooka check we don't rename onto a non-empty directory
 1.2 14-Jul-2010  pooka prevent rename of source directory under itself
 1.1 06-Jul-2010  pooka Move the Delectable Test File System from share/examples/puffs/dtfs
to tests/fs/puffs/h_dtfs.

No functional change (apart from adjusting the Makefile for test builds).
 1.7.2.1 05-Mar-2011  bouyer Sync with HEAD
 1.8.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.4.1 17-Apr-2012  yamt sync with head
 1.9.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.6 07-Jun-2010  riz Remove a test (that a created directory had a predictable inode number)
that no longer makes sense since the vmlocking2 branch was merged.
 1.5 07-Apr-2009  pooka add regression test for kern/41128
 1.4 30-Dec-2007  jmmv branches: 1.4.2; 1.4.14;
Re-add the NetBSD CVS Id tag to the header. It just had to be quoted to
be accepted by the parser; i.e. no bug in the code :-)

Note to self: do not try to "fix" stuff the last minute before going to
sleep.
 1.3 29-Dec-2007  jmmv Back out the change to introduce the X-NetBSD-Id header entry. For some
reason the parser does not accept its contents... You know, one should
always test even trivial changes!

Will review this in more depth tomorrow to find the real root cause of the
problem and rule out a fix for ATF.
 1.2 26-Dec-2007  jmmv Add the NetBSD Id tag to the Atffiles. Issue raised by pooka@ a while ago.
 1.1 12-Nov-2007  jmmv Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.4.14.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.4.2.2 09-Jan-2008  matt sync with HEAD
 1.4.2.1 30-Dec-2007  matt file Atffile was added on branch matt-armv6 on 2008-01-09 01:59:10 +0000
 1.7 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.6 07-Jun-2010  riz branches: 1.6.46;
Remove a test (that a created directory had a predictable inode number)
that no longer makes sense since the vmlocking2 branch was merged.
 1.5 26-Apr-2009  pooka Use rump_sys_mount() instead of ukfs_mount(). Just a few more
steps and we can have a switch for if we want to run tests against
a rump kernel or a real kernel.
 1.4 14-Apr-2009  pooka WARNS=4
 1.3 07-Apr-2009  pooka add regression test for kern/41128
 1.2 21-Nov-2007  jmmv branches: 1.2.4; 1.2.16;
Explicitly define TESTSDIR, because the automatic deduction of its value
breaks the build if some component of NETBSDSRCDIR is a symlink. Reported
by drochner@.
 1.1 12-Nov-2007  jmmv Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.2.16.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 21-Nov-2007  matt file Makefile was added on branch matt-armv6 on 2008-01-09 01:59:10 +0000
 1.6.46.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 12-Nov-2007  jmmv branches: 1.1.4;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file README was added on branch matt-armv6 on 2008-01-09 01:59:11 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 17-Mar-2013  jmmv Simplify test_mount and log errors.

If mount_tmpfs fails, show what the stderr output of the command was instead
of failing without details.

While doing this, remove the stupidity to deal with the optional arguments
to the test_mount routine.
 1.4 21-Feb-2011  pooka branches: 1.4.4; 1.4.10;
Skip instead of fail test if tmpfs cannot be mounted and the
error is "Operation not supported".

makes the tmpfs tests produce a sensible result on platforms where
tmpfs is not available (such as the hpc* test runs)
 1.3 19-Jan-2009  jmmv branches: 1.3.4;
Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file h_funcs.subr was added on branch matt-armv6 on 2008-01-09 01:59:11 +0000
 1.3.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.4.10.1 23-Jun-2013  tls resync from head
 1.4.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5 17-Jan-2018  maya - Add inttypes.h #include for PR* macros.
- close fd when done to prevent leak.
- use correct socket length when calling bind(2).

From Ngie Cooper in PR bin/51870
 1.4 11-Jun-2011  christos Turn warns on for all tests and fix all the bugs.
 1.3 15-Jan-2011  martin branches: 1.3.4;
Fix off by one that made most of these tests die with a bus error in the
sparc64 runs.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file h_tools.c was added on branch matt-armv6 on 2008-01-09 01:59:12 +0000
 1.3.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.9 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.8 05-Mar-2011  pooka chown the workdir to unpriv user instead of chmod 711. Otherwise,
if your (root's) login shell is {t,}csh, su -m gets outoutsmarted.
 1.7 09-Nov-2010  jmmv branches: 1.7.2;
Remove ugly workaround to skip this if unprivileged-user=_atf and just use
'su -m' as pooka@ did in t_mkdir.sh. As he says this may still fail if
root's shell is csh; we need a better solution.
 1.6 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.5 07-Jun-2010  riz Use atf_check to su in a couple cases, to make the test failure
easier to understand when the unprivileged user has /sbin/nologin
for a shell.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_create.sh was added on branch matt-armv6 on 2008-01-09 01:59:13 +0000
 1.7.2.1 05-Mar-2011  bouyer Sync with HEAD
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_devices.sh was added on branch matt-armv6 on 2008-01-09 01:59:13 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_dots.sh was added on branch matt-armv6 on 2008-01-09 01:59:13 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_exec.sh was added on branch matt-armv6 on 2008-01-09 01:59:14 +0000
 1.5 07-Jun-2010  riz Remove a test (that a created directory had a predictable inode number)
that no longer makes sense since the vmlocking2 branch was merged.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_id_gen.sh was added on branch matt-armv6 on 2008-01-09 01:59:14 +0000
 1.7 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.6 30-Oct-2021  hannken With the recent "centralize vnode kevent handling" kevent(2) no
longer raises NOTE_LINK when removing a hard linked node.

It now behaves as FreeBSD and raises NOTE_DELETE.

Adapt the test to the new behaviour.
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_link.sh was added on branch matt-armv6 on 2008-01-09 01:59:15 +0000
 1.9 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.8 05-Mar-2011  pooka chown the workdir to unpriv user instead of chmod 711. Otherwise,
if your (root's) login shell is {t,}csh, su -m gets outoutsmarted.
 1.7 08-Nov-2010  pooka branches: 1.7.2;
Use su -m since _atf has nologin as its shell.
XXX: this will still fail if root's shell is csh
 1.6 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.5 07-Jun-2010  riz Use atf_check to su in a couple cases, to make the test failure
easier to understand when the unprivileged user has /sbin/nologin
for a shell.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_mkdir.sh was added on branch matt-armv6 on 2008-01-09 01:59:16 +0000
 1.7.2.1 05-Mar-2011  bouyer Sync with HEAD
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_mknod.sh was added on branch matt-armv6 on 2008-01-09 01:59:16 +0000
 1.7 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.6 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.5 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.4 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.3 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.2 13-Feb-2008  jmmv branches: 1.2.4;
Add tests for rillig@'s recent fix to mount_tmpfs: ensure that error messages
do not mention the source path, which is unused.
 1.1 12-Nov-2007  jmmv branches: 1.1.4;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.4.3 23-Mar-2008  matt sync with HEAD
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_mount.sh was added on branch matt-armv6 on 2008-01-09 01:59:17 +0000
 1.2.4.1 18-May-2008  yamt sync with head.
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_pipes.sh was added on branch matt-armv6 on 2008-01-09 01:59:18 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_read_write.sh was added on branch matt-armv6 on 2008-01-09 01:59:18 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_readdir.sh was added on branch matt-armv6 on 2008-01-09 01:59:19 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_remove.sh was added on branch matt-armv6 on 2008-01-09 01:59:20 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_rename.sh was added on branch matt-armv6 on 2008-01-09 01:59:20 +0000
 1.15 26-Jun-2020  jruoho Reference PRs consistently.
 1.14 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.13 18-Aug-2011  riastradh branches: 1.13.24;
No more xfail for PR kern/36681.
 1.12 04-Jan-2011  pooka win wunused
 1.11 04-Jan-2011  pooka Remove arch check now that rump smp is available on all host archs.
 1.10 02-Jan-2011  pooka + rump_lwproc_newproc -> rump_lwproc_rfork()
+ add a tess for rump_lwproc_rfork()
 1.9 01-Sep-2010  pooka update to new rump lwp/proc interfaces
 1.8 14-Jul-2010  pooka Convert "The Original" rename race test from to vfs and retire the
ffs/tmpfs versions. The only difference is that the origamical
one mounted ffs with MNT_LOG (and therein actually lay the bug).
 1.7 04-Jul-2010  pooka Add a test case for PR kern/36681 demonstrating how easy it is to
get tmpfs rename to "tstile".

Note1: triggering this on any non-SMP system is not as easy (because
one system call tends to run from start to finish in one go) and
therefore I've limited it to i386 and amd64. Incidentally, I'm
still waiting for the eternally elusive MI CPU_INFO_FOREACH (or at
least something else than a stupid macro) ...

Note2: this is a "race condition" test. I tested it on my development
host and in qemu and it triggers pretty instantly. But YMMV.
 1.6 26-Apr-2009  pooka branches: 1.6.2;
Use rump_sys_mount() instead of ukfs_mount(). Just a few more
steps and we can have a switch for if we want to run tests against
a rump kernel or a real kernel.
 1.5 14-Apr-2009  pooka Add atf_tc_fail_errno(), which appends strerror(errno) to the
message string. Adding it to h_macros suggested by jmmv
 1.4 08-Apr-2009  pooka * convert to KNF
* pass WARNS
 1.3 08-Apr-2009  pooka atf_tc_fail() instead of err()
 1.2 08-Apr-2009  pooka make test duration bound by time instead of by number of rounds
 1.1 07-Apr-2009  pooka add regression test for kern/41128
 1.6.2.2 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.6.2.1 26-Apr-2009  jym file t_renamerace.c was added on branch jym-xensuspend on 2009-05-13 19:19:23 +0000
 1.13.24.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_rmdir.sh was added on branch matt-armv6 on 2008-01-09 01:59:21 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_setattr.sh was added on branch matt-armv6 on 2008-01-09 01:59:21 +0000
 1.7 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.6 17-Jan-2018  maya Use sysctl -n rather than parse the output.

From Ngie Cooper in PR bin/51870
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_sizes.sh was added on branch matt-armv6 on 2008-01-09 01:59:22 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_sockets.sh was added on branch matt-armv6 on 2008-01-09 01:59:22 +0000
 1.5 17-Jan-2018  maya Use sysctl -n rather than parse the output.

From Ngie Cooper in PR bin/51870
 1.4 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.3 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_statvfs.sh was added on branch matt-armv6 on 2008-01-09 01:59:22 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_symlink.sh was added on branch matt-armv6 on 2008-01-09 01:59:23 +0000
 1.8 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.7 04-Apr-2024  christos Better output handling (des at FreeBSD)
 1.6 17-Jun-2021  riastradh tests/fs/tmpfs: Print bad values on failure for diagnosis.
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_times.sh was added on branch matt-armv6 on 2008-01-09 01:59:23 +0000
 1.6 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_trail_slash.sh was added on branch matt-armv6 on 2008-01-09 01:59:24 +0000
 1.5 07-Jan-2025  andvar s/Trunctaing/Truncating/ in echo message.
 1.4 07-Nov-2010  jmmv branches: 1.4.58;
Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.3 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_truncate.sh was added on branch matt-armv6 on 2008-01-09 01:59:24 +0000
 1.4.58.1 02-Aug-2025  perseant Sync with HEAD
 1.16 19-Apr-2025  rin tests: Skip vnd(4)-based tests on vax for now

in order to avoid kernel crash described in PR port-vax/59287
 1.15 21-Mar-2025  christos Add a label because on sun a sunlabel with all zeros has no partitions.
 1.14 28-Apr-2024  rillig branches: 1.14.2;
tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.13 04-Apr-2024  christos make this work again
 1.12 30-Nov-2022  martin Avoid explicitly naming the raw part device with a partition letter - use
the non-partition letter variant instead.
 1.11 05-Jun-2021  gson Use the correct pathname when cleaning up the inner mount on test
failure. Fixes the ATF crash reported in PR bin/56221, but not
the issue causing the test to fail in the first place.
 1.10 23-Mar-2017  martin branches: 1.10.20;
Do not assume anything about the pseudo-disklabel of a completely zeroed
disk image. Use the raw partition and newfs -I instead.
 1.9 29-Jul-2016  pgoyette branches: 1.9.2;
Update the test - the "official" name of the vnd configuration utility
was changed in NetBSD 7 to vndconfig(8).
 1.8 21-Apr-2011  haad branches: 1.8.26;
Workaround problem with qemu where jot 100 produce garbage otput like this

93
94
:+
:,
:-
:.
:/
100

This can't be used as name of file, change jot cmd to work in all cases.
 1.7 24-Mar-2011  jmmv Prevent failures from cleanup routines. Do so by only attempting to do the
cleanup if the test case did not succeed (as, when it succeeds, the cleanup
has already happened).
 1.6 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.5 05-Jul-2010  jmmv Properly mark some test cases as having a cleanup routine. Stupidity of
the API? Most likely; will revise it.

Fixes atf-run breaking when running t_psshfs. This does not resolve the
underlying issue though, which is atf-run getting confused trying to
unmount the temporary mount point by itself (I think). (I'm now wondering
if atf should be bothering about unmounting stuff at all. Maybe not. It is
a tricky and uncommon thing.)
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_vnd.sh was added on branch matt-armv6 on 2008-01-09 01:59:25 +0000
 1.8.26.2 26-Apr-2017  pgoyette Sync with HEAD
 1.8.26.1 06-Aug-2016  pgoyette Sync with HEAD
 1.9.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.10.20.1 06-Jun-2021  cjep sync with head
 1.14.2.1 02-Aug-2025  perseant Sync with HEAD
 1.8 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.7 17-Jan-2018  maya Use sysctl -n rather than parse the output.

From Ngie Cooper in PR bin/51870
 1.6 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.5 05-Jul-2010  jmmv Properly mark some test cases as having a cleanup routine. Stupidity of
the API? Most likely; will revise it.

Fixes atf-run breaking when running t_psshfs. This does not resolve the
underlying issue though, which is atf-run getting confused trying to
unmount the temporary mount point by itself (I think). (I'm now wondering
if atf should be bothering about unmounting stuff at all. Maybe not. It is
a tricky and uncommon thing.)
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 19-Jan-2009  jmmv Adjust tests to work with the new API in ATF 0.6.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 12-Nov-2007  jmmv branches: 1.1.4; 1.1.8;
Convert the regress/sys/fs/tmpfs tests to the atf

This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf. As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
 1.1.8.1 18-May-2008  yamt sync with head.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 12-Nov-2007  matt file t_vnode_leak.sh was added on branch matt-armv6 on 2008-01-09 01:59:25 +0000
 1.3 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.2 31-Mar-2010  njoly Use tp-glob keys when requesting for test pattern.
 1.1 30-Mar-2010  pooka Add basic test for umapfs functionality.

XXX: the reverse mapping case (last subsubtest in t_basic) does
not make any sense, but apparently that how umapfs works. I'm not
familiar enough with the code to determine if this is a wanted
feature or a pure and simple bug.
 1.5 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.4 10-Jun-2014  he branches: 1.4.24;
Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.
 1.3 11-Apr-2010  pooka branches: 1.3.12; 1.3.22;
Following nullfs, rename rumpfs_umapfs to rumpfs_umap to make the
basename the same as the kernel module (this too was in-tree only
for a little over a week with the old name).
 1.2 30-Mar-2010  pooka anti-pasto
 1.1 30-Mar-2010  pooka Add basic test for umapfs functionality.

XXX: the reverse mapping case (last subsubtest in t_basic) does
not make any sense, but apparently that how umapfs works. I'm not
familiar enough with the code to determine if this is a wanted
feature or a pure and simple bug.
 1.3.22.1 10-Aug-2014  tls Rebase.
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.24.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6 09-Jul-2019  maya return return atf_no_error() instead of 0 for consistency.

suggested by moritzbuhl in https://github.com/NetBSD/src/pull/11/
 1.5 13-Jan-2017  christos branches: 1.5.14;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.4 19-Jul-2010  pooka branches: 1.4.28;
convert to newstyle automagic rump compat syscalls
 1.3 31-May-2010  pooka Now that atf gdb/coredump conflicts have been solved (thanks jmmv!),
remove USE_ATF ifdefs.
 1.2 30-May-2010  dholland Requires <sys/param.h>.
 1.1 30-Mar-2010  pooka Add basic test for umapfs functionality.

XXX: the reverse mapping case (last subsubtest in t_basic) does
not make any sense, but apparently that how umapfs works. I'm not
familiar enough with the code to determine if this is a wanted
feature or a pure and simple bug.
 1.4.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.5.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.2 31-Mar-2010  njoly Use tp-glob keys when requesting for test pattern.
 1.1 29-Mar-2010  pooka Add basic union test.
 1.5 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.4 10-Jun-2014  he branches: 1.4.24;
Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.
 1.3 12-Jan-2011  pooka branches: 1.3.12; 1.3.22;
Move basic unionfs test from fs/union to fs/vfs and make it test
all whiteout-supporting file systems with the file system in question
as the upper layer. Also, add an unlink to the test to see if
whiteouts are really working.

ffslog_basic is the test case for PR kern/44377
 1.2 29-Jun-2010  pooka xfail test for problem described in PR kern/23986
 1.1 29-Mar-2010  pooka Add basic union test.
 1.3.22.1 10-Aug-2014  tls Rebase.
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.24.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7 12-Jan-2011  pooka Move basic unionfs test from fs/union to fs/vfs and make it test
all whiteout-supporting file systems with the file system in question
as the upper layer. Also, add an unlink to the test to see if
whiteouts are really working.

ffslog_basic is the test case for PR kern/44377
 1.6 12-Jan-2011  pooka Simplify test: there's no reason to mount 2x ffs.
 1.5 07-Nov-2010  jmmv Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.4 04-Jun-2010  jmmv atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
 1.3 31-May-2010  pooka Now that atf gdb/coredump conflicts have been solved (thanks jmmv!),
remove USE_ATF ifdefs.
 1.2 01-May-2010  pooka fix !USE_ATF case
 1.1 29-Mar-2010  pooka Add basic union test.
 1.14 13-Apr-2025  riastradh tests/fs/union/t_pr: Add another screw case.

PR kern/1677: union FS can return bogus value for lookup of `.',
causing later panic
 1.13 16-Jul-2019  martin branches: 1.13.12;
PR misc/54382: whenever open(2) is called with O_CREAT, make sure to
pass an open mode argument.
 1.12 14-Apr-2017  riastradh branches: 1.12.12;
Gotta mark crashes on signal separately from failures...
 1.11 12-Apr-2017  riastradh Mark expected failures as such.

Not exactly sure how the PRs correspond -- please fix if this is wrong!
 1.10 26-Mar-2017  maya Add failing test cases for PRs kern/2423, kern/3645, kern/4597
 1.9 13-Jan-2017  christos branches: 1.9.2;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.8 10-Aug-2011  hannken branches: 1.8.24;
For devices, sockets and fifos ignore setting the file size to zero to make
open(..., O_TRUNC) happy and allow them to write through the lower layer.

Fixes PR #43560 (writing to null device in unionfs fails)
 1.7 03-Jul-2010  pooka Improve previous a bit more: now it works correctly in all cases
with or without xfail.

There is still room for improvement, though: with xfail the
errno != EROFS branch does not report why open failed.
 1.6 03-Jul-2010  pooka enhance fail check
 1.5 03-Jul-2010  pooka Remove ufs mount where not necessary due to rumpfs now supporting
VOP_WHITEOUT.
 1.4 03-Jul-2010  pooka Add xfail tests for two cases described in PR kern/43560.
 1.3 03-Jul-2010  jmmv Replace custom xfail settings with the new expected failure support in
atf 0.10.
 1.2 30-Jun-2010  hannken Test no longer fails with rev. 1.62 of src/sys/fs/union/union_vfsops.c.
 1.1 29-Jun-2010  pooka xfail test for problem described in PR kern/23986
 1.8.24.2 26-Apr-2017  pgoyette Sync with HEAD
 1.8.24.1 20-Mar-2017  pgoyette Sync with HEAD
 1.9.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.12.12.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.13.12.1 02-Aug-2025  perseant Sync with HEAD
 1.3 13-Jul-2010  jmmv Get rid of static Atffiles and let bsd.test.mk generate them on the fly.
 1.2 13-Jul-2010  pooka Add basic tests for vfsops.

tfilehandle is a test for PR kern/43605
 1.1 05-Jul-2010  njoly Add test program that use sample code from kern/41937, and fs rump
helpers to check currently supported filesystems.

t_rmdirrace (1/1): 5 test cases
ext2fs_race: Passed.
ffs_race: Passed.
msdosfs_race: Passed.
sysvbfs_race: Passed.
tmpfs_race: Passed.
 1.30 06-Jun-2022  nia branches: 1.30.4;
build system: Revert all the recent additions of MK[...] knobs that
allow conditionally disabling the building of certain user space
programs in the 'base' set.

There is not enough consensus that this is the right way and a few
people had strong objections, see source-changes-d@.
 1.29 27-May-2022  nia mk: Add a MKLFS flag for excluding the log-structured filesystem userspace
tools from the build.
 1.28 28-Mar-2022  christos Add a test for hardlink sysctl limiting.
 1.27 02-Mar-2020  christos zfs needs rumpkern_sysproxy
 1.26 01-Mar-2020  christos Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
 1.25 19-Nov-2017  martin branches: 1.25.4;
ATF test program for PR kern/52738: check for mtime updates after rewriting
a file.
 1.24 02-Feb-2017  martin PR kern/51762: add a test program
 1.23 27-Jan-2017  hannken Add test for read/write to readonly update mount.
 1.22 27-Aug-2016  christos branches: 1.22.2;
Fix static linking.
 1.21 13-Aug-2016  christos order network libraries properly.
 1.20 07-Jan-2015  pooka branches: 1.20.2;
Move sysproxy support into a separate component, rumpkern_sysproxy,
instead of it being always provided by the rump kernel base. This
move accomplishes two things:

1) it is no longer necessary to provide sysproxy hypercall stubs for
platforms which do not want to use sysproxy
2) it is easier to reason about the security aspects, since configurations
not linking the sysproxy component simply do not support remote
system calls

discussed on rumpkernel-users
 1.19 28-Jun-2013  reinoud Add the rumpfs_udf to the LDADD variable
 1.18 31-Aug-2012  pooka branches: 1.18.2;
Hook ZFS tests to MKZFS instead of a homegrown variable.
 1.17 20-Aug-2012  pooka Add a vfstest zfs attachment. This is a compile-time option,
default off, due the large numbers of failing tests (some of them
look like quite trivial failures).
 1.16 11-Aug-2011  uch branches: 1.16.2;
add ATF tests for v7fs. patch by njoly@. thank you.
 1.15 12-Jan-2011  pooka Move basic unionfs test from fs/union to fs/vfs and make it test
all whiteout-supporting file systems with the file system in question
as the upper layer. Also, add an unlink to the test to see if
whiteouts are really working.

ffslog_basic is the test case for PR kern/44377
 1.14 06-Jan-2011  njoly Start unprivileged filesystem tests. For now, only chown/chmod owner
checks.
 1.13 31-Dec-2010  pooka Add some elementary tests for r/o file systems. More in 2011!
 1.12 23-Sep-2010  he Reorder the library specifications, so that we don't depend on the
library dependencies recorded in shared libraries, allowing these
to be linked statically as well.
 1.11 19-Aug-2010  pooka Start adding some I/O tests. This one does a sparse write to the
second page on a file, then writes the first, and finally checks
it can read something expected. Adapted the from program supplied
by yamt in PR kern/36429.
 1.10 17-Aug-2010  pooka Add test which fills up the file system and expects ENOSPC.
 1.9 26-Jul-2010  pooka need to link in nfs client bits
 1.8 19-Jul-2010  pooka Need to use the ${PRINTOBJDIR} trick for LIBISPRIVATE ...
 1.7 19-Jul-2010  pooka Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
 1.6 14-Jul-2010  pooka Convert "The Original" rename race test from to vfs and retire the
ffs/tmpfs versions. The only difference is that the origamical
one mounted ffs with MNT_LOG (and therein actually lay the bug).
 1.5 13-Jul-2010  pooka Add a few simple basic-level tests for vnodeops. They don't cover
corner-cases, but make sure things at least superficially work
(which they always don't). More to come...
 1.4 13-Jul-2010  pooka Link in puffs components for puffs tests.
 1.3 13-Jul-2010  pooka Add basic tests for vfsops.

tfilehandle is a test for PR kern/43605
 1.2 08-Jul-2010  pooka Add LFS to vfs test list. TODO: start cleanerd too.

It fails in a number of different ways. Some of them seem to appear
as a function of the file system size (i'm not sure if it's because
the lack of the cleaner or not. i'm guessing ``no'', though).

ok njoly
 1.1 05-Jul-2010  njoly Add test program that use sample code from kern/41937, and fs rump
helpers to check currently supported filesystems.

t_rmdirrace (1/1): 5 test cases
ext2fs_race: Passed.
ffs_race: Passed.
msdosfs_race: Passed.
sysvbfs_race: Passed.
tmpfs_race: Passed.
 1.16.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.2.1 30-Oct-2012  yamt sync with head
 1.18.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.22.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.25.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.30.4.2 12-Aug-2024  perseant Add exFAT conditions to vfs tests
 1.30.4.1 02-Aug-2024  perseant Add t_newfs to test compatibility of newfs, fsck and dumpfs utilities.
 1.11 16-Jul-2019  martin PR misc/54382: whenever open(2) is called with O_CREAT, make sure to
pass an open mode argument.
 1.10 30-Nov-2018  hannken Skip zfs, it does not GOP_ALLOC.

PR kern/47656 test zfs_fillfs.
 1.9 13-Jan-2017  christos branches: 1.9.12; 1.9.14;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.8 16-Mar-2013  jmmv branches: 1.8.12;
Mark a bunch of routinely-broken ZFS tests as expected failures. Point
them at PR kern/47656.
 1.7 17-Mar-2011  jmmv branches: 1.7.4; 1.7.10;
Remove hack introduced in revision 1.6 to workaround a bug in atf-run that
would cause it to lock up while waiting for the p2k_ffs_fillfs test case
to complete (in some cases only).

This has been fixed by the upstream revision
3dd2481ec97b2fde76521939b6451d03ce989745 which I have just pulled into
our copy of atf.
 1.6 06-Mar-2011  pooka Add a kludge to prevent a test run from completely hanging.
Some analysis:

1) p2k_ffs test program opens a socketpair and forks off rump_ffs
2) after mounting the file system, test program decides it
wants to skip the test and exits
3) somehow, the puffs event thread of rump_ffs stays in kqueue
waiting for activity. fstat+gdb suggests it's waiting for the
now-orphaned socketpair (but I didn't fully verify. is there
an easy way to dump the state of a kqueue descriptor?).
4) test program is a zombie
5) atf-run waits forever

Note: this doesn't trigger always.

So, it seems there are at least two bugs: 1) test case doesn't
timeout 2) the kevent call in rump_ffs never returns even though
the sockerpair is orphaned

So, explicitly unmount the file system before skipping the test.
Obviously the above bugs needs to be properly fixed, since other
skipping test cases can unbeknowingly trigger the issue.
 1.5 07-Jan-2011  pooka P2K_FFS uses puffs and therefore does not GOP_ALLOC either
 1.4 11-Nov-2010  pooka skip tests which use features which rumpfs does not support
(namely: vop_rename and a file system size limit)
 1.3 28-Aug-2010  wiz Use explanation for GOP_ALLOC in message from version 1.1.
Ok pooka@.
 1.2 27-Aug-2010  pooka Skip the full test for puffs now that we can (yes, atf issue #53)
 1.1 17-Aug-2010  pooka Add test which fills up the file system and expects ENOSPC.
 1.7.10.1 23-Jun-2013  tls resync from head
 1.7.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.12.1 20-Mar-2017  pgoyette Sync with HEAD
 1.9.14.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.14.1 10-Jun-2019  christos Sync with HEAD
 1.9.12.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.19 16-Jul-2019  christos fix misplaced paren
 1.18 16-Jul-2019  martin PR misc/54382: whenever open(2) is called with O_CREAT, make sure to
pass an open mode argument.
 1.17 13-Jan-2017  christos branches: 1.17.14;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.16 04-Apr-2015  riastradh branches: 1.16.2;
Fix remaining read(fd, NULL, 1) cases.
 1.15 28-Mar-2015  riastradh Let I/O errors override inode update errors in UFS.

Fixes tests/fs/vfs/t_io:read_fault for UFS.
 1.14 28-Mar-2015  riastradh This doesn't affect p2k_ffs after all, no idea why yet.
 1.13 28-Mar-2015  riastradh Test that read fails with EFAULT even if O_SYNC|O_RSYNC are set.
 1.12 04-Aug-2013  pooka tests for i/o-after-unlink
 1.11 12-Jun-2013  pooka Fix the test for rumpfs on amd64 by adding a creation mode to open().
thanks to gson for the prod.
 1.10 20-Mar-2012  njoly branches: 1.10.2;
Remove unneeded atf_tc_expect_pass calls.
 1.9 20-Mar-2012  jruoho Remove xfail.
 1.8 27-Feb-2011  njoly branches: 1.8.4;
Add a small testcase that shrink a file using 2 consecutive ftruncate
calls.
 1.7 02-Feb-2011  pooka add a few overwrite-related tests
 1.6 03-Jan-2011  pooka branches: 1.6.2;
Give this a chance of working on non-4kB pagesize.
from martin's sparc64 test run
 1.5 01-Jan-2011  pooka Guess-fix a signed vs. unsigned compiler warning report by pgoyette
(it doesn't trigger in my src working copy for whatever reason).
 1.4 01-Jan-2011  pooka fill in number of PR kern/44307
 1.3 01-Jan-2011  pooka Check that extending a file grows its size (with and without O_APPEND).
 1.2 11-Nov-2010  pooka use atf interfaces for error reportage
 1.1 19-Aug-2010  pooka Start adding some I/O tests. This one does a sparse write to the
second page on a file, then writes the first, and finally checks
it can read something expected. Adapted the from program supplied
by yamt in PR kern/36429.
 1.6.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.6.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.8.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.4.1 17-Apr-2012  yamt sync with head
 1.10.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.2.1 23-Jun-2013  tls resync from head
 1.16.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.17.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5 30-Mar-2022  christos branches: 1.5.4;
remove zfs from the exception list; it now works like the other fs's.
 1.4 30-Mar-2022  christos update copyright.
 1.3 30-Mar-2022  christos skip userlevel filesystems that have their own rules (they depend on the
system setting of the sysctl on NetBSD) and zfs because it implements its
own rules for hardlinks to files (does its own permission checks).
 1.2 29-Mar-2022  christos ignore EOPNOTSUPP errors for fs's that don't support hard links.
 1.1 28-Mar-2022  christos Add a test for hardlink sysctl limiting.
 1.5.4.1 12-Aug-2024  perseant Add exFAT conditions to vfs tests
 1.1 02-Feb-2017  martin branches: 1.1.2; 1.1.4;
PR kern/51762: add a test program
 1.1.4.2 21-Apr-2017  bouyer Sync with HEAD
 1.1.4.1 02-Feb-2017  bouyer file t_mtime_otrunc.c was added on branch bouyer-socketcan on 2017-04-21 16:54:10 +0000
 1.1.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.1.2.1 02-Feb-2017  pgoyette file t_mtime_otrunc.c was added on branch pgoyette-localcount on 2017-03-20 06:57:57 +0000
 1.1 19-Nov-2017  martin ATF test program for PR kern/52738: check for mtime updates after rewriting
a file.
 1.44 31-Jan-2022  ryo Extend the time to wait for the thread to quit.

It seems that alarm(1) is not enough time for the thread to actually exit after quittingtime = 1.
It randomly failed with "Test program received signal 14" on a slow environment.
 1.43 27-Nov-2021  gson Force failure of the nfs_renamerace_cycle, p2k_ffs_renamerace_cycle,
and puffs_renamerace_cycle test cases as they fail only randomly or
only on some systems.
 1.42 23-Oct-2021  hannken After converting msdosfs_rename() to use genfs_sane_rename() the
MSDOS tests should pass.

Tested on QEMU/nvmm archs i386 and amd64.

Should resolve PR kern/43626 (directory renaming more than a little racy)
 1.41 16-Jun-2021  riastradh tests/fs/vfs: Mark udf_renamerace_cycle flaky, PR kern/56253.
 1.40 05-Sep-2020  riastradh Revert "ufs: Prevent mkdir from choking on deleted directories."

This change made no sense and should not have been committed.
 1.39 05-Sep-2020  riastradh ufs: Prevent mkdir from choking on deleted directories.

Fix some missing uvm_vnp_setsize in screw cases while here.
 1.38 05-Sep-2020  riastradh genfs_rename: Fix deadlocks in cross-directory cyclic rename.

Reproducer:

A: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
rmdir("c/d/e"); rmdir("c/d"); }
B: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
rename("c", "c/d/e"); }
C: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
rename("c/d/e", "c"); }

Deadlock:

- A holds c and wants to lock d; and either
- B holds . and d and wants to lock c, or
- C holds . and d and wants to lock c.

The problem with these is that genfs_rename_enter_separate in B or C
tried lock order .->d->c->e (in A/B, fdvp->tdvp->fvp->tvp; in A/C,
tdvp->fdvp->tvp->fvp) which violates the ancestor->descendant order
.->c->d->e.

The resolution is to change B to do fdvp->fvp->tdvp->tvp and C to do
tdvp->tvp->fdvp->fvp. But there's an edge case: tvp and fvp might be
the same (hard links), and we can't detect that until after we've
looked them both up -- and in some file systems (I'm looking at you,
ufs), there is no mere lookup operation, only lookup-and-lock, so we
can't even hold the lock on one of tvp or fvp when we look up the
other one if there's a chance they might be the same.

Fortunately the cases
(a) tvp = fvp
(b) tvp or fvp is a directory
are mutually exclusive as long as directories cannot be hard-linked.
In case (a) we can just defer locking {tvp, fvp} until the end, because
it can't possibly have {fdvp or fvp, tdvp or tvp} as descendants. In
case (b) we can just lock them in the order fdvp->fvp->tdvp->tvp or
tdvp->tvp->fdvp->fvp if the first one of {fvp, tvp} is a directory,
because it can't possibly coincide with the second one of {fvp, tvp}.

With this change, we can now prove that the locking order is consistent
with the ancestor->descendant partial ordering. Where two nodes are
incommensurate under that partial ordering, they are only ever locked
by rename and there is only ever one rename at a time.

Proof:

- For same-directory renames, genfs_rename_enter_common locks the
directory first and then the children. The order
directory->child[i] is consistent with ancestor->descendant and
child[0]/child[1] are incommensurate.

- For cross-directory renames:

. While a rename is in progress and the fs-wide rename lock is held,
directories can be created or removed but not changed, so the
outcome of gro_genealogy -- which, given fdvp and tdvp, returns
the node N relating fdvp/N/.../tdvp or null if there is none --
can only transition from finding N to not finding N, if one of
the directories is removed while any of the vnodes are unlocked.
Merely creating directories cannot change the ancestry of tdvp,
and concurrent renames are not possible.

Thus, if a gro_genealogy determined the operation to have the
form fdvp/N/.../tdvp, then it might cease to have that form, but
only because tdvp was removed which will harmlessly cause the
rename to fail later on. Similarly, if gro_genealogy determined
the operation _not_ to have the form fdvp/N/.../tdvp then it
can't begin to have that form until after the rename has
completed.

The lock order is,

=> for fdvp/.../tdvp:
1. lock fdvp
2. lookup(/lock/unlock) fvp (consistent with fdvp->fvp)
3. lock fvp if a directory (consistent with fdvp->fvp)
4. lock tdvp (consistent with fdvp->tdvp and possibly fvp->tdvp)
5. lookup(/lock/unlock) tvp (consistent with tdvp->tvp)
6. lock fvp if a nondirectory (fvp->t* or fvp->fdvp is impossible)
7. lock tvp if not fvp (tvp->f* is impossible unless tvp=fvp)

=> for incommensurate fdvp & tdvp, or for tdvp/.../fdvp:
1. lock tdvp
2. lookup(/lock/unlock) tvp (consistent with tdvp->tvp)
3. lock tvp if a directory (consistent with tdvp->tvp)
4. lock fdvp (either incommensurate with tdvp and/or tvp, or
consistent with tdvp(->tvp)->fdvp)
5. lookup(/lock/unlock) fvp (consistent with fdvp->fvp)
6. lock tvp if a nondirectory (tvp->f* or tvp->tdvp is impossible)
7. lock fvp if not tvp (fvp->t* is impossible unless fvp=tvp)

Deadlocks found by hannken@; resolution worked out with dholland@.

XXX I think we could improve concurrency somewhat -- with a likely
big win for applications like tar and rsync that create many files
with temporary names and then rename them to the permanent one in the
same directory -- by making vfs_renamelock a reader/writer lock: any
number of same-directory renames, or exactly one cross-directory
rename, at any one time.
 1.37 05-Sep-2020  riastradh tests/fs/vfs/t_renamerace: Test a screw case hannken@ found.
 1.36 17-Aug-2019  gson The udf_renamerace test case no longer fails due to PR kern/49046, but
it does fail due to PR kern/53865 on real hardware.
 1.35 13-Jan-2019  gson branches: 1.35.2;
Mark the fs/vfs/t_renamerace:udf_renamerace_dirs test case as an
expected failure referencing PR kern/53865, and force failure to avoid
reports of unexpected success as it does not realiably fail under
qemu. This makes the treatment of udf_renamerace_dirs the same as
that of udf_renamerace, only with a different PR. Also, make
whitespace consistent between the two.
 1.34 13-Jan-2017  christos branches: 1.34.12; 1.34.14;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.33 04-May-2016  dholland branches: 1.33.2;
Cite a relevant PR for msdos_renamerace instead of one that was fixed
several years ago.
 1.32 29-Jul-2014  gson Mark the udf_renamerace test case (but not udf_renamerace_dirs) as an
expected failure again, now with a reference to PR kern/49046.
Since the test only fails part of the time, force failure to
avoid failure reports reports due to unexpected success.
 1.31 25-Jul-2014  pgoyette Remove atf_tc_expect_fail() calls for udf file-system. These tests are
currently passing. As discussed on current-users. Any new failures
should be reported via send-pr.
 1.30 09-Jan-2014  hannken branches: 1.30.2;
Operation sysvbfs_remove() destructs inodes attached to active vnodes.
Defer the destruction to sysvbfs_reclaim().

Disable test t_renamerace:sysvbfs_renamerace as it will exhaust the
inode table (sysvbfs has space for 8 inodes only).

Ok: Izumi Tsutsui <tsutsui@netbsd.org>
 1.29 10-Jul-2013  reinoud Update test cases for UDF now udf_rename() uses the genfs_rename framework
 1.28 08-Jul-2013  reinoud Cover the last failing UDF test cases with a reference to PR kern/47986, i.e.
all rename's fail until UDF switches over to the new rename framework solving
the locking mechanism.
 1.27 17-Mar-2013  jmmv Fix the t_renamerace:lfs_renamerace_dirs test on fast machines.

This test was failing on my machine when run natively but not causing any
problems when run within qemu, and the failure was "mkdir: No space left
on device".

My understanding of the issue is that this test overflowed the temporary
disk image due to its high rate of file churn and the lfs_cleanerd not
being able to keep up. Note that this test is capped by time, not number
of operations, so this is why the problem does not show up in a slow
emulated system.

To fix this, just bump the test file system image limit a little bit.
(I tried increasing the frequency at which lfs_cleanerd does its thing,
but it wasn't enough.)
 1.26 09-May-2012  riastradh branches: 1.26.2;
Adjust t_renamerace now that ext2fs and ffs have good rename.
 1.25 16-Feb-2012  perseant Pass t_renamerace and t_rmdirrace tests.

Adapt dholland@'s fix to ufs_rename to fix PR kern/43582. Address several
other MP locking issues discovered during the course of investigating the
same problem.

Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.

Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).
 1.24 08-Oct-2011  njoly branches: 1.24.2; 1.24.4;
Slightly adjust skipped messages, makes output more consistent.
 1.23 18-Jul-2011  dholland ffs and ffslog are no longer xfail.
 1.22 14-Mar-2011  pooka Apparently this way of triggering the msdosfs rename vnode leak
does not bite every time (most commonly observed on the amd64/qemu
runs), so add a race condition catcher.
 1.21 06-Mar-2011  pooka Add a race catcher for p2k_ffs renamerace -- it seems like the
problem doesn't trigger always especially in a qemu env (but triggers
100% of the time on my desktop).
 1.20 03-Mar-2011  pooka The re-enabled renamerace test also triggers the recent msdosfs
vnode leak. xfail this under the blanket of PR kern/44661.
 1.19 03-Mar-2011  pooka Apparently my last commit to msdosfs_vnops.c fixed the (harmless?)
buffer overrun in rename (>15 years old bug), so re-enable other
msdosfs rename tests too.
 1.18 11-Jan-2011  pooka branches: 1.18.2;
need unrace-catcher for ffslog
 1.17 07-Jan-2011  pooka xfail PR kern/44336
 1.16 07-Jan-2011  pooka ffs -o log dies in renamerace_dirs just like the rest.
 1.15 02-Jan-2011  pooka + rump_lwproc_newproc -> rump_lwproc_rfork()
+ add a tess for rump_lwproc_rfork()
 1.14 11-Nov-2010  pooka skip tests which use features which rumpfs does not support
(namely: vop_rename and a file system size limit)
 1.13 01-Nov-2010  pooka Create the process we use later in the test. Otherwise cwd doesn't
go right and the test fails because of attempting to create files
in the wrong directory.
 1.12 01-Sep-2010  pooka update to new rump lwp/proc interfaces
 1.11 26-Aug-2010  pooka chdir() once per process is enough, no need to do it for every
thread (and doing so would cause occasional failures when some
thread would cd out of the test mountpoint while another thread
was still running in there).
 1.10 26-Aug-2010  pooka Put the workaround for PR kern/43799 into the common nfs unmount routine.
 1.9 25-Aug-2010  pooka Start many more threads for the renamerace since it seems to catch
more errors.

Add a sleepkludge to deal with NFS's sillyrename brokenness.
 1.8 16-Jul-2010  pooka Some of the msdosfs tests are killed by SSP due to stack limit
being exceeded. I cannot figure out what is going on by code
reading, nor repeat this either on my desktop or in qemu, so skip
those tests for msdosfs until I can get to the bottom of it.
 1.7 16-Jul-2010  pooka skip directory test on sysvbfs
 1.6 16-Jul-2010  pooka Fix typo in comment. comment tested by wizd.
 1.5 16-Jul-2010  pooka Fill in PR kern/43626 now that it exists.
 1.4 16-Jul-2010  pooka Do the famous renamerace test using directories. Uh oh, bad idea.
PR coming soon.
 1.3 16-Jul-2010  pooka This test does not always fail for LFS, so apply same kludge as
elsewhere while waiting for atf to grow support for these cases.
 1.2 14-Jul-2010  pooka xfail test on lfs. It goes badaboom faster than you can find your
multipass. Borrow PR kern/43582 used earlier for rmdirrace, as it
looks pretty much like the same problem.
 1.1 14-Jul-2010  pooka Convert "The Original" rename race test from to vfs and retire the
ffs/tmpfs versions. The only difference is that the origamical
one mounted ffs with MNT_LOG (and therein actually lay the bug).
 1.18.2.1 05-Mar-2011  bouyer Sync with HEAD
 1.24.4.1 17-Mar-2012  bouyer Pull up following revision(s) (requested by perseant in ticket #116):
sys/ufs/lfs/lfs_alloc.c: revision 1.112
tests/fs/vfs/t_rmdirrace.c: revision 1.9
tests/fs/vfs/t_renamerace.c: revision 1.25
sys/ufs/lfs/lfs_vnops.c: revision 1.240
sys/ufs/lfs/lfs_segment.c: revision 1.224
sys/ufs/lfs/lfs_bio.c: revision 1.122
sys/ufs/lfs/lfs_vfsops.c: revision 1.294
sbin/newfs_lfs/make_lfs.c: revision 1.19
sys/ufs/lfs/lfs.h: revision 1.136
Pass t_renamerace and t_rmdirrace tests.
Adapt dholland@'s fix to ufs_rename to fix PR kern/43582. Address several
other MP locking issues discovered during the course of investigating the
same problem.
Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.
Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).
 1.24.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.24.2.2 23-May-2012  yamt sync with head.
 1.24.2.1 17-Apr-2012  yamt sync with head
 1.26.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.2.1 23-Jun-2013  tls resync from head
 1.30.2.1 10-Aug-2014  tls Rebase.
 1.33.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.34.14.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.34.14.1 10-Jun-2019  christos Sync with HEAD
 1.34.12.1 18-Jan-2019  pgoyette Synch with HEAD
 1.35.2.1 13-Sep-2020  martin Pull up following revision(s) (requested by riastradh in ticket #1083):

sys/miscfs/genfs/genfs_rename.c: revision 1.5
tests/fs/vfs/t_renamerace.c: revision 1.37
tests/fs/vfs/t_renamerace.c: revision 1.38

tests/fs/vfs/t_renamerace: Test a screw case hannken@ found.

genfs_rename: Fix deadlocks in cross-directory cyclic rename.

Reproducer:
A: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
rmdir("c/d/e"); rmdir("c/d"); }
B: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
rename("c", "c/d/e"); }
C: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
rename("c/d/e", "c"); }

Deadlock:
- A holds c and wants to lock d; and either
- B holds . and d and wants to lock c, or
- C holds . and d and wants to lock c.

The problem with these is that genfs_rename_enter_separate in B or C
tried lock order .->d->c->e (in A/B, fdvp->tdvp->fvp->tvp; in A/C,
tdvp->fdvp->tvp->fvp) which violates the ancestor->descendant order
.->c->d->e.

The resolution is to change B to do fdvp->fvp->tdvp->tvp and C to do
tdvp->tvp->fdvp->fvp. But there's an edge case: tvp and fvp might be
the same (hard links), and we can't detect that until after we've
looked them both up -- and in some file systems (I'm looking at you,
ufs), there is no mere lookup operation, only lookup-and-lock, so we
can't even hold the lock on one of tvp or fvp when we look up the
other one if there's a chance they might be the same.

Fortunately the cases
(a) tvp = fvp
(b) tvp or fvp is a directory
are mutually exclusive as long as directories cannot be hard-linked.

In case (a) we can just defer locking {tvp, fvp} until the end, because
it can't possibly have {fdvp or fvp, tdvp or tvp} as descendants. In
case (b) we can just lock them in the order fdvp->fvp->tdvp->tvp or
tdvp->tvp->fdvp->fvp if the first one of {fvp, tvp} is a directory,
because it can't possibly coincide with the second one of {fvp, tvp}.

With this change, we can now prove that the locking order is consistent
with the ancestor->descendant partial ordering. Where two nodes are
incommensurate under that partial ordering, they are only ever locked
by rename and there is only ever one rename at a time.

Proof:
- For same-directory renames, genfs_rename_enter_common locks the
directory first and then the children. The order
directory->child[i] is consistent with ancestor->descendant and
child[0]/child[1] are incommensurate.
- For cross-directory renames:
. While a rename is in progress and the fs-wide rename lock is held,
directories can be created or removed but not changed, so the
outcome of gro_genealogy -- which, given fdvp and tdvp, returns
the node N relating fdvp/N/.../tdvp or null if there is none --
can only transition from finding N to not finding N, if one of
the directories is removed while any of the vnodes are unlocked.
Merely creating directories cannot change the ancestry of tdvp,
and concurrent renames are not possible.
Thus, if a gro_genealogy determined the operation to have the
form fdvp/N/.../tdvp, then it might cease to have that form, but
only because tdvp was removed which will harmlessly cause the
rename to fail later on. Similarly, if gro_genealogy determined
the operation _not_ to have the form fdvp/N/.../tdvp then it
can't begin to have that form until after the rename has
completed.
The lock order is,
=> for fdvp/.../tdvp:
1. lock fdvp
2. lookup(/lock/unlock) fvp (consistent with fdvp->fvp)
3. lock fvp if a directory (consistent with fdvp->fvp)
4. lock tdvp (consistent with fdvp->tdvp and possibly fvp->tdvp)
5. lookup(/lock/unlock) tvp (consistent with tdvp->tvp)
6. lock fvp if a nondirectory (fvp->t* or fvp->fdvp is impossible)
7. lock tvp if not fvp (tvp->f* is impossible unless tvp=fvp)
=> for incommensurate fdvp & tdvp, or for tdvp/.../fdvp:
1. lock tdvp
2. lookup(/lock/unlock) tvp (consistent with tdvp->tvp)
3. lock tvp if a directory (consistent with tdvp->tvp)
4. lock fdvp (either incommensurate with tdvp and/or tvp, or
consistent with tdvp(->tvp)->fdvp)
5. lookup(/lock/unlock) fvp (consistent with fdvp->fvp)
6. lock tvp if a nondirectory (tvp->f* or tvp->tdvp is impossible)
7. lock fvp if not tvp (fvp->t* is impossible unless fvp=tvp)

Deadlocks found by hannken@; resolution worked out with dholland@.

XXX I think we could improve concurrency somewhat -- with a likely
big win for applications like tar and rsync that create many files
with temporary names and then rename them to the permanent one in the
same directory -- by making vfs_renamelock a reader/writer lock: any
number of same-directory renames, or exactly one cross-directory
rename, at any one time.
 1.9 16-Feb-2012  perseant Pass t_renamerace and t_rmdirrace tests.

Adapt dholland@'s fix to ufs_rename to fix PR kern/43582. Address several
other MP locking issues discovered during the course of investigating the
same problem.

Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.

Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).
 1.8 08-Oct-2011  njoly branches: 1.8.2; 1.8.4;
Slightly adjust skipped messages, makes output more consistent.
 1.7 19-Jul-2010  pooka add missing headers
 1.6 13-Jul-2010  pooka Make the FSTYPE macros take tc instead of derivative type "type".

ok njoly
 1.5 12-Jul-2010  njoly Pass down the test case data to the test function, to be able to use
meta-data informations such as srcdir. Requested by pooka.

While here remove fstype argument, and define it as a custom meta-data
(X-fs.type) instead.
 1.4 09-Jul-2010  njoly Get rid of home made filesystem type strings and use MOUNT_xxx ones
instead. While here provide some macros which do test for a specific
type.
 1.3 09-Jul-2010  njoly Pass down the filesystem type to the test funtion to allow fs-specific
callpoints.

Adjust t_rmdirrace by moving LFS test specific code from common/lfs.c,
and do skip sysvbfs which does not support rmdir(2).

from pooka.
 1.2 05-Jul-2010  njoly Fix copyright, noted by Jukka Ruohonen.
 1.1 05-Jul-2010  njoly Add test program that use sample code from kern/41937, and fs rump
helpers to check currently supported filesystems.

t_rmdirrace (1/1): 5 test cases
ext2fs_race: Passed.
ffs_race: Passed.
msdosfs_race: Passed.
sysvbfs_race: Passed.
tmpfs_race: Passed.
 1.8.4.1 17-Mar-2012  bouyer Pull up following revision(s) (requested by perseant in ticket #116):
sys/ufs/lfs/lfs_alloc.c: revision 1.112
tests/fs/vfs/t_rmdirrace.c: revision 1.9
tests/fs/vfs/t_renamerace.c: revision 1.25
sys/ufs/lfs/lfs_vnops.c: revision 1.240
sys/ufs/lfs/lfs_segment.c: revision 1.224
sys/ufs/lfs/lfs_bio.c: revision 1.122
sys/ufs/lfs/lfs_vfsops.c: revision 1.294
sbin/newfs_lfs/make_lfs.c: revision 1.19
sys/ufs/lfs/lfs.h: revision 1.136
Pass t_renamerace and t_rmdirrace tests.
Adapt dholland@'s fix to ufs_rename to fix PR kern/43582. Address several
other MP locking issues discovered during the course of investigating the
same problem.
Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.
Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).
 1.8.2.1 17-Apr-2012  yamt sync with head
 1.8 21-Sep-2019  kre branches: 1.8.10;

Initialise the sometvs array of struct timeval that is to be used to
validate that utimes() cannot update the times of a file on a read only
filesystem. The values are never actually used, but since
src/sys/kern/vfs_syscalls.c 1.535
they are validated for sanity, and the syscall returns EINVAL if the
values passed are invalid (tv_usec <0 or >= 1000000). If that happens
we don't get as far as the test which produces the EROFS that is expected
from this test (these tests - one for each filesystem type).

So, init the timeval structs (just to 0, the values will still not be
used) so that the EINVAL doesn't bite us before we're eaten by the EROFS
which is the way we're supposed to die.

If the syscall API args were labelled as "const" the compiler probably
would have caught the use of uninit'd vars and complained much sooner.
 1.7 16-Jul-2019  martin PR misc/54382: whenever open(2) is called with O_CREAT, make sure to
pass an open mode argument.
 1.6 13-Jan-2017  christos branches: 1.6.14;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.5 22-Feb-2011  yamt branches: 1.5.26;
add some tests
 1.4 31-Jan-2011  njoly Now that PR/44302 is fixed, fs/vfs/t_ro:sysvbfs_rmfile should not fail
anymore.
 1.3 07-Jan-2011  pooka branches: 1.3.2;
expect correct errno in nfsro case. from yamt
 1.2 31-Dec-2010  pooka fill in PR kern/44302
 1.1 31-Dec-2010  pooka Add some elementary tests for r/o file systems. More in 2011!
 1.3.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.3.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.5.26.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.10.1 12-Aug-2024  perseant Add exFAT conditions to vfs tests
 1.2 14-May-2020  msaitoh Remove extra semicolon.
 1.1 27-Jan-2017  hannken branches: 1.1.2; 1.1.4;
Add test for read/write to readonly update mount.
 1.1.4.2 21-Apr-2017  bouyer Sync with HEAD
 1.1.4.1 27-Jan-2017  bouyer file t_rwtoro.c was added on branch bouyer-socketcan on 2017-04-21 16:54:10 +0000
 1.1.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.1.2.1 27-Jan-2017  pgoyette file t_rwtoro.c was added on branch pgoyette-localcount on 2017-03-20 06:57:57 +0000
 1.9 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.8 07-Aug-2011  hannken branches: 1.8.24;
Change union rmdir semantics to fail directory removal for
non-empty directories like all other file systems do.

Change test accordingly.
 1.7 05-Aug-2011  hannken When union_lookup() creates a shadow directory and nameiop is not LOOKUP
it has to restart the lookup to get the componentname right.

Fixes PR #44383 (an endless stream of whiteout and opaque dir problems ...)
 1.6 03-Aug-2011  hannken Make whiteouts work on journaling ffs file system by adding the missing
UFS_WAPBL_BEGIN() / UFS_WAPBL_END() around CREATE and DELETE ops.

Fixes PR #44377 (union whiteouts don't work on ffs -o log)
 1.5 13-Jan-2011  pooka xfail PR kern/44383: whiteouts are generally speaking kaput
 1.4 13-Jan-2011  pooka Add a test case for a r/o lower layer which attempts to create some
whiteouts and opaque dirs in the upper layer. The sad news is this
simple test fails across the board. It's pretty hard to figure
out how unionfs should work in $fs given that even the simplest
things don't work with ffs.
 1.3 12-Jan-2011  pooka xfail for PR kern/44377
 1.2 12-Jan-2011  pooka Instead of hardcoding fs list just try to mount union and skip all
file systems which return EOPNOTSUPP.
 1.1 12-Jan-2011  pooka Move basic unionfs test from fs/union to fs/vfs and make it test
all whiteout-supporting file systems with the file system in question
as the upper layer. Also, add an unlink to the test to see if
whiteouts are really working.

ffslog_basic is the test case for PR kern/44377
 1.8.24.1 20-Mar-2017  pgoyette Sync with HEAD
 1.16 28-Nov-2018  hannken branches: 1.16.12;
Redo the access check for setting va_flags in zfs_netbsd_setattr().

Use user flag UF_NODUMP instead of UF_IMMUTABLE for the test as it
is the only user flag supported by all tested file systems.

PR kern/47656 test zfs_flags.
 1.15 28-Nov-2018  hannken Add missing access check for REMOVE into zfs_netbsd_lookup().

PR kern/47656 test zfs_dirperms.
 1.14 28-Nov-2018  hannken Add missing access check for setting va_Xtime into zfs_netbsd_setattr().

PR kern/47656 test zfs_times.
 1.13 13-Jan-2017  christos branches: 1.13.12; 1.13.14;
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.12 09-Apr-2015  riastradh branches: 1.12.2;
Apparently I fixed t_unpriv:zfs_owner and didn't notice.
 1.11 29-Aug-2014  gson Don't pass an uninitialized variable as the times[] argument of
rump_sys_utimes(). Instead, pass combinations of values representing
edge cases: the farthest possible past, the epoch, and the farthest
possible future. Now the excessive runtime reported in PR bin/49144
occurs reliably, on multiple architectures, and not only with udf, but
also with msdosfs.
 1.10 16-Mar-2013  jmmv Mark a bunch of routinely-broken ZFS tests as expected failures. Point
them at PR kern/47656.
 1.9 04-Apr-2012  njoly branches: 1.9.2;
New testcase that check file flags with unprivileged credentials.
 1.8 26-Mar-2012  njoly Now that permissions for msdos have been fixed, kill times() special
case which was wrong.
 1.7 23-Mar-2012  njoly Extend times testcase to check for non null time values too.
 1.6 15-Mar-2012  njoly Add another testcase that check setting file times with unprivileged
credentials.
 1.5 09-Feb-2012  njoly Add a testcase which checks that directory permissions are honored for
file creation/deletion with unprivileged credentials.

releng ok.
 1.4 31-Jan-2012  njoly owner testcase now succeed with rumpfs.
 1.3 27-Jan-2012  njoly unpriv owner test now pass for sysvbfs.
 1.2 08-Oct-2011  njoly branches: 1.2.2;
USE_OWNER -> USES_OWNER for consistency with other macros.
 1.1 06-Jan-2011  njoly Start unprivileged filesystem tests. For now, only chown/chmod owner
checks.
 1.2.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.1 17-Apr-2012  yamt sync with head
 1.9.2.1 23-Jun-2013  tls resync from head
 1.12.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.13.14.1 10-Jun-2019  christos Sync with HEAD
 1.13.12.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.16.12.2 02-Aug-2025  perseant Sync with HEAD
 1.16.12.1 12-Aug-2024  perseant Add exFAT conditions to vfs tests
 1.13 01-Nov-2025  perseant Create a new LFS inode flag, IN_DEAD, to indicate that a file's last
reference, other than those that come with VU_DIROP or IN_CLEANING and
the one the caller holds, has been dropped. Check and apply this flag
in lfs_orphan(), and call lfs_orphan() on close if the link count is
zero. Change the signature of lfs_orphan to facilitate.

Make test t_vfsops:lfs_tfhremove expect success.

Closes PR kern/43745.
 1.12 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.11 04-Apr-2011  hannken branches: 1.11.26;
Msdosfs on-disk meta data is not sufficient to create or validate file handles.

Maintain a tree of file handles, create nodes from msdosfs_vptofh() and keep
them until either the file gets unlinked or the file system gets unmounted.

Fixes the msdosfs part of PR #43745 (fhopen of an unlinked file causes problems
on multiple file systems)
 1.10 02-Apr-2011  hannken Fix file handle operations for tmpfs by removing a now bogus test and
fixing the return value of tmpfs_fhtovp() in the not-found case.

When vmlocking2 was merged to head (Jan 2008 !!) the inode numbering was
changed. Before inodes were numbered 2..tm_nodes_max-1 and after the
merge the numbers are derived from the nodes memory address.

Fixes PR #43605 (tmpfs file handles are broken)
 1.9 07-Jan-2011  pooka use X-fs.mntname for f_fstypename. ignore p2k_ffs there.
 1.8 19-Nov-2010  pooka Convert skipped tests into proper xfails (a lazy bum is me).

prompted by pgoyette
 1.7 16-Aug-2010  pooka Add a test case which tries to fhopen() a file handle filled with
random garbage.
 1.6 12-Aug-2010  pooka Fill in PR kern/43745 now that it exists.

lfs_tfhremove: Expected failure: fhopen() for removed file succeeds (PR kern/43745): t_vfsops.c:161: Expected true value in rump_sys_fhopen(fhp, fhsize, O_RDONLY) == -1
msdosfs_tfhremove: Expected failure: fhopen() for removed file succeeds (PR kern/43745): t_vfsops.c:161: Expected true value in rump_sys_fhopen(fhp, fhsize, O_RDONLY) == -1
 1.5 12-Aug-2010  pooka Add test case for fhopenining a removed file. This fails on msdosfs
and lfs and causes a kernel panic on nfs. I'll fix nfs soon and
file a PR for the other two.

Also panicked ffs a few hours ago, but was fixed by hannken.
Needless to say, this test was inspired by his fix.
 1.4 19-Jul-2010  pooka add missing headers
 1.3 16-Jul-2010  njoly Add some sanity checks for statvfs values.
 1.2 13-Jul-2010  pooka make compile on HEAD
 1.1 13-Jul-2010  pooka Add basic tests for vfsops.

tfilehandle is a test for PR kern/43605
 1.11.26.1 20-Mar-2017  pgoyette Sync with HEAD
 1.63 08-May-2023  andvar branches: 1.63.2;
fix the grammar in comments reported by Jim Spath in misc/57397.
 1.62 01-Feb-2022  martin Test mkdir(2) with one or more trailing slashes - this currently fails
for v7fs.
 1.61 16-Sep-2021  andvar fix typos in word "successfully", mainly s/succesfully/successfully/.
 1.60 19-Aug-2021  andvar s/memry/memory+s/softare/software/+s/grapics/graphics+s/ouput/output
 1.59 13-Jan-2017  christos Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
 1.58 29-Aug-2016  kre PR kern/49033

POSIX allows for the atime (or technically, any of the times) to be
updated as a side effect of searching a directory (allows, not requires).
The NetBSD UDF implementation apparently works that way, treating a
directory search as a read of the directory, and hence updating the
access time. Compensate for that in the test (rather than just
expecting failure) by verifying that the atime after the directory
search is within a small margin of the atime before the search
(currently, "small" is 1 second). We could fetch the time before
the mkdir and both stat() calls, do all of that, fetch the time after,
subtract, and require the after stat() atime to be bounded by the atime
set by the original mkdir and returned in the first stat() and that time
+ the difference in elapsed time - that would be more accurate, but is
a lot more work for little real benefit.

Should anyone be interested in doing that extra work, remember to use
monotonic time (clock_gettime(CLOCK_MOMNOTONIC, ...)) not the time of day
clock for measuring the elapsed time.

Along with this, remove the "if (udf) failure expected" and the
if (udf && we haven't failed yet) fail("random failure failed to happen")
stuff... (the "random" would have been that sometimes the mkdir and
two lookups (stat() calls) would all occur within the same clock tick,
meaning that the atimes would all be the same. Other times the clock
would tick somewhere between the mkdir() and the 2nd stat().)
 1.57 21-Aug-2016  christos fix wrong variable.
 1.56 20-Aug-2016  christos - use snprintf
- print the argument that caused the error
 1.55 28-Jan-2016  martin branches: 1.55.2;
The test for PR 50608 works now, remove the expected failure.
 1.54 14-Jan-2016  gson Don't use a filename with an embedded newline in the create_many test
case. Instead, add a separate test case "create_nonalphanum" for
filenames containing non-alphanumeric characters. The bug of
PR kern/50608 now causes a failure in create_nonalphanum rather than
create_many.
 1.53 13-Jan-2016  pooka create_many: remove PR kern/50607 xfail

Seems to have been fixed by ext2fs_lookup.c 1.79
(thanks, riastradh)
 1.52 02-Jan-2016  pooka create_many:
* add xfails for ext2 and udf
* don't try to create a subdirectory for sysvbfs
 1.51 01-Jan-2016  pooka use a shorter filename template in previous (for v7fs)
 1.50 01-Jan-2016  pooka Add a test which creates many directory entries.
 1.49 09-Apr-2015  riastradh Advisory locking for zfs.
 1.48 09-Apr-2015  riastradh Fix vattr_init_mask: mode is mode_t, not u_short.

Fixes fs/vfs/t_vnops:zfs_attrs test.
 1.47 09-Apr-2015  riastradh Tests claim rename(..., "x/.") yields EISDIR, so do that. Fixes zfs.
 1.46 09-Apr-2015  riastradh Fix return code of rmdir(nonempty) in zfs: ENOTEMPTY, not EEXIST.
 1.45 24-Mar-2015  riastradh Make this run in NetBSD 6 by using st_mtimespec instead of st_mtim.

st_mtimespec is our traditional nonstandard name for what POSIX
called st_mtim in 2008, but these aren't going to run in non-NetBSD
anyway so using the nonstandard name shouldn't be an issue.
 1.44 29-Dec-2014  hannken Test v7fs_lstat_symlink is no longer expected to fail.
 1.43 09-Sep-2014  gson Mark v7fs_lstat_symlink as an expected failure, referencing PR kern/48864.
 1.42 07-Sep-2014  gson Add a test of symlinks with long targets.
 1.41 12-Aug-2014  gson Mark udf_lookup_complex as an expected failure, referencing PR kern/49033.
Since it does not fail reliably, force it to fail to avoid spurious failure
reports due to unexpected success.
 1.40 25-Jul-2014  martin branches: 1.40.2;
PR kern/49033: try to provide better diagnostics if the udf_lookup_complex
test randomly fails.
 1.39 03-Jun-2014  njoly Add testcase that check lstat(2) values for symbolic links (PR
kern/48864).
 1.38 19-Oct-2013  christos branches: 1.38.2;
fix unused variable warnings
 1.37 28-Jul-2013  njoly Check that rename(2) with NULL arguments fail with EFAULT.
 1.36 10-Jul-2013  reinoud Update test cases for UDF now udf_rename() uses the genfs_rename framework
 1.35 08-Jul-2013  reinoud Cover the last failing UDF test cases with a reference to PR kern/47986, i.e.
all rename's fail until UDF switches over to the new rename framework solving
the locking mechanism.
 1.34 16-Mar-2013  jmmv Mark a bunch of routinely-broken ZFS tests as expected failures. Point
them at PR kern/47656.
 1.33 20-Mar-2012  njoly branches: 1.33.2;
Remove unneeded atf_tc_expect_pass calls.
 1.32 19-Mar-2012  pgoyette Finish removing the block of commented-out code from rev 1.31

Hello, christos!
 1.31 18-Mar-2012  christos annotate fixed failures as comments.
 1.30 12-Dec-2011  njoly Start making fs read(2) fail with EISDIR if the implementation does
not allow read on directories (kernfs, rumpfs, ptyfs and sysvbfs).
Adjust man page accordingly, and add a small corresponding vfs
testcase.
 1.29 08-Oct-2011  njoly branches: 1.29.2;
Slightly adjust skipped messages, makes output more consistent.
 1.28 19-Aug-2011  riastradh Add test for `ln -s / foo && cd foo'.
 1.27 11-Aug-2011  uch add ATF tests for v7fs. patch by njoly@. thank you.
 1.26 23-Jul-2011  alnsn Don't assume that "first lock that blocks" is a lock with the lowest
start offset and change the test to work when F_GETLK returns any
lock that blocks.
 1.25 20-Jul-2011  hannken Even though msdosfs never truncates file names it advertises _PC_NO_TRUNC
as zero. Make it advertise one (no_trunc == true).

Names longer than NAME_MAX (255) will never pass namei() btw.

Fixes PR #43670 (msdosfs claims support for filenames longer than {NAME_MAX},
but fails)
 1.24 30-May-2011  martin Remove "expected failure" for tmpfs PRs that are now fixed.
 1.23 01-Apr-2011  hannken Make zero length symlinks work on tmpfs.

Fixes PR #43843 (tmpfs dies with kassert panic for 0 length symlink target)
 1.22 19-Mar-2011  hannken Remove a vnode reference leak from msdosfs_rename. Release tdvp if either
doscheckpath() or relookup() fails.

Adjust test fs/vfs/t_vnops.c and remove the link count test for msdos.

Fixes PR #44661
 1.21 03-Mar-2011  pooka Apparently my last commit to msdosfs_vnops.c fixed the (harmless?)
buffer overrun in rename (>15 years old bug), so re-enable other
msdosfs rename tests too.
 1.20 01-Mar-2011  pooka msdosfs xfail for PR kern/44661
 1.19 01-Mar-2011  pooka xfail dir_rmdirdotdot for tmpfs (PR kern/44657)
 1.18 01-Mar-2011  pooka Rmdir the dir you're in and its parent and try to cd ..
Fails on tmpfs (crash), puffs (cd .. succeeds) and rumpfs (cd .. succeeds).

another testcase derived from the bugfinding genious of Taylor R Campbell
 1.17 01-Mar-2011  pooka Comment out msdosfs skip -- i'm not sure if it will still fail with
the "stack size" problem, but at least it fails due to yet another
refcounting snafu in the msdosfs rename method.
 1.16 01-Mar-2011  pooka augment rename test case with the failure from PR kern/44288
 1.15 28-Feb-2011  pooka Add simple test case for access(2), including panicky scenario from
PR kern/44648.
 1.14 22-Feb-2011  yamt add some tests
 1.13 31-Jan-2011  pooka Add test case for F_GETLK pid-oddness from PR kern/44494.

I found the test case a little difficult to understand (because of
many indices), so I added a few more comments after I think I
figured out what was going on.
 1.12 11-Jan-2011  kefren branches: 1.12.2;
add test for kern/43321, blessed by pooka@
 1.11 04-Jan-2011  pooka Check that file attributes can be changed (where applicable).
 1.10 11-Nov-2010  pooka skip tests which use features which rumpfs does not support
(namely: vop_rename and a file system size limit)
 1.9 09-Sep-2010  njoly s/dirs/symlinks/ in USES_SYMLINKS message.
 1.8 06-Sep-2010  pooka fill in PR number: kern/43843
 1.7 06-Sep-2010  pooka symlink to a zero-len target (and watch tmpfs go kabloom)
 1.6 01-Aug-2010  mlelstv The erroneous error codes described in kern/43616 have been fixed.
 1.5 26-Jul-2010  njoly Add create and rename testcases to exercize filenames longer than
{NAME_MAX}.
 1.4 19-Jul-2010  pooka convert to newstyle automagic rump compat syscalls
 1.3 16-Jul-2010  pooka Some of the msdosfs tests are killed by SSP due to stack limit
being exceeded. I cannot figure out what is going on by code
reading, nor repeat this either on my desktop or in qemu, so skip
those tests for msdosfs until I can get to the bottom of it.
 1.2 14-Jul-2010  pooka Add an assortment of rename tests. Not complete, but at least tests
something.

This contains the tests for PR kern/43616 and PR kern/43617.
 1.1 13-Jul-2010  pooka Add a few simple basic-level tests for vnodeops. They don't cover
corner-cases, but make sure things at least superficially work
(which they always don't). More to come...
 1.12.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.12.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.29.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.2.1 17-Apr-2012  yamt sync with head
 1.33.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.33.2.1 23-Jun-2013  tls resync from head
 1.38.2.1 10-Aug-2014  tls Rebase.
 1.40.2.1 17-Jan-2015  martin Pull up following revision(s) (requested by gson in ticket #424):
tests/fs/vfs/t_vnops.c: revision 1.41
Mark udf_lookup_complex as an expected failure, referencing PR kern/49033.
Since it does not fail reliably, force it to fail to avoid spurious failure
reports due to unexpected success.
 1.55.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.63.2.2 14-Aug-2024  perseant Note exFAT also does not permit hard links
 1.63.2.1 12-Aug-2024  perseant Add exFAT conditions to vfs tests
 1.1 10-Mar-2011  pooka Add one simple test case which checks that zpool create results in
a mounted file system. Then run away as quickly as possible.
 1.6 15-Mar-2020  martin Skip tests when we know there is not enough space available
 1.5 11-Jun-2019  hannken Need rumpdev_disk for rumpfs_zfs.
 1.4 16-Dec-2018  hannken Have to hijack sysctl() and modctl() for zfs commands.

Should fix PR kern/53422
 1.3 06-Dec-2011  njoly branches: 1.3.38; 1.3.40;
Remove expected failure now that PR/44708 is fixed.
 1.2 19-Sep-2011  jruoho branches: 1.2.2;
Point to PR misc/44708 when failing. XXX: Remove once the test is fixed.
 1.1 10-Mar-2011  pooka Add one simple test case which checks that zpool create results in
a mounted file system. Then run away as quickly as possible.
 1.2.2.1 17-Apr-2012  yamt sync with head
 1.3.40.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.40.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.3.40.1 10-Jun-2019  christos Sync with HEAD
 1.3.38.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts

RSS XML Feed