public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: modify tests to run successfully on CentOS stream machines
@ 2026-09-11 13:22 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 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 : e978f12992d355740aec3d72575536ec1b8a347c
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2024-11-06T13:57:29+01:00
            Stats  : +5/-5 in 4 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/e978f12992d355740aec3d72575536ec1b8a347c?branch=pr775-checkpolicy-revdeps

            Log:
            modify tests to run successfully on CentOS stream machines

Some tests failed when executed on CentOS-stream machines because of
insufficient code conditions. From now on, this problem should not
happen anymore.

---
diff --git a/libselinux/get_default_context/runtest.sh b/libselinux/get_default_context/runtest.sh
index 83aae88..94feae4 100755
--- a/libselinux/get_default_context/runtest.sh
+++ b/libselinux/get_default_context/runtest.sh
@@ -39,7 +39,7 @@ rlJournalStart
         rlRun "sestatus"
     rlPhaseEnd
 
-    if rlIsRHEL ">=8.3" || rlIsFedora; then
+    if rlIsRHEL ">=8.3" || rlIsFedora || rlIsCentOS ">=8.3" ; then
     rlPhaseStartTest "#1879368"
         rlRun "cat ./reproducer.py"
         rlRun "./reproducer.py" 0

diff --git a/libselinux/validatetrans/runtest.sh b/libselinux/validatetrans/runtest.sh
index 5b86d48..ab468eb 100755
--- a/libselinux/validatetrans/runtest.sh
+++ b/libselinux/validatetrans/runtest.sh
@@ -33,7 +33,7 @@ PACKAGE="libselinux"
 
 rlJournalStart
     # validatetrans utility is available since Fedora 32
-    if ! rlIsRHEL ">8" && ! rlIsFedora ">31"; then
+    if ! rlIsRHEL ">8" && ! rlIsFedora ">31" && ! rlIsCentOS ">8" ; then
         rlLog "Not applicable to this OS version."
         rlJournalEnd
         exit 0

diff --git a/libsemanage/semanage-handle-functions/runtest.sh b/libsemanage/semanage-handle-functions/runtest.sh
index b7fd6f0..b3e26a3 100755
--- a/libsemanage/semanage-handle-functions/runtest.sh
+++ b/libsemanage/semanage-handle-functions/runtest.sh
@@ -37,7 +37,7 @@ rlJournalStart
         rlAssertRpm "glibc"
         rlAssertRpm "gcc"
 
-        if rlIsRHEL ">=7" || rlIsFedora; then
+        if rlIsRHEL ">=7" || rlIsFedora || rlIsCentOS ">=7" ; then
             rlRun -l "gcc test_root.c           -o test_root            -lsemanage -Wall -Wextra -std=c99"
         fi
 
@@ -53,7 +53,7 @@ rlJournalStart
         ERR_ABORT=134
     rlPhaseEnd
 
-    if rlIsRHEL ">=7" || rlIsFedora; then
+    if rlIsRHEL ">=7" || rlIsFedora || rlIsCentOS ">=7" ; then
     rlPhaseStartTest "semanage_root, semanage_test_root"
         rlRun "./test_root init"
         rlRun "./test_root handle"

diff --git a/libsemanage/semanage-seuser-functions/runtest.sh b/libsemanage/semanage-seuser-functions/runtest.sh
index 1b87c8e..766a800 100755
--- a/libsemanage/semanage-seuser-functions/runtest.sh
+++ b/libsemanage/semanage-seuser-functions/runtest.sh
@@ -51,7 +51,7 @@ rlJournalStart
             if rlIsRHEL '<=6'; then
               SEUSERS_PATH="/etc/selinux/$POLICY_TYPE/seusers"
             fi
-        elif rlIsRHEL '>=8'; then
+        elif rlIsRHEL '>=8' || rlIsCentOS '>=8' ; then
             SEUSERS_PATH="/var/lib/selinux/$POLICY_TYPE/active/seusers"
         fi
 

^ 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: modify tests to run successfully on CentOS stream machines Milos Malik

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