From: Richard Maw Date: Tue, 30 Apr 2024 17:02:51 +0000 (+0100) Subject: test: Skip TEST-06-SELINUX early if not on fedora/centos X-Git-Tag: v256-rc2~103^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=049b456d9adc4af1290feb15cc8224526fe0dcec;p=thirdparty%2Fsystemd.git test: Skip TEST-06-SELINUX early if not on fedora/centos Other distributions may be able to install selinux but they are not expected to use it. The distribution is tested rather than whether selinux is enabled because it is expected to work on CentOS and Fedora and we want it to fail noisily. --- diff --git a/test/units/testsuite-06.sh b/test/units/testsuite-06.sh index 7fc3c379e57..937a04005ad 100755 --- a/test/units/testsuite-06.sh +++ b/test/units/testsuite-06.sh @@ -3,6 +3,12 @@ set -eux set -o pipefail +. /etc/os-release +if ! [[ "$ID" =~ centos|fedora ]]; then + echo "Skipping because only CentOS and Fedora support SELinux tests" >>/skipped + exit 77 +fi + # Note: ATTOW the following checks should work with both Fedora and upstream reference policy # (with or without MCS/MLS)