public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: chronyd-and-similar: Adjust test relevancy
@ 2026-09-11 13:22 Stepan Broz
0 siblings, 0 replies; only message in thread
From: Stepan Broz @ 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 : 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
^ 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: chronyd-and-similar: Adjust test relevancy Stepan Broz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox