summaryrefslogtreecommitdiff
path: root/tests/kernel
AgeCommit message (Collapse)Author
2023-06-03adapt to ${CC_WNO_FORMAT_TRUNCATION}lukem
2023-05-05t_trapsignal.sh: fix head() function definitions of test casesgutteridge
2023-05-04t_fexecve.sh: fix head() function definitions of test casesgutteridge
2023-04-23t_open_pr_57260.c: KNF a block (spaces to tabs)gutteridge
2023-04-21Add new test t_open_pr_57260gutteridge
New test case that reflects the fix in PR kern/57260. The majority of work for this case itself was by riastradh@, who'd supplied the basis for it in the ticket, and provided further guidance.
2023-04-03t_magic_symlinks.sh: fix line continuation in realpath head()gutteridge
This wasn't noticed before because the name of the head() itself was wrong, and was being ignored.
2023-04-03t_magic_symlinks.sh: fix naming of head() of realpath test casegutteridge
Addresses part of PR kern/57319 from Jim Spath.
2022-05-24fix various typos in comment, documentation and log messages.andvar
2022-05-24s/estabilishing/establishing/ in copy pasted comment.andvar
2022-05-14PR/56831: Eric van Gyzen: race condition in tests/kernel/t_sysv.cchristos
https://cgit.freebsd.org/src/commit/?id=20917cac7bcf216225a7b66f7b3a56f3764c5acc
2022-01-26remove double t from targeted, add missing r to arbitraryandvar
And fix few more typos along the way in comments and man pages.
2021-12-09tests/t_magic_symlinks: remove duplicate word in test descriptionrillig
2021-11-21Test kernel/kqueue/t_timer, subtests abstime, basic_timer and timer_unitshannken
often fail when run on QEMU because QEMU misses clock interrupts. Always check timespec against expected "tv_sec" and use an "4 * tv_sec" upper bound when run under QEMU. Now becomes part of PR kern/43997 "Kernel timer discrepancies".
2021-10-23Fix a regression introduced in kern_event.c,v 1.129 that would causethorpej
"udata" to get clobbered on ONESHOT events, and add a unit test for it. Reported by martin@ (manifested in his case as a KASSERT() firing when running unit tests in COMPAT_NETBSD32).
2021-10-23Add support for the EVFILT_EMPTY filter, which is activated when thethorpej
write buffer associated with the file descriptor is empty. This is currently implemented only for sockets, and is intended primarily to provide visibility to applications that all previously written data has been acknowledged by the TCP layer on the receiver. Compatible with the same filter in FreeBSD.
2021-10-22In the "modify" test case, immediately after modifying the timer, validatethorpej
that its associated knote in the kernel has actually been deactivated.
2021-10-22Support modifying an existing timer without having to delete it first.thorpej
Semantics match FreeBSD.
2021-10-20Add a test case for PR kern/56460.thorpej
2021-10-20Overhaul of the EVFILT_VNODE kevent(2) filter:thorpej
- Centralize vnode kevent handling in the VOP_*() wrappers, rather than forcing each individual file system to deal with it (except VOP_RENAME(), because VOP_RENAME() is a mess and we currently have 2 different ways of handling it; at least it's reasonably well-centralized in the "new" way). - Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ, compatible with the same events in FreeBSD. - Track which kevent notifications clients are interested in receiving to avoid doing work for events no one cares about (avoiding, e.g. taking locks and traversing the klist to send a NOTE_WRITE when someone is merely watching for a file to be deleted, for example). In support of the above: - Add support in vnode_if.sh for specifying PRE- and POST-op handlers, to be invoked before and after vop_pre() and vop_post(), respectively. Basic idea from FreeBSD, but implemented differently. - Add support in vnode_if.sh for specifying CONTEXT fields in the vop_*_args structures. These context fields are used to convey information between the file system VOP function and the VOP wrapper, but do not occupy an argument slot in the VOP_*() call itself. These context fields are initialized and subsequently interpreted by PRE- and POST-op handlers. - Version VOP_REMOVE(), uses the a context field for the file system to report back the resulting link count of the target vnode. Return this in tmpfs, udf, nfs, chfs, ext2fs, lfs, and ufs. NetBSD 9.99.92.
2021-10-13Add support for the NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS,thorpej
NOTE_NSECONDS, and NOTE_ABSTIME filter flags to EVFILT_TIMER, API-compatible with the same in FreeBSD.
2021-10-10Fix typo in comment.wiz
2021-10-10The knotes for EVFILT_SIGNAL and EVFILT_PROC are maintained on a singlethorpej
per-process list, and kern_event.c,v 1.129 has several KASSERT()s in various code paths that process this list related to the mixing of these two knote types. This new unit test is designed specifically to exercise those KASSERT()s and thus validate their assumptions.
2021-10-10Add a test case for the race condition in PR kern/50094, modeled afterthorpej
the Go run-time scenario described in the PR.
2021-10-10Add a test case to heavily exercise EVFILT_PROC + NOTE_TRACK.thorpej
2021-10-02- Add a new EVFILT_WRITE test case for FIFOs that correctly validatesthorpej
the writability thresholds. - Fix a bug in fifo_kqfilter() exposed by the new test case; in the EVFILT_WRITE case, we were attaching the wrong end of the socket pair to the knote! - In filt_fiforead(), use ">= so->so_rcv.sb_lowat" rather than "> 0" for consistency with fifo_poll(). NFC.
2021-10-02New EVFILT_READ test case for FIFOs; validates readability threshold andthorpej
EV_EOF behavior.
2021-10-01t_simplehook requires RUMPmartin
2021-09-30Added tests for the linear hook APIsyamaguchi
2021-09-19fix various typos in comments, messages and documentation.andvar
2020-10-31Avoid hard-coding names and limits so this will not break again.christos
2020-07-01Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,jruoho
although it seems that realpath(3) has bigger problems with these symlinks.
2020-06-26Reference PRs consistently.jruoho
2020-06-25Add a test case for PR kern/52744, which no longer appears to be present.jruoho
2020-06-24errno is irrelevant here.rin
2020-06-24Fix random failures for pty_queue test.rin
Setting queue size by TIOCSQSIZE ioctl does not guarantee that data of that size can be read by single shot of read(2). Remove assertion based on this assertion, while total amount of data read from child process is still checked appropriately.
2020-06-24Turn err() into atf_tc_fail_errno() for parent process, so thatrin
atf can catch failures correctly.
2020-03-01Centralize the base rump libraries into a variable used by all the otherchristos
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.
2020-02-11Test that fpu state is preserved by fork.riastradh
2020-02-10Show errno on failure.riastradh
2019-10-20opening a symlink with O_NOFOLLOW is expected to fail.christos
2019-09-29convert HAVE_GCC == 7 to HAVE_GCC >= 7.mrg
2019-09-15Add tests for fexecve(2)christos
2019-09-15Add F_GETPATH, presented to tech-kern.christos
2019-08-15Adapt tests/kernel/t_subr_prf for MKSANITIZERkamil
Allow to rename snprintf-like functions to avoid clashes with a sanitizer. This tests needs a fixup to remove 'undef symbol' from the test code generator.
2019-06-07Add a $ORIGIN testchristos
2019-06-01Fix a mistake in a test for KERN_PROC_CWDkamil
Emit properly ENOENT scenario in chroot. For some reason the final patch did not hit the tree.
2019-06-01Add ATF KERN_PROC_CWD testskamil
2019-05-21unexpandchristos
2019-05-21add printf attributechristos
2019-05-21Make the t_subr_prf test build after changes to sys/kern/subr_prf.ckre
and while here add a simple test for the new kernel vasprintf().