diff --git a/bin/hostname/tests/hostname_test.sh b/bin/hostname/tests/hostname_test.sh index 2ad6a1a5c358..a4d4d54bb052 100644 --- a/bin/hostname/tests/hostname_test.sh +++ b/bin/hostname/tests/hostname_test.sh @@ -81,6 +81,9 @@ basic_body() } basic_cleanup() { + if ! which -s jail; then + atf_skip "This test requires jail" + fi recycle } diff --git a/sys/kern/sysctl_security_jail_children.sh b/sys/kern/sysctl_security_jail_children.sh index 6ac6aa904dbc..d4c57915880f 100644 --- a/sys/kern/sysctl_security_jail_children.sh +++ b/sys/kern/sysctl_security_jail_children.sh @@ -33,12 +33,12 @@ max_cur_head() { atf_set descr 'Test maximum and current number of child jails' atf_set require.user root - if ! which -s jail; then - atf_skip "This test requires jail" - fi } 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)