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 rely on /etc/firewalld/lockdown-whitelist.xml
Date: Fri, 11 Sep 2026 13:21:56 GMT	[thread overview]
Message-ID: <178913291674.1.15141662685832911112.tests-selinux-34b723751329@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 34b723751329077aac4db2c7f6fed386ce402ca3
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2024-09-10T07:53:36+00:00
            Stats  : +5/-3 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/34b723751329077aac4db2c7f6fed386ce402ca3?branch=pr775-checkpolicy-revdeps

            Log:
            do not rely on /etc/firewalld/lockdown-whitelist.xml

Recently, the automated test started failing because the following
file was not present: /etc/firewalld/lockdown-whitelist.xml.

From now on, the test should not fail because of this.

---
diff --git a/selinux-policy/firewalld-and-similar/runtest.sh b/selinux-policy/firewalld-and-similar/runtest.sh
index a4c117c..58d6f4f 100755
--- a/selinux-policy/firewalld-and-similar/runtest.sh
+++ b/selinux-policy/firewalld-and-similar/runtest.sh
@@ -194,8 +194,10 @@ rlJournalStart
         rlRun "echo ${ROOT_PASSWORD} | passwd --stdin root"
         rlRun "rm -rf /run/firewalld"
         rlRun "rm -f /run/xtables.lock"
-        rlRun "mv /etc/firewalld/lockdown-whitelist.xml /etc/firewalld/lockdown-whitelist.xml.orig"
-        rlRun "ln -s /etc/firewalld/lockdown-whitelist.xml.orig /etc/firewalld/lockdown-whitelist.xml"
+        if [ -f /etc/firewalld/lockdown-whitelist.xml ] ; then
+            rlRun "mv /etc/firewalld/lockdown-whitelist.xml /etc/firewalld/lockdown-whitelist.xml.orig"
+            rlRun "ln -s /etc/firewalld/lockdown-whitelist.xml.orig /etc/firewalld/lockdown-whitelist.xml"
+        fi
         # see https://bugzilla.redhat.com/show_bug.cgi?id=907902#c7
         # rlRun "rm -f /usr/lib{,64}/python2.7/site.{pyc,pyo}"
         if ! rlSEDefined ${PROCESS_CONTEXT} ; then
@@ -206,7 +208,7 @@ rlJournalStart
             fi
         fi
         rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "start status" 1
-        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 stop status" 1
         rlRun "rm -f /etc/firewalld/lockdown-whitelist.xml*"
         rlRun "ls -dZ /run/firewalld | grep :firewalld_var_run_t"

                 reply	other threads:[~2026-09-11 13:21 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=178913291674.1.15141662685832911112.tests-selinux-34b723751329@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