public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: skip the real scenario if the service is missing
@ 2026-09-11 13:19 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:19 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : d33212fe88616f2b58d7525f871366d2e4687405
Author : Milos Malik <mmalik@redhat.com>
Date : 2021-06-24T13:36:18+02:00
Stats : +2/-0 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/d33212fe88616f2b58d7525f871366d2e4687405?branch=pr775-checkpolicy-revdeps
Log:
skip the real scenario if the service is missing
The systemd-timesyncd service is present on both RHEL-8 and Fedora,
but may not be present on other RHELs, even though the policy which
confines the systemd-timesyncd program is present there.
If the systemd-timesyncd service is not present then the TC checks
policy definitions only (types, rules, file context patterns etc.)
If the systemd-timesyncd service is present then the TC will also
test basic actions of the service (start, restart, status etc.)
---
diff --git a/selinux-policy/systemd-timesyncd-and-similar/runtest.sh b/selinux-policy/systemd-timesyncd-and-similar/runtest.sh
index 9fc18cf..f9b1b7f 100755
--- a/selinux-policy/systemd-timesyncd-and-similar/runtest.sh
+++ b/selinux-policy/systemd-timesyncd-and-similar/runtest.sh
@@ -109,6 +109,7 @@ rlJournalStart
rlSESearchRule "allow systemd_timedated_t var_run_t : dir { watch } [ ]"
rlPhaseEnd
+ if systemctl list-units | grep -q ${SERVICE_NAME} ; then
rlPhaseStartTest "real scenario -- standalone service"
rlRun "echo ${ROOT_PASSWORD} | passwd --stdin root"
if ! rlSEDefined ${PROCESS_CONTEXT} ; then
@@ -118,6 +119,7 @@ rlJournalStart
rlRun "restorecon -Rv /run /var" 0-255
rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "restart status stop status" 1
rlPhaseEnd
+ fi
rlPhaseStartCleanup
sleep 2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:19 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:19 [tests/selinux] pr775-checkpolicy-revdeps: skip the real scenario if the service 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