tests: fix false failure with disabled SELinux support
commit37e001d20930bacf188ab9725d063e205b195e34
authorPádraig Brady <P@draigBrady.com>
Thu, 5 Dec 2013 00:02:41 +0000 (5 00:02 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 5 Dec 2013 00:27:11 +0000 (5 00:27 +0000)
tree8d78991eaa48e59e407bafd3ef3b966f3259000f
parent0013de3e603162081c4464ea1f7ad3285f633d78
tests: fix false failure with disabled SELinux support

This could trigger on SELinux systems where we build --qithout-selinux
or where the SELinux development libraries are not installed.

* init.cfg (require_selinux_enforcing_): Call require_selinux_()
to determine if the current build supports SELinux.  This avoids
a false failure in tests/mkdir/selinux.sh where only mkdir would
determine that SELinux was disabled and thus ignore invalid contexts.
(require_selinux_): Refactor a little to distinguish whether it's
the build or the (file) system that doesn't support SELinux.
init.cfg