summaryrefslogtreecommitdiff
path: root/tests/mkdir
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-26 10:06:53 +0200
committerJim Meyering <meyering@redhat.com>2009-08-26 10:06:53 +0200
commitd6639ee63bc9321bc73ad453a266e45a89823a22 (patch)
tree50eea2cb0b99ff8450078dc958b594def74ff83b /tests/mkdir
parentbe8531206b0554bdac6cfb8809c4a2dab56b5a52 (diff)
downloadcoreutils-d6639ee63bc9321bc73ad453a266e45a89823a22.tar.xz
tests: mkdir/selinux: avoid spurious failure on some SELinux systems
* tests/test-lib.sh (require_selinux_enforcing_): New function. * tests/mkdir/selinux: Use it. Otherwise, this test would fail on Rawhide with SELinux disabled.
Diffstat (limited to 'tests/mkdir')
-rwxr-xr-xtests/mkdir/selinux5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux
index b8ab40472..ddd237cdb 100755
--- a/tests/mkdir/selinux
+++ b/tests/mkdir/selinux
@@ -23,11 +23,12 @@ if test "$VERBOSE" = yes; then
mknod --version
fi
+. $srcdir/test-lib.sh
+
# Note: on an SELinux/enforcing system running mcstransd older than
# mcstrans-0.2.8-1.fc9, the following commands may mistakenly exit
# successfully, in spite of the invalid context string.
-
-. $srcdir/test-lib.sh
+require_selinux_enforcing_
c=invalid-selinux-context
msg="failed to set default file creation context to \`$c':"