1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-21 07:15:49 +00:00

tests: Switch bin/hostname/hostname_test 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/D47334
This commit is contained in:
Igor Ostapenko 2024-10-31 17:44:49 +00:00
parent e53a21abdf
commit 68e0137837

View File

@ -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}
@ -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()
{
@ -81,9 +79,6 @@ basic_body()
}
basic_cleanup()
{
if ! which -s jail; then
atf_skip "This test requires jail"
fi
recycle
}