Name Date Size #Lines LOC

..--

LICENSEH A D27-Jan-20261.4 KiB2724

MakefileH A D27-Jan-20261.5 KiB6545

README.mdH A D29-Jan-20261.6 KiB3120

bindat_connectat.cH A D24-Nov-20235.9 KiB231155

capability-fd-pair.ccH A D29-Jan-20261.4 KiB4940

capability-fd.ccH A D29-Jan-202642.4 KiB1,3001,058

capmode.ccH A D29-Jan-202624 KiB729567

capsicum-freebsd.hH A D29-Jan-20261.5 KiB5429

capsicum-rights.hH A D29-Jan-2026213 1611

capsicum-test-main.ccH A D29-Jan-20263.9 KiB142121

capsicum-test.ccH A D29-Jan-20262.3 KiB9785

capsicum-test.hH A D27-Jan-202610.6 KiB282208

capsicum.hH A D29-Jan-2026912 3625

copy_file_range.ccH A D27-Jan-20267.6 KiB229186

fcntl.ccH A D29-Jan-202614.3 KiB403294

fexecve.ccH A D27-Jan-20266.1 KiB208167

functional.shH A D16-Aug-20232.1 KiB6123

ioctl.ccH A D29-Jan-20266.2 KiB208157

ioctls_test.cH A D24-Nov-20233.7 KiB12871

linux.ccH A D29-Jan-202648.9 KiB1,5011,182

mini-me.cH A D27-Jan-20261 KiB3931

mqueue.ccH A D27-Jan-20263.2 KiB10076

openat.ccH A D29-Jan-202614.4 KiB351232

overhead.ccH A D27-Jan-20261.3 KiB4640

procdesc.ccH A D29-Jan-202632.4 KiB1,062786

rename.ccH A D27-Jan-20261.6 KiB5027

sctp.ccH A D29-Jan-20267.2 KiB212175

select.ccH A D29-Jan-20263.9 KiB139113

showrightsH A D27-Jan-20264.8 KiB10094

smoketest.cH A D29-Jan-20264.7 KiB12796

socket.ccH A D29-Jan-202611 KiB347272

syscalls.hH A D29-Jan-20264.1 KiB129102

sysctl.ccH A D29-Jan-2026377 149

waittest.cH A D29-Jan-2026871 3431

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