summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-10-03 12:56:32 +0200
committerJim Meyering <meyering@redhat.com>2007-10-03 12:56:32 +0200
commit5cf961f0eaf78faf662d4c751739b0619a5e8d26 (patch)
tree257d37fedbdea448af110858950c0ad2798bd1c9 /tests/misc
parent1b8c8befd96bb1ebf02eeade5029a81e1b6c4dc1 (diff)
downloadcoreutils-5cf961f0eaf78faf662d4c751739b0619a5e8d26.tar.xz
* tests/misc/selinux: Skip this test if the initial chcon fails.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/selinux6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/misc/selinux b/tests/misc/selinux
index a4fc78ac4..67de51ea3 100755
--- a/tests/misc/selinux
+++ b/tests/misc/selinux
@@ -25,7 +25,11 @@ fail=0
ctx=root:object_r:tmp_t
# FIXME, what if $ctx is no different from the default. Not likely.
# give each a different context, via chcon
-chcon $ctx f d p || fail=1
+chcon $ctx f d p 2>/dev/null || {
+ echo 1>&2 'skipping this test: "chcon '$ctx' ..." failed'
+ (exit 77); exit 77
+}
+
# inspect that context with both ls -Z and stat.
for i in d f p; do
c=`ls -dogZ $i|cut -d' ' -f3`; test x$c = x$ctx || fail=1