tests: inplace-selinux.sh: skip if SELinux is not supported
Avoid false-positive failure on system with SELinux enabled when SED is built without SELinux suppport. Reported by Jeffrey Walton <noloader@gmail.com> in https://bugs.gnu.org/35997 . * testsuite/inplace-selinux.sh: Call 'sed --version' to check if sed was built with SELinux support before continuing with the test.
This commit is contained in:
1 parent
07ef8a3138
commit
a9cb52bcf3
1 file changed
+5
@@ -18,6 +18,11 @@
|
||||
print_ver_ sed
|
||||
require_selinux_
|
||||
|
||||
sed --version | grep -q "with SELinux" \
|
||||
|| skip_ "sed built without SELinux support"
|
||||
sed --version | grep -q "^SELinux is enabled" \
|
||||
|| skip_ "sed reports SELinux is disabled on this system"
|
||||
|
||||
touch a || framework_failure_
|
||||
chcon -u system_u a || skip_ "chcon doesn't work"
|
||||
chcon -u user_u a || skip_ "chcon doesn't work"
|
||||
|
||||
Reference in new issue
Block a user