summaryrefslogtreecommitdiff
path: root/tests/fs
AgeCommit message (Collapse)Author
2023-06-03bsd.own.mk: rename GCC_NO_* to CC_WNO_*lukem
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.
2023-05-28Add RUMPHIJACK option "blanket=/DEV" so mount_ffs may canonicalisehannken
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.
2023-05-08fix the grammar in comments reported by Jim Spath in misc/57397.andvar
2022-11-30Avoid explicitly naming the raw part device with a partition letter - usemartin
the non-partition letter variant instead.
2022-11-17Restore backward compatibility of UFS2 with previous NetBSD releases bychs
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).
2022-06-06build system: Revert all the recent additions of MK[...] knobs thatnia
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@.
2022-05-27mk: Add a MKLFS flag for excluding the log-structured filesystem userspacenia
tools from the build.
2022-03-30remove zfs from the exception list; it now works like the other fs's.christos
2022-03-30update copyright.christos
2022-03-30skip userlevel filesystems that have their own rules (they depend on thechristos
system setting of the sysctl on NetBSD) and zfs because it implements its own rules for hardlinks to files (does its own permission checks).
2022-03-29ignore EOPNOTSUPP errors for fs's that don't support hard links.christos
2022-03-28Add a test for hardlink sysctl limiting.christos
2022-02-01Test mkdir(2) with one or more trailing slashes - this currently failsmartin
for v7fs.
2022-01-31Extend the time to wait for the thread to quit.ryo
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.
2021-12-05s/shapshot/snapshot/msaitoh
2021-11-27Force failure of the nfs_renamerace_cycle, p2k_ffs_renamerace_cycle,gson
and puffs_renamerace_cycle test cases as they fail only randomly or only on some systems.
2021-10-30With the recent "centralize vnode kevent handling" kevent(2) nohannken
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.
2021-10-23After converting msdosfs_rename() to use genfs_sane_rename() thehannken
MSDOS tests should pass. Tested on QEMU/nvmm archs i386 and amd64. Should resolve PR kern/43626 (directory renaming more than a little racy)
2021-09-19fix various typos in comments, messages and documentation.andvar
2021-09-16fix typos in word "successful".andvar
2021-09-16fix typos in word "successfully", mainly s/succesfully/successfully/.andvar
2021-08-20fix various typos in comments and log messages.andvar
2021-08-19s/memry/memory+s/softare/software/+s/grapics/graphics+s/ouput/outputandvar
2021-06-17tests/fs/tmpfs: Print bad values on failure for diagnosis.riastradh
2021-06-16tests/fs/vfs: Mark udf_renamerace_cycle flaky, PR kern/56253.riastradh
2021-06-05Use the correct pathname when cleaning up the inner mount on testgson
failure. Fixes the ATF crash reported in PR bin/56221, but not the issue causing the test to fail in the first place.
2021-06-04Test "mountdhup" has to pass now.hannken
2021-03-07Add blocklist support to libwrap which enables all programs using libwrapchristos
to block access from hosts we deny. (libwrap support from Greg A. Woods)
2020-09-07remove GCC_NO_ADDR_OF_PACKED_MEMBER for several subdir buildsmrg
that are now handled by lfs_accessors.h internally.
2020-09-07avoid new GCC 9 warnings.mrg
2020-09-05Revert "ufs: Prevent mkdir from choking on deleted directories."riastradh
This change made no sense and should not have been committed.
2020-09-05ufs: Prevent mkdir from choking on deleted directories.riastradh
Fix some missing uvm_vnp_setsize in screw cases while here.
2020-09-05genfs_rename: Fix deadlocks in cross-directory cyclic rename.riastradh
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.
2020-09-05tests/fs/vfs/t_renamerace: Test a screw case hannken@ found.riastradh
2020-08-23Nix trailing whitespace.riastradh
2020-08-23Expand test to cover more failure cases. Change from skipped to expect failperseant
in anticipation of working roll-forward code.
2020-08-20Nix trailing whitespace.riastradh
2020-08-20Add cleanup of possible leftover rump processes, replacing thegson
non-working cleanup code just removed from ffs_common.sh. Fixes PR bin/48892 with respect to the t_rquotad test.
2020-08-20Remove non-functional cleanup code from test_case() and test_case_root().gson
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.
2020-08-18Add skipped test for in-kernel roll-forward agentperseant
2020-08-17Remove unused function rump_shutdown()gson
2020-06-26Reference PRs consistently.jruoho
2020-06-17Include explicitly <rump/rump_syscallshotgun.h> for previous indirect userskamil
via <rump/rump.h>.
2020-06-01LIBISPRIVATE=yeschristos
2020-05-15PR/55102: Kamil Rytarowski: Duplicate fifo_vnodeop_entries,christos
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.
2020-05-14Remove extra semicolon.msaitoh
2020-04-23Replace noatf global with conditional compilationjoerg
2020-04-12make sure that 0 length files get their extattrs cleaned up on deletionchristos
(there was an optimization to not call truncate if size == 0).
2020-04-10New extended attributes test (does not work until we commit kernel changes)christos
2020-03-15Skip tests when we know there is not enough space availablemartin