public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: systemd-modules-load-and-similar: Adjust test relevancy
@ 2026-09-11 13:22 Stepan Broz
  0 siblings, 0 replies; only message in thread
From: Stepan Broz @ 2026-09-11 13:22 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : c2ff2147e96af0d22626b8f6b38fc3579a657768
            Author : Stepan Broz <sbroz@redhat.com>
            Date   : 2025-04-17T18:19:59+00:00
            Stats  : +7/-3 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/c2ff2147e96af0d22626b8f6b38fc3579a657768?branch=pr775-checkpolicy-revdeps

            Log:
            systemd-modules-load-and-similar: Adjust test relevancy

Do not test RHEL-54591 on RHEL-9.5 or lower. Fixed in RHEL-9.6 by RHEL-61453.

---
diff --git a/selinux-policy/systemd-modules-load-and-similar/runtest.sh b/selinux-policy/systemd-modules-load-and-similar/runtest.sh
index 8b7172c..616028f 100755
--- a/selinux-policy/systemd-modules-load-and-similar/runtest.sh
+++ b/selinux-policy/systemd-modules-load-and-similar/runtest.sh
@@ -105,9 +105,11 @@ rlJournalStart
     rlPhaseEnd
 
     rlPhaseStartTest "real scenario -- standalone service"
-        rlRun "mkdir -p /run/modprobe.d"
-        rlRun "echo 'blacklist cipher_null' > /run/modprobe.d/test.conf"
-        rlRun "restorecon -Rv /run/modprobe.d"
+        if ! rlIsRHEL "<9.6" ; then
+            rlRun "mkdir -p /run/modprobe.d"
+            rlRun "echo 'blacklist cipher_null' > /run/modprobe.d/test.conf"
+            rlRun "restorecon -Rv /run/modprobe.d"
+        fi
         rlRun "echo ${ROOT_PASSWORD} | passwd --stdin root"
         rlRun "echo ${KERNEL_MODULE} > /etc/modules-load.d/${KERNEL_MODULE}.conf"
         rlRun "lsmod"
@@ -142,6 +144,7 @@ rlJournalStart
         rlSESearchRule "allow systemd_modules_load_t kmsg_device_t : chr_file { write } [ ]"
     rlPhaseEnd
 
+    if ! ( rlIsRHEL 9 && rlIsRHEL "<9.6" ) ; then
     rlPhaseStartTest "RHEL-54591"
         rlSEMatchPathCon "/usr/lib/systemd/systemd-modules-load" "systemd_modules_load_exec_t"
         rlSEMatchPathCon "/run/modprobe.d" "modules_conf_t"
@@ -149,6 +152,7 @@ rlJournalStart
         rlSESearchRule "allow systemd_modules_load_t modules_conf_t : file { getattr open read } [ ]"
     rlPhaseEnd
     fi
+    fi
 
     rlPhaseStartCleanup
         sleep 2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:22 [tests/selinux] pr775-checkpolicy-revdeps: systemd-modules-load-and-similar: Adjust test relevancy Stepan Broz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox