mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-08 20:26:31 +00:00
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:
parent
3562b7b1eb
commit
161984ade1
|
@ -81,6 +81,9 @@ basic_body()
|
||||||
}
|
}
|
||||||
basic_cleanup()
|
basic_cleanup()
|
||||||
{
|
{
|
||||||
|
if ! which -s jail; then
|
||||||
|
atf_skip "This test requires jail"
|
||||||
|
fi
|
||||||
recycle
|
recycle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,12 +33,12 @@ max_cur_head()
|
||||||
{
|
{
|
||||||
atf_set descr 'Test maximum and current number of child jails'
|
atf_set descr 'Test maximum and current number of child jails'
|
||||||
atf_set require.user root
|
atf_set require.user root
|
||||||
if ! which -s jail; then
|
|
||||||
atf_skip "This test requires jail"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
max_cur_body()
|
max_cur_body()
|
||||||
{
|
{
|
||||||
|
if ! which -s jail; then
|
||||||
|
atf_skip "This test requires jail"
|
||||||
|
fi
|
||||||
origin_max=$(sysctl -n security.jail.children.max)
|
origin_max=$(sysctl -n security.jail.children.max)
|
||||||
origin_cur=$(sysctl -n security.jail.children.cur)
|
origin_cur=$(sysctl -n security.jail.children.cur)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user