public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: selinux-policy: Add test for bug1942267
@ 2026-09-11 13:19 Amith Kumar
  0 siblings, 0 replies; only message in thread
From: Amith Kumar @ 2026-09-11 13:19 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : c07abebad6a78b7e4cde4851971a5d5e4509fbca
            Author : Amith Kumar <apeetham@redhat.com>
            Date   : 2021-07-29T18:28:51+00:00
            Stats  : +14/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/c07abebad6a78b7e4cde4851971a5d5e4509fbca?branch=pr775-checkpolicy-revdeps

            Log:
            selinux-policy: Add test for bug1942267

Add an rdma test case to selinux-policy test suite which verifies
bug1942267. The fix checks for avc generated by rdma service.

---
diff --git a/selinux-policy/systemd-modules-load-and-similar/Makefile b/selinux-policy/systemd-modules-load-and-similar/Makefile
index 97e3bb3..27ec3f9 100644
--- a/selinux-policy/systemd-modules-load-and-similar/Makefile
+++ b/selinux-policy/systemd-modules-load-and-similar/Makefile
@@ -55,7 +55,7 @@ $(METADATA): Makefile
 	@echo "TestTime:        10m" >> $(METADATA)
 	@echo "RunFor:          selinux-policy" >> $(METADATA)
 	@echo "RunFor:          systemd" >> $(METADATA)
-	@echo "Requires:        audit initscripts libselinux libselinux-utils policycoreutils selinux-policy selinux-policy-targeted setools-console openssh-clients systemd-udev" >> $(METADATA)
+	@echo "Requires:        audit initscripts libselinux libselinux-utils policycoreutils rdma-core selinux-policy selinux-policy-targeted setools-console openssh-clients systemd-udev" >> $(METADATA)
 	@echo "RhtsRequires:    library(selinux-policy/common)" >> $(METADATA)
 	@echo "Environment:     AVC_ERROR=+no_avc_check" >> $(METADATA)
 	@echo "Priority:        Normal" >> $(METADATA)
@@ -80,6 +80,7 @@ $(METADATA): Makefile
 	@echo "Bug:             1829700" >> $(METADATA) # Fedora 32
 	@echo "Bug:             1833502" >> $(METADATA) # Fedora 32
 	@echo "Bug:             1838933" >> $(METADATA) # Fedora 32
+	@echo "Bug:             1942267" >> $(METADATA) # Fedora 32
 
 	rhts-lint $(METADATA)
 

diff --git a/selinux-policy/systemd-modules-load-and-similar/runtest.sh b/selinux-policy/systemd-modules-load-and-similar/runtest.sh
index 4c896ba..8d0adca 100755
--- a/selinux-policy/systemd-modules-load-and-similar/runtest.sh
+++ b/selinux-policy/systemd-modules-load-and-similar/runtest.sh
@@ -117,6 +117,18 @@ rlJournalStart
         rlRun "rm -f /etc/modules-load.d/${KERNEL_MODULE}.conf"
     rlPhaseEnd
 
+    rlPhaseStartTest "bz#1942267"
+        tst_Time="$(date '+%T')"
+        # Install kernel-module matching the running kernel version
+        rlRun "dnf -y install kernel-modules-$(uname -r)"
+        rlRun "systemctl start rdma-load-modules@rdma.service"
+        rlRun "systemctl status rdma-load-modules@rdma.service"
+        rlRun "lsmod | grep rdma"
+        rlRun "ausearch -m AVC -m USER_AVC --start $tst_Time" 1
+        rlRun "systemctl stop rdma-load-modules@rdma.service"
+        rlSESearchRule "allow systemd_modules_load_t systemd_modules_load_t : lockdown { confidentiality } [ ]"
+    rlPhaseEnd
+
     rlPhaseStartCleanup
         sleep 2
         rlSECheckAVC

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

only message in thread, other threads:[~2026-09-11 13:19 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:19 [tests/selinux] pr775-checkpolicy-revdeps: selinux-policy: Add test for bug1942267 Amith Kumar

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