public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milos Malik <mmalik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: do not fail when /run/chrony-dhcp/ is missing
Date: Fri, 11 Sep 2026 13:20:52 GMT	[thread overview]
Message-ID: <178913285294.1.9904380585476141693.tests-selinux-bd2e475cd97d@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-09-11 13:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178913285294.1.9904380585476141693.tests-selinux-bd2e475cd97d@fedoraproject.org \
    --to=mmalik@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox