>From a9cb52bcf39f0ee307301ac73c11acb24372b9d8 Mon Sep 17 00:00:00 2001 From: Assaf Gordon Date: Sun, 2 Jun 2019 01:14:00 -0600 Subject: [PATCH 2/2] 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 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. --- testsuite/inplace-selinux.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testsuite/inplace-selinux.sh b/testsuite/inplace-selinux.sh index a560764..6dacf12 100755 --- a/testsuite/inplace-selinux.sh +++ b/testsuite/inplace-selinux.sh @@ -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" -- 2.11.0