hostname(1): skip test if jail binary is missing

Approved by:	lwhsu
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D44005
This commit is contained in:
Olivier Cochard 2024-02-23 10:46:34 +01:00
parent bde7c606e9
commit 3562b7b1eb
1 changed files with 3 additions and 0 deletions

View File

@ -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}