skip test if jail binary is missing
Details
A system with WITHOUT_JAIL=YES fails this test with:
Original stderr --------------- /usr/tests/sys/kern/sysctl_security_jail_children: jail: not found /usr/tests/sys/kern/sysctl_security_jail_children: jail: not found /usr/tests/sys/kern/sysctl_security_jail_children: jail: not found
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
On similar review (https://reviews.freebsd.org/D44005) the idea was to still build and install it, but "skip" the test if jail binary was missing.
@jamie Do you have a preference ?
I'll admit very little familiarity with the testing framework. If there's a standard to show a test as skipped that doesn't indicate a problem, that sounds best. But if it just claims that it's passed, it would seem better to just not run it. Though both is probably a good idea: still have it pass (like if the test was built at another time), but don't build it on a jail-less system.
There are three types of test results: pass, fail, and skipped. I prefer that the test case returns "skipped" when the required dependency isn't available. The reason is that I want to maintain the integrity of the test framework by adhering to a unified standard. Of course, defining MK_JAIL=no as a form of customization, and the test suite reflecting this change, also makes sense. However, I prefer to keep the test suite as identical as possible across different configurations. It's sufficient to ensure that tests do not return a "fail" status in this context. Reporting a missing feature (compared with the standard build) as "skipped" allows individuals who are customizing their setup to determine if the result is truly what they intended or if they have unintentionally disabled a feature. If we also remove the respective tests, then it might not be easy for users to realize what they might be missing.