File 0001-test-enable-TEST-06-SELINUX-in-openSUSE.patch of Package systemd
From 2fbfbfc5fad59031d0351e600c058b3ad218c338 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Tue, 14 Oct 2025 16:57:57 +0200
Subject: [PATCH] test: enable TEST-06-SELINUX in openSUSE
openSUSE switched to SELinux by default for quite some time now, so this test is
also successful.
---
.github/workflows/mkosi.yml | 2 +-
test/integration-tests/integration-test-wrapper.py | 4 ++--
test/units/TEST-06-SELINUX.sh | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml
index e5535043a5..cb0db68b0a 100644
--- a/.github/workflows/mkosi.yml
+++ b/.github/workflows/mkosi.yml
@@ -137,7 +137,7 @@ jobs:
sanitizers: ""
llvm: 0
cflags: "-Og"
- relabel: no
+ relabel: yes
vm: 0
no_qemu: 0
no_kvm: 0
diff --git a/test/integration-tests/integration-test-wrapper.py b/test/integration-tests/integration-test-wrapper.py
index 6c80c3e654..f923c4fbdd 100755
--- a/test/integration-tests/integration-test-wrapper.py
+++ b/test/integration-tests/integration-test-wrapper.py
@@ -445,8 +445,8 @@ def main() -> None:
summary = Summary.get(args)
# Keep list in sync with TEST-06-SELINUX.sh
- if args.name == 'TEST-06-SELINUX' and summary.distribution not in ('fedora', 'centos'):
- print('Skipping TEST-06-SELINUX, only enabled for Fedora/CentOS', file=sys.stderr)
+ if args.name == 'TEST-06-SELINUX' and summary.distribution not in ('centos', 'fedora', 'opensuse'):
+ print('Skipping TEST-06-SELINUX, only enabled for CentOS/Fedora/openSUSE', file=sys.stderr)
exit(77)
if shell and not sys.stdin.isatty():
diff --git a/test/units/TEST-06-SELINUX.sh b/test/units/TEST-06-SELINUX.sh
index 4ab9224a9e..5cf6e80815 100755
--- a/test/units/TEST-06-SELINUX.sh
+++ b/test/units/TEST-06-SELINUX.sh
@@ -4,8 +4,8 @@ set -eux
set -o pipefail
. /etc/os-release
-if ! [[ "$ID" =~ centos|fedora ]]; then
- echo "Skipping because only CentOS and Fedora support SELinux tests" >>/skipped
+if ! [[ "$ID" =~ centos|fedora|opensuse ]]; then
+ echo "Skipping because only CentOS, Fedora and openSUSE support SELinux tests" >>/skipped
exit 77
fi
--
2.51.0