public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: fix gating tests which fail or time out
@ 2026-09-11 13:22 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 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 : 1938ff73cb11eb23b5914ea683b3c71c8e9472ec
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2025-02-04T19:46:35+01:00
            Stats  : +16/-13 in 6 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/1938ff73cb11eb23b5914ea683b3c71c8e9472ec?branch=pr775-checkpolicy-revdeps

            Log:
            fix gating tests which fail or time out

Several automated tests fail during gating because of:
 * known test code issues
 * too short duration
 * additional SELinux policy changes

The identified problems should be fixed now.

---
diff --git a/selinux-policy/ModemManager-and-similar/runtest.sh b/selinux-policy/ModemManager-and-similar/runtest.sh
index 63470fb..4ad9eb0 100755
--- a/selinux-policy/ModemManager-and-similar/runtest.sh
+++ b/selinux-policy/ModemManager-and-similar/runtest.sh
@@ -83,7 +83,7 @@ rlJournalStart
         else
             DESTINATION="org.freedesktop.ModemManager1"
         fi
-        rlRun "gdbus introspect --system --object-path / --dest ${DESTINATION} >& /dev/null"
+        rlRun "gdbus introspect --system --object-path / --dest ${DESTINATION} >& /dev/null" 0,1
         sleep 1
         rlRun "ps -efZ | grep -v grep | grep ${PROCESS_NAME}"
         rlRun "ps -efZ | grep -v grep | grep \"${PROCESS_CONTEXT}.*${PROCESS_NAME}\""
@@ -115,7 +115,7 @@ rlJournalStart
         sleep 1
         rlRun "service systemd-logind restart"
         sleep 1
-        rlRun "restorecon -Rv /var /run -e /var/ARTIFACTS" 0-255
+        rlRun "restorecon -Rv /etc /var /run -e /var/ARTIFACTS" 0-255
         rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "restart status stop status" 1
     rlPhaseEnd
     fi

diff --git a/selinux-policy/boothd-and-similar/Makefile b/selinux-policy/boothd-and-similar/Makefile
index 6e66c75..fa8e9cf 100644
--- a/selinux-policy/boothd-and-similar/Makefile
+++ b/selinux-policy/boothd-and-similar/Makefile
@@ -52,7 +52,7 @@ $(METADATA): Makefile
 	@echo "Path:            $(TEST_DIR)" >> $(METADATA)
 	@echo "Description:     SELinux interferes with boothd and related programs" >> $(METADATA)
 	@echo "Type:            Regression" >> $(METADATA)
-	@echo "TestTime:        10m" >> $(METADATA)
+	@echo "TestTime:        20m" >> $(METADATA)
 	@echo "RunFor:          selinux-policy" >> $(METADATA)
 	@echo "RunFor:          booth" >> $(METADATA)
 	@echo "Requires:        audit libselinux libselinux-utils policycoreutils selinux-policy selinux-policy-targeted setools-console booth-arbitrator booth-core /usr/sbin/service net-tools systemd-container" >> $(METADATA)

diff --git a/selinux-policy/boothd-and-similar/main.fmf b/selinux-policy/boothd-and-similar/main.fmf
index 5539ab8..2b30bee 100644
--- a/selinux-policy/boothd-and-similar/main.fmf
+++ b/selinux-policy/boothd-and-similar/main.fmf
@@ -22,7 +22,7 @@ recommend:
   - systemd-container
 environment:
     AVC_ERROR: +no_avc_check
-duration: 10m
+duration: 20m
 enabled: true
 tag:
   - NoRHEL4

diff --git a/selinux-policy/rngd-and-similar/runtest.sh b/selinux-policy/rngd-and-similar/runtest.sh
index e88d2a8..ca55d19 100755
--- a/selinux-policy/rngd-and-similar/runtest.sh
+++ b/selinux-policy/rngd-and-similar/runtest.sh
@@ -169,7 +169,7 @@ rlJournalStart
         rlRun "setsebool daemons_use_tty on"
         rlRun "runcon system_u:system_r:initrc_t:s0 bash -c 'rngd -l'" 0-255
         rlRun "setsebool daemons_use_tty off"
-        rlRun "restorecon -Rv /run /var -e /var/ARTIFACTS" 0-255
+        rlRun "restorecon -Rv /etc /run /var -e /var/ARTIFACTS" 0-255
         rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "restart status" 1
         if ${DROP_PRIV} ; then
             rlLog "modifying the /etc/sysconfig/rngd file"
@@ -181,7 +181,7 @@ rlJournalStart
             fi
         fi
         rlRun "grep ^RNGD_ARGS= /etc/sysconfig/rngd"
-        rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "restart status stop status" 1
+        rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "restart status stop status" 2
     rlPhaseEnd
 
     rlPhaseStartCleanup

diff --git a/selinux-policy/systemd-machined-and-similar/runtest.sh b/selinux-policy/systemd-machined-and-similar/runtest.sh
index 61fade7..a15fd7d 100755
--- a/selinux-policy/systemd-machined-and-similar/runtest.sh
+++ b/selinux-policy/systemd-machined-and-similar/runtest.sh
@@ -36,6 +36,7 @@ SERVICE_PACKAGE="systemd-container"
 SERVICE_NAME="systemd-machined"
 PROCESS_NAME="systemd-machined"
 PROCESS_CONTEXT="systemd_machined_t"
+TEST_POLICY_NEEDED=${TEST_POLICY_NEEDED:-false}
 INSTALL_OPTION=""
 if yum --help | grep -q use-host-config ; then
     INSTALL_OPTION="${INSTALL_OPTION} --use-host-config"
@@ -124,9 +125,10 @@ rlJournalStart
         rlRun "mkdir -pZ /var/lib/machines/test"
         rlRun "dnf -y --installroot=/var/lib/machines/test/ install dhcp-client dnf filesystem glibc glibc-langpack-en glibc-langpack-de iproute iputils less passwd systemd vim-minimal ${INSTALL_OPTION}"
         rlRun "du -sh /var/lib/machines/test"
-        # TODO: remove next 2 lines once the BZs are fixed
-        rlRun "semodule -i testpolicy.cil"
-        rlRun "semodule -lfull | grep testpolicy"
+        if ${TEST_POLICY_NEEDED} ; then
+            rlRun "semodule -i testpolicy.cil"
+            rlRun "semodule -lfull | grep testpolicy"
+        fi
         rlRun "systemctl start systemd-nspawn@test"
         rlRun "systemctl status systemd-nspawn@test"
         rlRun "ps -efZ | grep -e ${PROCESS_CONTEXT} -e unconfined_service_t"
@@ -142,9 +144,10 @@ rlJournalStart
         rlRun "machinectl kill test"
         rlRun "machinectl terminate test"
         rlRun "systemctl stop systemd-nspawn@test"
-        # TODO: remove next 2 lines once the BZs are fixed
-        rlRun "semodule -r testpolicy"
-        rlRun "semodule -lfull | grep testpolicy" 1
+        if ${TEST_POLICY_NEEDED} ; then
+            rlRun "semodule -r testpolicy"
+            rlRun "semodule -lfull | grep testpolicy" 1
+        fi
         rlRun "rm -rf /var/lib/machines/test"
     rlPhaseEnd
 

diff --git a/selinux-policy/virt-install-additional/runtest.sh b/selinux-policy/virt-install-additional/runtest.sh
index 3e087ce..775ee38 100755
--- a/selinux-policy/virt-install-additional/runtest.sh
+++ b/selinux-policy/virt-install-additional/runtest.sh
@@ -166,7 +166,7 @@ rlJournalStart
         rlRun "service virtqemud start"
         rlRun "service virtnetworkd start"
         rlRun "service virtstoraged start"
-        rlRun "virt-install --memory 128 --pxe --virt-type qemu --os-variant alpinelinux3.8 --disk source.protocol=ssh,source.name=/var/lib/libvirt/images/test.img,source.host0.name=10.73.210.25,source.host0.port=22 --wait 0 --name test5"
+        rlRun "virt-install --memory 128 --pxe --virt-type qemu --os-variant alpinelinux3.8 --disk source.protocol=ssh,source.name=/var/lib/libvirt/images/test.img,source.host0.name=localhost,source.host0.port=22 --wait 0 --name test5"
         sleep 30
         rlRun "virsh list"
         rlRun "virsh list | grep 'test5.*running'"

^ 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: fix gating tests which fail or time out Milos Malik

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