aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2024-10-14 10:28:47 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2024-10-28 12:46:05 +0000
commit0313a36cb9d60c1f2a197bfc186dc4dd6515a71d (patch)
treea6a654f9b33039ca99e1aa75ffe01b18f560b434 /libexec
parent737111920ce3ccd82d93af765e38e51f3a2d359d (diff)
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rc/tests/rc_subr_test.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/libexec/rc/tests/rc_subr_test.sh b/libexec/rc/tests/rc_subr_test.sh
index 0ca790e39a14..4a54f991d72d 100644
--- a/libexec/rc/tests/rc_subr_test.sh
+++ b/libexec/rc/tests/rc_subr_test.sh
@@ -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")