freebsd-src/tests/sys/kern
Jake Freeland 2f39a98664 tests: Add ktrace capability violation test cases
Introduce regression tests for ktrace(2) that target capability
violations.

These test cases ensure that ktrace(2) records these violations:
- CAPFAIL_NOTCAPABLE
- CAPFAIL_INCREASE
- CAPFAIL_SYSCALL
- CAPFAIL_SIGNAL
- CAPFAIL_PROTO
- CAPFAIL_SOCKADDR
- CAPFAIL_NAMEI
- CAPFAIL_CPUSET

A portion of these test cases create processes that do NOT enter
capability mode, but raise violations. This is intended behavior.
Users may run `ktrace -t p` on non-Capsicumized programs to detect
violations that would occur if the process were in capability mode.

Reviewed by:	markj
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D40682
2024-04-07 18:52:51 -05:00
..
acct tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
execve Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
pipe tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
basic_signal.c
coredump_phnum_helper.c
coredump_phnum_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
fdgrowtable_test.c tests/fdgrowtable: perform the threaded test in a child process 2024-02-23 17:49:53 -08:00
kcov.c tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
kern_copyin.c tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
kern_descrip_test.c tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
kill_zombie.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
ktls_test.c ktls tests: Relax error checking for shutdown(2) a bit 2023-11-17 09:31:21 -05:00
ktrace_test.c tests: Add ktrace capability violation test cases 2024-04-07 18:52:51 -05:00
libkern_crc32.c
listener_wakeup.c socket tests: add listener_wakeup 2024-02-15 10:48:44 -08:00
Makefile tests: Add ktrace capability violation test cases 2024-04-07 18:52:51 -05:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
module_test.c
pdeathsig.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pdeathsig_helper.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
ptrace_test.c ptrace tests: Fix a signed/unsigned integer comparison 2024-04-01 19:12:50 -04:00
reaper.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
sched_affinity.c tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
sendfile_helper.c
sendfile_test.sh tests: don't run atf_* in a subshell 2023-11-27 13:15:59 -08:00
shutdown_dgram.c tests: fix typo in a comment 2024-01-25 22:19:59 -08:00
sigaltstack.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
sigsys.c sigsys test: correct count of delivered signals 2024-02-25 10:11:49 +02:00
sigwait.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
socket_accept.c sockets: don't malloc/free sockaddr memory on accept(2) 2023-11-30 08:30:55 -08:00
socket_accf.c
socket_msg_trunc.c socket tests: remove MSG_TRUNC test for unix/seqpacket 2024-02-28 14:32:46 -08:00
socket_msg_waitall.c socket tests: improve error message 2024-02-01 13:37:26 -08:00
sonewconn_overflow.py Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
sonewconn_overflow.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
subr_physmem_test.c tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
sys_getrandom.c tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
sysctl_kern_proc.c
tty_pts.c kern: pts: do not special case closed slave side 2024-01-15 20:55:59 -06:00
unix_dgram.c
unix_passfd_dgram.c
unix_passfd_stream.c
unix_passfd_test.c tests/unix_passfd: add a comment for send_a_lot 2024-02-08 09:00:41 -08:00
unix_seqpacket_test.c tests/unix_seqpacket: mk_pair_of_sockets() requires a valid argument 2024-03-11 07:50:29 -07:00
unix_socketpair_test.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
waitpid_nohang.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00