mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
rc/tests: Skip oomprotect tests in a jail
oomprotect cannot be used in a jail. Reviewed by: bnovkov, christos, markj Approved by: bnovkov (mentor), christos (mentor), markj (mentor) MFC after: 1 week (cherry picked from commit 6fa42b91ca3f481912af98c4d49c44507eb1b8e1)
This commit is contained in:
parent
adfd9150b9
commit
025535f945
1 changed files with 8 additions and 0 deletions
|
|
@ -35,6 +35,10 @@ oomprotect_all_head()
|
|||
|
||||
oomprotect_all_body()
|
||||
{
|
||||
if [ "$(sysctl -n security.jail.jailed)" != 0 ]; then
|
||||
atf_skip "protect(1) cannot be used in a jail"
|
||||
fi
|
||||
|
||||
__name="$(atf_get ident)"
|
||||
__pidfile="$(mktemp -t "${__name}.pid")"
|
||||
__childpidfile="$(mktemp -t "${__name}.childpid")"
|
||||
|
|
@ -72,6 +76,10 @@ oomprotect_yes_head()
|
|||
|
||||
oomprotect_yes_body()
|
||||
{
|
||||
if [ "$(sysctl -n security.jail.jailed)" != 0 ]; then
|
||||
atf_skip "protect(1) cannot be used in a jail"
|
||||
fi
|
||||
|
||||
__name="$(atf_get ident)"
|
||||
__pidfile="$(mktemp -t "${__name}.pid")"
|
||||
__script=$(mktemp -t "${__name}.script")
|
||||
|
|
|
|||
Loading…
Reference in a new issue