Skip the testcases if mac_bsdextended(4) isn't detected on the

system

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
ngie 2015-12-21 08:58:14 +00:00
parent e9b4f1bc05
commit baed0dbafd

View File

@ -19,6 +19,10 @@ if [ $(id -u) -ne 0 ]; then
echo "1..0 # SKIP test must be run as root"
exit 0
fi
if ! sysctl -N security.mac.bsdextended >/dev/null 2>&1; then
echo "1..0 # SKIP mac_bsdextended(4) support isn't available"
exit 0
fi
if ! playground=$(mktemp -d $TMPDIR/tmp.XXXXXXX); then
echo "1..0 # SKIP failed to create temporary directory"
exit 0