public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] main: kernel/selinux-testsuite: use rlIsRHELLike where appropriate
@ 2026-10-15  9:13 Ondrej Mosnacek
  0 siblings, 0 replies; only message in thread
From: Ondrej Mosnacek @ 2026-10-15  9:13 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : main
            Commit : 5eee05bfee9671378403846374bb08bb5f6106a2
            Author : Ondrej Mosnacek <omosnace@redhat.com>
            Date   : 2026-10-15T10:10:17+02:00
            Stats  : +5/-5 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/5eee05bfee9671378403846374bb08bb5f6106a2?branch=main

            Log:
            kernel/selinux-testsuite: use rlIsRHELLike where appropriate

Use rlIsRHELLike instead of rlIsRHEL where it makes sense in order to
ensure that the test works well on CentOS Stream et al.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>

---
diff --git a/kernel/selinux-testsuite/runtest.sh b/kernel/selinux-testsuite/runtest.sh
index ea43c5a..c795807 100755
--- a/kernel/selinux-testsuite/runtest.sh
+++ b/kernel/selinux-testsuite/runtest.sh
@@ -222,7 +222,7 @@ rlJournalStart
             selinuxfs=/selinux
         fi
 
-        if rlIsRHEL '<7.3'; then
+        if rlIsRHELLike '<7.3'; then
             use_cil=n
         else
             use_cil=y
@@ -311,7 +311,7 @@ rlJournalStart
 
         # needed to avoid a flood of AVCs when run via restraint
         # (RHEL-6 doesn't have unconfined_service_t)
-        if ! rlIsRHEL '<7'; then
+        if ! rlIsRHELLike '<7'; then
             rlRun "sed -i 's/type unconfined_t;/type unconfined_t, unconfined_service_t;/' policy/test_policy.if" 0
             rlRun "sed -i 's/\\(allow \\\$1 initrc_t:fd use;\\)/\\1 allow \$1 unconfined_service_t:fd use;/' policy/test_policy.if" 0
         else
@@ -325,11 +325,11 @@ rlJournalStart
             rlRun "sed -i 's/3\.18/3.9/' $file" 0 \
                 "Fix up kernel version in nnp test"
         done
-        if rlIsRHEL "<8.2"; then
+        if rlIsRHELLike "<8.2"; then
             rlRun "sed -i '/SUBDIRS += bpf/d;/export CFLAGS += -DHAVE_BPF/d' tests/Makefile" 0 \
                 "RHEL < 8.2 doesn't ship libbpf => disable BPF subtests"
         fi
-        if rlIsRHEL "<9"; then
+        if rlIsRHELLike "<9"; then
             # CONFIG_KEY_DH_OPERATIONS not enabled on RHEL-8 :(
             # on RHEL-7, KEYCTL_DH_COMPUTE is not defined in the header
             exclude_tests+=" keys"
@@ -352,7 +352,7 @@ rlJournalStart
 EOF
         fi
 
-        if rlIsRHEL; then
+        if rlIsRHELLike; then
             if kver_lt "3.10.0-349"; then
                 # c4684bbdac07 [security] selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID
                 # da74590f6501 [security] selinux: reject setexeccon() on MNT_NOSUID applications with -EACCES

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

only message in thread, other threads:[~2026-10-15  9:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15  9:13 [tests/selinux] main: kernel/selinux-testsuite: use rlIsRHELLike where appropriate Ondrej Mosnacek

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