summaryrefslogtreecommitdiff
path: root/tests/init.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/init.cfg')
-rw-r--r--tests/init.cfg7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/init.cfg b/tests/init.cfg
index f74d50cc0..07114555c 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -216,6 +216,13 @@ skip_if_()
require_selinux_()
{
+ # When in a chroot of an SELinux-enabled system, but with a mock-simulated
+ # SELinux-*disabled* system, recognize that SELinux is disabled system wide:
+ grep 'selinuxfs$' /proc/filesystems > /dev/null \
+ || skip_test_ "this system lacks SELinux support"
+
+ # Independent of whether SELinux is enabled system-wide,
+ # the current file system may lack SELinux support.
case `ls -Zd .` in
'? .'|'unlabeled .')
skip_test_ "this system (or maybe just" \