Skip to content

Commit

Permalink
tests: Switch bin/hostname/hostname_test 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/D47334
  • Loading branch information
ihoro committed Oct 31, 2024
1 parent e53a21a commit 68e0137
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions bin/hostname/tests/hostname_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ test_jail_conf='%%test_jail_name%% {

init()
{
if ! which -s jail; then
atf_skip "This test requires jail"
fi
echo "${test_jail_conf}" | \
sed -e "s/%%test_jail_name%%/${test_jail_name}/" > "./jail.conf"
jail -f "./jail.conf" -c ${test_jail_name}
Expand All @@ -61,6 +58,7 @@ basic_head()
{
atf_set require.user root
atf_set "descr" "basic test for getting hostname"
atf_set execenv jail
}
basic_body()
{
Expand All @@ -81,9 +79,6 @@ basic_body()
}
basic_cleanup()
{
if ! which -s jail; then
atf_skip "This test requires jail"
fi
recycle
}

Expand Down

0 comments on commit 68e0137

Please sign in to comment.