summaryrefslogtreecommitdiff
path: root/testsuite/inplace-selinux.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/inplace-selinux.sh')
-rwxr-xr-xtestsuite/inplace-selinux.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/testsuite/inplace-selinux.sh b/testsuite/inplace-selinux.sh
index 783c3de..f10fedf 100755
--- a/testsuite/inplace-selinux.sh
+++ b/testsuite/inplace-selinux.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2017-2018 Free Software Foundation, Inc.
+# Copyright (C) 2017-2020 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -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"