public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: fix the synce4l test
@ 2026-09-11 13:21 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:21 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : fd803298d8465fc8d58275005395d346fffb1fe4
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2024-03-11T07:19:31+00:00
            Stats  : +4/-3 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/fd803298d8465fc8d58275005395d346fffb1fe4?branch=pr775-checkpolicy-revdeps

            Log:
            fix the synce4l test

The _cmd patterns may not be present in the /etc/synce4l.conf file.
The automated test should not fail because of them.

---
diff --git a/selinux-policy/synce4l-and-similar/runtest.sh b/selinux-policy/synce4l-and-similar/runtest.sh
index 583c41f..01529a5 100755
--- a/selinux-policy/synce4l-and-similar/runtest.sh
+++ b/selinux-policy/synce4l-and-similar/runtest.sh
@@ -64,9 +64,10 @@ rlJournalStart
     rlPhaseEnd
 
     rlPhaseStartTest "real scenario -- standalone service"
-        rlRun "grep _cmd /etc/synce4l.conf"
-        rlRun "sed -i 's/^\(.*_cmd\) .*$/\1 echo 0/' /etc/synce4l.conf"
-        rlRun "grep _cmd /etc/synce4l.conf"
+        if grep -q _cmd /etc/synce4l.conf ; then
+            rlRun "sed -i 's/^\(.*_cmd\) .*$/\1 echo 0/' /etc/synce4l.conf"
+            rlRun "grep _cmd /etc/synce4l.conf"
+        fi
         if ! rlSEDefined ${PROCESS_CONTEXT} ; then
             # for RHELs where the SELinux domain does not exist yet
             PROCESS_CONTEXT="unconfined_service_t"

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:21 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:21 [tests/selinux] pr775-checkpolicy-revdeps: fix the synce4l test Milos Malik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox