]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fmf: Don't fail if we can't put selinux in permissive mode
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 8 Jan 2025 09:25:05 +0000 (10:25 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 8 Jan 2025 09:25:05 +0000 (10:25 +0100)
The tests might be running unprivileged or in an environment without
selinux so let's not fail if we can't put it in permissive mode.

test/fmf/integration-tests/test.sh

index 4984fb119b571cf72761b31e65b26a9d3dcf4004..fe139567bdf06284de255068ebfa4760658c92a0 100755 (executable)
@@ -4,8 +4,8 @@
 set -eux
 set -o pipefail
 
-# Switch SELinux to permissive, since the tests don't set proper contexts
-setenforce 0
+# Switch SELinux to permissive if possible, since the tests don't set proper contexts
+setenforce 0 || true
 
 # Allow running the integration tests downstream in dist-git with something like
 # the following snippet which makes the dist-git sources available in $TMT_SOURCE_DIR: