| #
fba81b33
|
| 29-Jan-2026 |
Alan Somers <asomers@FreeBSD.org> |
capsicum-tests: remove Linux support
Now that this project is part of freebsd-src, it no longer needs to be portable. Remove Linux-only tests, cross-os compatibility code, and compatibility with ol
capsicum-tests: remove Linux support
Now that this project is part of freebsd-src, it no longer needs to be portable. Remove Linux-only tests, cross-os compatibility code, and compatibility with older FreeBSD versions. Leave in place some originally Linux-only tests that could now be ported to FreeBSD, like the pipe2 tests.
Sponsored by: ConnectWise Reviewed by: oshogbo Differential Revision: https://reviews.freebsd.org/D54985
show more ...
|
| #
670b568e
|
| 27-Jan-2026 |
Ed Maste <emaste@FreeBSD.org> |
capsicum-test: Move out of contrib
Google developed the Capsicum unit test suite[1] as part of the Capsicum-Linux[2] project, based on unit tests that existed in FreeBSD and unit tests developed as
capsicum-test: Move out of contrib
Google developed the Capsicum unit test suite[1] as part of the Capsicum-Linux[2] project, based on unit tests that existed in FreeBSD and unit tests developed as part of the initial Capsicum-Linux port.
Capsicum-Linux was archived as of October 31, 2022 and is no longer being maintained. FreeBSD is currently the only consumer of and contributor to the test suite. Move the src into tests/sys/capsicum to simplify ongoing maintenance.
The makefiles were deleted as we (continue to) use the existing bespoke FreeBSD Makefile, and CONTRIBUTING.md was removed as the Google CLA is no longer applicable.
[1] https://github.com/google/capsicum-test [2] https://github.com/google/capsicum-linux
Reviewed by: asomers, oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54917
show more ...
|
| #
8ac5aef8
|
| 01-Apr-2019 |
Enji Cooper <ngie@FreeBSD.org> |
Integrate capsicum-test into the FreeBSD test suite
This change takes capsicum-test from upstream and applies some local changes to make the tests work on FreeBSD when executed via Kyua.
The local
Integrate capsicum-test into the FreeBSD test suite
This change takes capsicum-test from upstream and applies some local changes to make the tests work on FreeBSD when executed via Kyua.
The local modifications are as follows: 1. Make `OpenatTest.WithFlag` pass with the new dot-dot lookup behavior in FreeBSD 12.x+. 2. capsicum-test references a set of helper binaries: `mini-me`, `mini-me.noexec`, and `mini-me.setuid`, as part of the execve/fexecve tests, via execve, fexecve, and open. It achieves this upstream by assuming `mini-me*` is in the current directory, however, in order for Kyua to execute `capsicum-test`, it needs to provide a full path to `mini-me*`. In order to achieve this, I made `capsicum-test` cache the executable's path from argv[0] in main(..) and use the cached value to compute the path to `mini-me*` as part of the execve/fexecve testcases. 3. The capsicum-test test suite assumes that it's always being run on CAPABILITIES enabled kernels. However, there's a chance that the test will be run on a host without a CAPABILITIES enabled kernel, so we must check for the support before running the tests. The way to achieve this is to add the relevant `feature_present("security_capabilities")` check to SetupEnvironment::SetUp() and skip the tests when the support is not available. While here, add a check for `kern.trap_enotcap` being enabled. As noted by markj@ in https://github.com/google/capsicum-test/issues/23, this sysctl being enabled can trigger non-deterministic failures. Therefore, the tests should be skipped if this sysctl is enabled.
All local changes have been submitted to the capsicum-test project (https://github.com/google/capsicum-test) and are in various stages of review. Please see the following pull requests for more details: 1. https://github.com/google/capsicum-test/pull/35 2. https://github.com/google/capsicum-test/pull/41 3. https://github.com/google/capsicum-test/pull/42
Reviewed by: asomers Discussed with: emaste, markj Approved by: emaste (mentor) MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D19758
show more ...
|