From nobody Mon Oct 14 10:31:08 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 4XRtms1CrHz5YLNR; Mon, 14 Oct 2024 10:31:09 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XRtms09wjz4thk; Mon, 14 Oct 2024 10:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901869; 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=w9CW3p9eXgn90QLJ+Wv7fOfsmP5Chn7MmDej+hIafB4=; b=D6h7c5cmNHZ+9/z7WcsrriExRWL53OC497HnDp7BAvCe/+1TVhRtlhkj58vhqs6mJPvL0G 4DnYUu4pEIWXQtHttoQPDF3lWttr9XCQmW5cdAl43Hxdn/dtyUo0QAK9BlDV8OtmvHQhTc KtfZ0OfjuKmph3/o0gQv5nGdGQB7cF0L+ICTLaywA4jZo+4r/OJP0iNE5jjPWtOXAPBruD 23K6vN40lrqqRXfugectLf0Ii7YQ6X6vRIUIaNthUZiiJcatvXptpvC6Bx0sIHCLn/0UAr uJlg84t3YxHXX8pGJXNwEkL6rSoWseeI8nDJL3kzFwKuw1jMKQEz3qTjFl03iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728901869; 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=w9CW3p9eXgn90QLJ+Wv7fOfsmP5Chn7MmDej+hIafB4=; b=CH2+RosCLoovozRyGaLP0dmnLduI9NHVop3hSiBTd4PvbaIg2plPlbMQ+vQLIvLZvsrN4r 6s+phg4XPUzO5cSYgkTM6cuhPjh3F+NnWsYn+mHlctI224cY5oeb7hqL+QUhodhXOpmG2Z s/Sl5ZqxfBLvZS+ICaencR5YTa3GLd2o7wT+xLIF+GUtdvmwk1vageosO6jxG1WB5MVJa4 pOP9hrQujKAUfUr0WnT+LBU2aCh+8Yy4VGejl0CtjFIoEhQ3mEw3vrZpvb9xmPkUv+8dXU jgsCUFiT7J8S2ZnYnOUaJbyRg1eN6ZwJ/guDihbnwSdoZKlNM8uU3sDqKNn8Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728901869; a=rsa-sha256; cv=none; b=ufpdaqsSjFz4Alj94rdc4LBVVjZMGjZ9lvobVvKzIe59TmMC+wbwBMs7eBoMdZKBvwiWtR KvmNbKxjPukppRozqw6ruDnXrNNHqlWwxssgI/2b4Ur0F78ARJN/5m1AyV8Kv7Ekc4ygOv yQdCDj1fusdguU5LyWXlLe0pVFq9F06+vag1oZ/OZO6GPGzywIMhLmPGgNCFgoV7bf1ID6 I/GFuVHB6ZNs08H3Xvmi9MWuotMZIqqW4f+QaYqyHwisHBAQZsvRxBIqEYqSLHl12gSsnP 7UPixCKPbvGnFHIfpCxrtWMpjK0Kxiif2U+LJbOZFYZmgDuf8CjpSpIjEqDl/w== 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 4XRtmr6ss1zb5T; Mon, 14 Oct 2024 10:31:08 +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 49EAV8hZ079740; Mon, 14 Oct 2024 10:31:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EAV8Xg079737; Mon, 14 Oct 2024 10:31:08 GMT (envelope-from git) Date: Mon, 14 Oct 2024 10:31:08 GMT Message-Id: <202410141031.49EAV8Xg079737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 6fa42b91ca3f - main - 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/main X-Git-Reftype: branch X-Git-Commit: 6fa42b91ca3f481912af98c4d49c44507eb1b8e1 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=6fa42b91ca3f481912af98c4d49c44507eb1b8e1 commit 6fa42b91ca3f481912af98c4d49c44507eb1b8e1 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-10-14 10:28:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-14 10:30:23 +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 --- 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 90306de9a8a7..f004354fe52e 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")