git: bde7c606e9e0 - main - jail: skip sysctl_security_jail_children if jail binary missing

From: Olivier Cochard <olivier_at_FreeBSD.org>
Date: Fri, 23 Feb 2024 09:48:41 UTC
The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=bde7c606e9e03bd0dbab0d41f0c100d1ff9dd872

commit bde7c606e9e03bd0dbab0d41f0c100d1ff9dd872
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2024-02-23 09:43:54 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2024-02-23 09:43:54 +0000

    jail: skip sysctl_security_jail_children if jail binary missing
    
    Approved by:    lwhsu
    Sponsored by:   Netflix
    Differential Revision:  https://reviews.freebsd.org/D44010
---
 sys/kern/sysctl_security_jail_children.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/kern/sysctl_security_jail_children.sh b/sys/kern/sysctl_security_jail_children.sh
index 0423cf1e8a59..6ac6aa904dbc 100644
--- a/sys/kern/sysctl_security_jail_children.sh
+++ b/sys/kern/sysctl_security_jail_children.sh
@@ -33,6 +33,9 @@ max_cur_head()
 {
 	atf_set descr 'Test maximum and current number of child jails'
 	atf_set require.user root
+	if ! which -s jail; then
+		atf_skip "This test requires jail"
+	fi
 }
 max_cur_body()
 {