public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milos Malik <mmalik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: test the lockdown class only if it defined
Date: Fri, 11 Sep 2026 13:19:37 GMT	[thread overview]
Message-ID: <178913277733.1.1518734444923351553.tests-selinux-7323ae1899ff@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 7323ae1899ffee8699fd2949758ef92837457f7f
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2022-02-03T14:35:12+01:00
            Stats  : +2/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/7323ae1899ffee8699fd2949758ef92837457f7f?branch=pr775-checkpolicy-revdeps

            Log:
            test the lockdown class only if it defined

The lockdown class was removed from SELinux policy in BZ#2017848.
There are test phases in various automated tests which look for
policy rules related to the lockdown class. These tests were failing.
From now on, they should not fail because the problematic test phases
are skipped.

---
diff --git a/selinux-policy/lockdown-class/runtest.sh b/selinux-policy/lockdown-class/runtest.sh
index c008272..9bed740 100755
--- a/selinux-policy/lockdown-class/runtest.sh
+++ b/selinux-policy/lockdown-class/runtest.sh
@@ -33,7 +33,7 @@
 PACKAGE="selinux-policy"
 
 rlJournalStart
-    if rlIsRHEL '<9' ; then
+    if ! seinfo -c | grep -q lockdown ; then
         rlLog "Not applicable to this OS version."
         rlJournalEnd
         exit 0

diff --git a/selinux-policy/systemd-modules-load-and-similar/runtest.sh b/selinux-policy/systemd-modules-load-and-similar/runtest.sh
index 2f69ac8..d62bd6f 100755
--- a/selinux-policy/systemd-modules-load-and-similar/runtest.sh
+++ b/selinux-policy/systemd-modules-load-and-similar/runtest.sh
@@ -126,7 +126,7 @@ rlJournalStart
         rlRun "lsmod | grep rdma"
         rlRun "ausearch -m AVC -m USER_AVC --start $tst_Time" 1
         rlRun "systemctl stop rdma-load-modules@rdma.service"
-        if ! rlIsRHEL 8 ; then
+        if seinfo -c | grep -q lockdown ; then
             rlSESearchRule "allow systemd_modules_load_t systemd_modules_load_t : lockdown { confidentiality } [ ]"
         fi
     rlPhaseEnd

                 reply	other threads:[~2026-09-11 13:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178913277733.1.1518734444923351553.tests-selinux-7323ae1899ff@fedoraproject.org \
    --to=mmalik@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox