diff options
author | Mathieu Bridon <bochecha@fedoraproject.org> | 2011-03-28 09:39:53 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-03-28 12:00:12 +0200 |
commit | 17a7e4592727b44d0a5550d1340e354786109af7 (patch) | |
tree | 614a457334c948fff48f6d73c83390e737eb0d68 /tests | |
parent | fde07ff436ef19cc85a8bb626535cc18fdb9d588 (diff) | |
download | coreutils-17a7e4592727b44d0a5550d1340e354786109af7.tar.xz |
tests: avoid unwarranted failure in mock-simulated non-SELinux env.
* tests/init.cfg (require_selinux_): Skip the test also when
/proc/filesystems does not list selinuxfs.
Add comments.
* cfg.mk (exclude_file_name_regexp--sc_file_system): Exempt
tests/init.cfg, with its use of /proc/filesystems.
Based on the patch by Mathieu Bridon in http://debbugs.gnu.org/8359.
More discussion in http://bugzilla.redhat.com/573111
Diffstat (limited to 'tests')
-rw-r--r-- | tests/init.cfg | 7 |
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" \ |