aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2016-09-03 17:59:46 +0000
committerEnji Cooper <ngie@FreeBSD.org>2016-09-03 17:59:46 +0000
commit39194723608f66219e5f3e967ce5f62120fc0b36 (patch)
tree106084a9ba0dd1f8b06ad4538cb54188090bcab5 /tests
parent46f4fe1eb8690708938f3d15b560260308c94c8c (diff)
downloadsrc-39194723608f66219e5f3e967ce5f62120fc0b36.tar.gz
src-39194723608f66219e5f3e967ce5f62120fc0b36.zip
Skip testcases 9/10 if jail(8) isn't installed
These testcases require jail support MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=305357
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/mac/bsdextended/matches_test.sh52
1 files changed, 29 insertions, 23 deletions
diff --git a/tests/sys/mac/bsdextended/matches_test.sh b/tests/sys/mac/bsdextended/matches_test.sh
index 5aff413967dc..11cac81236e7 100644
--- a/tests/sys/mac/bsdextended/matches_test.sh
+++ b/tests/sys/mac/bsdextended/matches_test.sh
@@ -144,30 +144,36 @@ else
fail $desc
fi
-#
-# Subject Match on jail
-#
-rm -f $playground/test-jail
-
-desc="subject matching jailid"
-jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"`
-ugidfw set 1 subject jailid $jailid object mode rasx
-sleep 10
-
-if [ -f $playground/test-jail ]; then
- fail "TODO $desc: this testcase fails (see bug # 205481)"
-else
- pass $desc
-fi
-
-rm -f $playground/test-jail
-desc="subject nonmatching jailid"
-jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"`
-sleep 10
-if [ -f $playground/test-jail ]; then
- pass $desc
+if which jail >/dev/null; then
+ #
+ # Subject Match on jail
+ #
+ rm -f $playground/test-jail
+
+ desc="subject matching jailid"
+ jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"`
+ ugidfw set 1 subject jailid $jailid object mode rasx
+ sleep 10
+
+ if [ -f $playground/test-jail ]; then
+ fail "TODO $desc: this testcase fails (see bug # 205481)"
+ else
+ pass $desc
+ fi
+
+ rm -f $playground/test-jail
+ desc="subject nonmatching jailid"
+ jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"`
+ sleep 10
+ if [ -f $playground/test-jail ]; then
+ pass $desc
+ else
+ fail $desc
+ fi
else
- fail $desc
+ # XXX: kyua is too dumb to parse skip ranges, still..
+ pass "skip jail(8) not installed"
+ pass "skip jail(8) not installed"
fi
#