public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Stepan Broz <sbroz@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: chronyd-and-similar: Adjust test relevancy
Date: Fri, 11 Sep 2026 13:22:40 GMT	[thread overview]
Message-ID: <178913296003.1.15724829137928267838.tests-selinux-e3660e97bce2@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : e3660e97bce27c4abf0d60519844f76aede813f6
            Author : Stepan Broz <sbroz@redhat.com>
            Date   : 2025-04-25T12:28:13+00:00
            Stats  : +26/-24 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/e3660e97bce27c4abf0d60519844f76aede813f6?branch=pr775-checkpolicy-revdeps

            Log:
            chronyd-and-similar: Adjust test relevancy

Do not test "RHEL-82299 + RHEL-82308" and "chronyd-restricted" on RHEL
lower than 9.7 or 10.1 respectively.

---
diff --git a/selinux-policy/chronyd-and-similar/runtest.sh b/selinux-policy/chronyd-and-similar/runtest.sh
index 4e09f92..b88e654 100755
--- a/selinux-policy/chronyd-and-similar/runtest.sh
+++ b/selinux-policy/chronyd-and-similar/runtest.sh
@@ -419,33 +419,35 @@ rlJournalStart
     rlPhaseEnd
     fi
 
-    if rlSEDefined "chronyd_restricted_t" ; then
-    rlPhaseStartTest "RHEL-82299 + RHEL-82308"
-        rlSESearchRule "allow chronyc_t chronyd_restricted_t : unix_dgram_socket { sendto } [ ]"
-        rlSESearchRule "allow chronyd_restricted_t chronyc_t : unix_dgram_socket { sendto } [ ]"
-    rlPhaseEnd
-    fi
+    if ! ( rlIsRHEL 9 && rlIsRHEL "<9.7" ) && ! ( rlIsRHEL 10 && rlIsRHEL "<10.1" ) ; then
+        if rlSEDefined "chronyd_restricted_t" ; then
+        rlPhaseStartTest "RHEL-82299 + RHEL-82308"
+            rlSESearchRule "allow chronyc_t chronyd_restricted_t : unix_dgram_socket { sendto } [ ]"
+            rlSESearchRule "allow chronyd_restricted_t chronyc_t : unix_dgram_socket { sendto } [ ]"
+        rlPhaseEnd
+        fi
 
-    if [ -f ${CHRONYD_RESTRICTED_UNIT_FILE} ]; then
-      rlPhaseStartTest "chronyd-restricted -- bz#2169949 + RHEL-18219"
-        rlRun "systemctl stop ${SERVICE_NAME}"
-        rlRun "mkdir -p ${CHRONYD_RESTRICTED_UNIT_DROPIN_DIR}"
-        if ! grep ^SELinuxContext= ${CHRONYD_RESTRICTED_UNIT_FILE} ; then
-            # temporary configuration change until it becomes a part of the chrony package
-            rlRun "echo -e '[Service]\nSELinuxContext=system_u:system_r:chronyd_restricted_t:s0\n' > ${CHRONYD_RESTRICTED_UNIT_DROPIN_FILE}"
+        if [ -f ${CHRONYD_RESTRICTED_UNIT_FILE} ]; then
+          rlPhaseStartTest "chronyd-restricted -- bz#2169949 + RHEL-18219"
+            rlRun "systemctl stop ${SERVICE_NAME}"
+            rlRun "mkdir -p ${CHRONYD_RESTRICTED_UNIT_DROPIN_DIR}"
+            if ! grep ^SELinuxContext= ${CHRONYD_RESTRICTED_UNIT_FILE} ; then
+                # temporary configuration change until it becomes a part of the chrony package
+                rlRun "echo -e '[Service]\nSELinuxContext=system_u:system_r:chronyd_restricted_t:s0\n' > ${CHRONYD_RESTRICTED_UNIT_DROPIN_FILE}"
+                rlRun "systemctl daemon-reload"
+            fi
+            rlRun "systemctl start ${CHRONYD_RESTRICTED_SERVICE}"
+            sleep 3
+            rlRun "ps -o pid,uid,command,context -C chronyd | grep -1 system_u:system_r:chronyd_restricted_t:"
+            rlRun "systemctl status ${CHRONYD_RESTRICTED_SERVICE}"
+            rlRun "chronyc reload sources" 0,1
+            rlRun "systemctl restart ${CHRONYD_RESTRICTED_SERVICE}"
+            rlRun "systemctl status ${CHRONYD_RESTRICTED_SERVICE}"
+            rlRun "systemctl stop ${CHRONYD_RESTRICTED_SERVICE}"
+            rlRun "rm -f ${CHRONYD_RESTRICTED_UNIT_DROPIN_FILE}"
             rlRun "systemctl daemon-reload"
+          rlPhaseEnd
         fi
-        rlRun "systemctl start ${CHRONYD_RESTRICTED_SERVICE}"
-        sleep 3
-        rlRun "ps -o pid,uid,command,context -C chronyd | grep -1 system_u:system_r:chronyd_restricted_t:"
-        rlRun "systemctl status ${CHRONYD_RESTRICTED_SERVICE}"
-        rlRun "chronyc reload sources" 0,1
-        rlRun "systemctl restart ${CHRONYD_RESTRICTED_SERVICE}"
-        rlRun "systemctl status ${CHRONYD_RESTRICTED_SERVICE}"
-        rlRun "systemctl stop ${CHRONYD_RESTRICTED_SERVICE}"
-        rlRun "rm -f ${CHRONYD_RESTRICTED_UNIT_DROPIN_FILE}"
-        rlRun "systemctl daemon-reload"
-      rlPhaseEnd
     fi
 
     rlPhaseStartCleanup

                 reply	other threads:[~2026-09-11 13:22 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=178913296003.1.15724829137928267838.tests-selinux-e3660e97bce2@fedoraproject.org \
    --to=sbroz@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