From 3562b7b1eb80107fe2832bf5a2bfa1a03888db1c Mon Sep 17 00:00:00 2001 From: Olivier Cochard Date: Fri, 23 Feb 2024 10:46:34 +0100 Subject: [PATCH] hostname(1): skip test if jail binary is missing Approved by: lwhsu Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44005 --- bin/hostname/tests/hostname_test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/hostname/tests/hostname_test.sh b/bin/hostname/tests/hostname_test.sh index 57517821f7f..2ad6a1a5c35 100644 --- a/bin/hostname/tests/hostname_test.sh +++ b/bin/hostname/tests/hostname_test.sh @@ -42,6 +42,9 @@ test_jail_conf='%%test_jail_name%% { init() { + if ! which -s jail; then + atf_skip "This test requires jail" + fi echo "${test_jail_conf}" | \ sed -e "s/%%test_jail_name%%/${test_jail_name}/" > "./jail.conf" jail -f "./jail.conf" -c ${test_jail_name}