public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: do not fail when /run/chrony-dhcp/ is missing
@ 2026-09-11 13:20 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:20 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : bd2e475cd97def515f6efa7a01886a6560312814
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2023-07-19T06:49:54+00:00
            Stats  : +5/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/bd2e475cd97def515f6efa7a01886a6560312814?branch=pr775-checkpolicy-revdeps

            Log:
            do not fail when /run/chrony-dhcp/ is missing

The /run/chrony-dhcp/ directory is not created on RHEL-8.x during
the test scenario. The TC should not fail because of this fact.

---
diff --git a/selinux-policy/dhclient-and-similar/runtest.sh b/selinux-policy/dhclient-and-similar/runtest.sh
index 8b988d6..f9824d0 100755
--- a/selinux-policy/dhclient-and-similar/runtest.sh
+++ b/selinux-policy/dhclient-and-similar/runtest.sh
@@ -44,7 +44,7 @@ rlJournalStart
         rlAssertRpm ${SERVICE_PACKAGE}
 
         rlServiceStart ${SERVICE_NAME}
-        rlFileBackup /run/chrony-dhcp
+        rlFileBackup --missing-ok /run/chrony-dhcp
 
         rlSESetEnforce
         rlSEStatus
@@ -73,11 +73,14 @@ rlJournalStart
 
     rlPhaseStartTest "real scenario"
         rlRun "rm -rf /run/chrony-dhcp"
+        rlRun "restorecon -Rv /run /var -e /var/ARTIFACTS" 0-255
         rlRun "dhclient"
         DHCLIENT_PID=`pgrep dhclient`
         rlRun "ps -efZ | grep dhclient"
         rlRun "ps -efZ | grep ':dhcpc_t:.*dhclient'"
-        rlRun "ls -alZ /run/chrony-dhcp"
+        if ! rlIsRHEL 8 ; then
+            rlRun "ls -alZ /run/chrony-dhcp"
+        fi
     rlPhaseEnd
 
     rlPhaseStartCleanup

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

only message in thread, other threads:[~2026-09-11 13:20 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:20 [tests/selinux] pr775-checkpolicy-revdeps: do not fail when /run/chrony-dhcp/ is missing Milos Malik

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