From nobody Mon Oct 28 12:46:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XcY6H0qnWz5bK4s; Mon, 28 Oct 2024 12:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XcY6H02yrz4YYD; Mon, 28 Oct 2024 12:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730119575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cisndk7xE+qEmle2t69Q8nU3td2jA0pa+XSTaGfmy7Q=; b=d7uDxoZdkrIio0U5xS4130hd1GbvTeMy339iTlF8MO4FagObnCQhkAaZXZ5wMI5LPy0HgX FfP7TTu9hy4O/9o6/JeK8pJ1Dd5xDSiNxPOn6Wj59/BtJimU9Y3eBVIRCtgy1nY2VeM6gX eWjpLzB1e0DqrMSJ8Jlp6RkvDk3oGrbOnGAEMji3Oqdir4Y3J9mS7A169l8z9PytAH+/Od yHyfhCZgtgqL6W1zVQRLsXbyh4kKmpgY1y0FzDh2vkIsoQrJ5HF8zebbMP5CLGPplgBq1t lRp8qgbxQeVomrwezUsnraUz3LRciaPqsiNTkQ36kQnQ1/8FN0GMzjJpfcet3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730119575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cisndk7xE+qEmle2t69Q8nU3td2jA0pa+XSTaGfmy7Q=; b=cz4VPpyNfV0qqnlpVh1QB0mS3G3cEWfw5buv702KPrxP59NQ3pRYeKrxpZK6CM+7UoeVQj A8qdG1T/vPlcaRhefWs5UrapErflAonVO5tV83VfH68WWDJFSvZqHnpuEnU7frG0/pjbLJ HryE3UmM01xlg32KwI04gScxOtmU4y5YDkEsAfY/x8zd/eTJDpsGa1A5gsbdQ8SIal8gMi nlBvgzafCra+jiRuqz+oqjNWs6iiQYPMFZliU+gyiG40ccoaoAcDtkXrzvA3FYMo31WKod wapY9+MYM2pP9ibG2qEYyc7xuQGo71i6sMWLs5D6kdhS682uIqwIoEfUcWv43g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730119575; a=rsa-sha256; cv=none; b=OV3PTUBJsT8xqXEBlAzcDHnj8/EyxMUmr0dGAoPtw1xKtbZpR3T002V078cysokLtd+kL5 RehiOeySCWov0KJfocQK1lOoVsPexU8I69kl2f0OPy6cKVKffon87eghj3ITKPI/n3Ky8z 7W0LIe3hrKj/h8t5SGvSAxxEjFuJ+VeTqbuNFRZg+hfSoRuRrrzvqzVPHwCBeO9kyHtmZL ontS3A8CwEe/v4Dva6ysybap/Zf+zZkQVC+GzGPuO4X2r11yBhz1ODScWMzRxmCri7fNho dmgRTC+oGbZZsJKddr+YCfIfH64ZVWkJk/SthmNNt3iIBDDDsHaz6GmXzeyqzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XcY6G6Z3Zzg0Q; Mon, 28 Oct 2024 12:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49SCkEmI075810; Mon, 28 Oct 2024 12:46:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49SCkE6C075807; Mon, 28 Oct 2024 12:46:14 GMT (envelope-from git) Date: Mon, 28 Oct 2024 12:46:14 GMT Message-Id: <202410281246.49SCkE6C075807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 0313a36cb9d6 - stable/13 - rc/tests: Skip oomprotect tests in a jail List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0313a36cb9d60c1f2a197bfc186dc4dd6515a71d Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=0313a36cb9d60c1f2a197bfc186dc4dd6515a71d commit 0313a36cb9d60c1f2a197bfc186dc4dd6515a71d Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-10-14 10:28:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-28 12:46:05 +0000 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) --- libexec/rc/tests/rc_subr_test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) 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")