tests: Fixing incomplete atf_skip if missing jail condition

Testing the scripts outside kyua(1) was a bad idea:
It didn't allow me to detect that they were faulty.

Sponsored by:	Netflix
This commit is contained in:
Olivier Cochard 2024-02-23 13:02:40 +01:00
parent 3562b7b1eb
commit 161984ade1
2 changed files with 6 additions and 3 deletions

View File

@ -81,6 +81,9 @@ basic_body()
}
basic_cleanup()
{
if ! which -s jail; then
atf_skip "This test requires jail"
fi
recycle
}

View File

@ -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)