Skip to content

Commit

Permalink
tests: Switch sys/kern/sysctl_security_jail_children to execenv=jail
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ihoro committed Oct 29, 2024
1 parent 8549e3c commit 2cb39df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion tests/sys/kern/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions tests/sys/kern/sysctl_security_jail_children.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 2cb39df

Please sign in to comment.