summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/units/TEST-22-TMPFILES.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/units/TEST-22-TMPFILES.sh b/test/units/TEST-22-TMPFILES.sh
index 9c2a033aa9..85109a1ad5 100755
--- a/test/units/TEST-22-TMPFILES.sh
+++ b/test/units/TEST-22-TMPFILES.sh
@@ -6,6 +6,14 @@ set -o pipefail
# shellcheck source=test/units/test-control.sh
. "$(dirname "$0")"/test-control.sh
+if systemd-detect-virt --quiet --container; then
+ # This comes from the selinux package and tries to write
+ # some files under sysfs, which will be read-only in a container,
+ # so mask it. It's not our tmpfiles.d file anyway.
+ mkdir -p /run/tmpfiles.d/
+ ln -s /dev/null /run/tmpfiles.d/selinux-policy.conf
+fi
+
run_subtests
touch /testok