Page MenuHomeFreeBSD

jail: tests requires jail
ClosedPublic

Authored by olivier on Feb 21 2024, 9:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 4:40 AM
Unknown Object (File)
Wed, Nov 13, 10:23 PM
Unknown Object (File)
Wed, Nov 13, 9:56 PM
Unknown Object (File)
Wed, Nov 13, 7:39 PM
Unknown Object (File)
Tue, Nov 12, 5:29 PM
Unknown Object (File)
Tue, Nov 12, 9:36 AM
Unknown Object (File)
Tue, Nov 12, 9:32 AM
Unknown Object (File)
Tue, Nov 12, 8:34 AM
Subscribers

Details

Summary

skip test if jail binary is missing

Test Plan

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

olivier created this revision.
This revision is now accepted and ready to land.Feb 21 2024, 5:02 PM

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.

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.

olivier edited the summary of this revision. (Show Details)
This revision now requires review to proceed.Feb 22 2024, 9:00 PM
This revision is now accepted and ready to land.Feb 23 2024, 12:34 AM