| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| LICENSE | H A D | 27-Jan-2026 | 1.4 KiB | 27 | 24 | |
| Makefile | H A D | 27-Jan-2026 | 1.5 KiB | 65 | 45 | |
| README.md | H A D | 29-Jan-2026 | 1.6 KiB | 31 | 20 | |
| bindat_connectat.c | H A D | 24-Nov-2023 | 5.9 KiB | 231 | 155 | |
| capability-fd-pair.cc | H A D | 29-Jan-2026 | 1.4 KiB | 49 | 40 | |
| capability-fd.cc | H A D | 29-Jan-2026 | 42.4 KiB | 1,300 | 1,058 | |
| capmode.cc | H A D | 29-Jan-2026 | 24 KiB | 729 | 567 | |
| capsicum-freebsd.h | H A D | 29-Jan-2026 | 1.5 KiB | 54 | 29 | |
| capsicum-rights.h | H A D | 29-Jan-2026 | 213 | 16 | 11 | |
| capsicum-test-main.cc | H A D | 29-Jan-2026 | 3.9 KiB | 142 | 121 | |
| capsicum-test.cc | H A D | 29-Jan-2026 | 2.3 KiB | 97 | 85 | |
| capsicum-test.h | H A D | 27-Jan-2026 | 10.6 KiB | 282 | 208 | |
| capsicum.h | H A D | 29-Jan-2026 | 912 | 36 | 25 | |
| copy_file_range.cc | H A D | 27-Jan-2026 | 7.6 KiB | 229 | 186 | |
| fcntl.cc | H A D | 29-Jan-2026 | 14.3 KiB | 403 | 294 | |
| fexecve.cc | H A D | 27-Jan-2026 | 6.1 KiB | 208 | 167 | |
| functional.sh | H A D | 16-Aug-2023 | 2.1 KiB | 61 | 23 | |
| ioctl.cc | H A D | 29-Jan-2026 | 6.2 KiB | 208 | 157 | |
| ioctls_test.c | H A D | 24-Nov-2023 | 3.7 KiB | 128 | 71 | |
| linux.cc | H A D | 29-Jan-2026 | 48.9 KiB | 1,501 | 1,182 | |
| mini-me.c | H A D | 27-Jan-2026 | 1 KiB | 39 | 31 | |
| mqueue.cc | H A D | 27-Jan-2026 | 3.2 KiB | 100 | 76 | |
| openat.cc | H A D | 29-Jan-2026 | 14.4 KiB | 351 | 232 | |
| overhead.cc | H A D | 27-Jan-2026 | 1.3 KiB | 46 | 40 | |
| procdesc.cc | H A D | 29-Jan-2026 | 32.4 KiB | 1,062 | 786 | |
| rename.cc | H A D | 27-Jan-2026 | 1.6 KiB | 50 | 27 | |
| sctp.cc | H A D | 29-Jan-2026 | 7.2 KiB | 212 | 175 | |
| select.cc | H A D | 29-Jan-2026 | 3.9 KiB | 139 | 113 | |
| showrights | H A D | 27-Jan-2026 | 4.8 KiB | 100 | 94 | |
| smoketest.c | H A D | 29-Jan-2026 | 4.7 KiB | 127 | 96 | |
| socket.cc | H A D | 29-Jan-2026 | 11 KiB | 347 | 272 | |
| syscalls.h | H A D | 29-Jan-2026 | 4.1 KiB | 129 | 102 | |
| sysctl.cc | H A D | 29-Jan-2026 | 377 | 14 | 9 | |
| waittest.c | H A D | 29-Jan-2026 | 871 | 34 | 31 |
README.md
1# Capsicum User Space Tests 2 3This directory holds unit tests for [Capsicum](https://man.freebsd.org/cgi/man.cgi?query=capsicum) 4object-capabilities. The tests exercise the syscall interface to a Capsicum-enabled operating system, 5Currently, [FreeBSD >=10.x](http://www.freebsd.org) is the only such operating system. 6 7The tests are written in C++11 and use the [Google Test](https://code.google.com/p/googletest/) 8framework, with some additions to fork off particular tests (because a process that enters capability 9mode cannot leave it again). 10 11## Provenance 12 13The original basis for these tests was: 14 15 - [unit tests](https://github.com/freebsd/freebsd/tree/master/tools/regression/security/cap_test) 16 written by Robert Watson and Jonathan Anderson for the original FreeBSD 9.x Capsicum implementation 17 - [unit tests](http://git.chromium.org/gitweb/?p=chromiumos/third_party/kernel-capsicum.git;a=tree;f=tools/testing/capsicum_tests;hb=refs/heads/capsicum) written by Meredydd Luff for the original Capsicum-Linux port. 18 19These tests were coalesced and moved into an [independent repository](https://github.com/google/capsicum-test) 20to enable comparative testing across multiple OSes, and then substantially extended. 21 22Subsequently, the [capsicum-linux port](https://github.com/google/capsicum-linux) was abandoned by 23its maintainers, rendering the independent repository obsolete. So the tests were copied back into 24the FreeBSD source tree in time for 16.0-RELEASE. 25 26## Configuration 27 28The following kernel configuration options are needed so that all tests can run: 29 30 - `options P1003_1B_MQUEUE`: Enable POSIX message queues (or `kldload mqueuefs`) 31