tests: Switch sys/kern/sysctl_security_jail_children to execenv=jail

Kyua skips tests based on the jail execution environment if a system is
built WITHOUT_JAIL. Thus, the test case does not need to handle it.

Reviewed by:	markj
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D47105
This commit is contained in:
Igor Ostapenko 2024-10-29 21:28:02 +00:00
parent 8549e3ce0c
commit 2cb39df0a1
2 changed files with 1 additions and 8 deletions

View File

@ -63,7 +63,6 @@ TEST_METADATA.sonewconn_overflow+= required_user="root"
TEST_METADATA.sonewconn_overflow+= is_exclusive="true"
ATF_TESTS_SH+= sendfile_test
ATF_TESTS_SH+= sysctl_security_jail_children
TEST_METADATA.sysctl_security_jail_children+= is_exclusive="true"
${PACKAGE}FILES+= sonewconn_overflow.py
${PACKAGE}FILESMODE_sonewconn_overflow.py=0555

View File

@ -24,21 +24,15 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# Even being is_exclusive="true" this test does not expect a host to spawn
# other jails during the test execution.
#
atf_test_case "max_cur" "cleanup"
max_cur_head()
{
atf_set descr 'Test maximum and current number of child jails'
atf_set require.user root
atf_set execenv jail
}
max_cur_body()
{
if ! which -s jail; then
atf_skip "This test requires jail"
fi
origin_max=$(sysctl -n security.jail.children.max)
origin_cur=$(sysctl -n security.jail.children.cur)