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 if definitions of policy interfaces are correct
Date: Fri, 11 Sep 2026 13:21:11 GMT	[thread overview]
Message-ID: <178913287193.1.18400953864685307696.tests-selinux-8d1a0ebb57f6@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 8d1a0ebb57f66075bd94cb4fe239c9921a6da5bc
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2023-11-15T21:16:35+01:00
            Stats  : +46/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/8d1a0ebb57f66075bd94cb4fe239c9921a6da5bc?branch=pr775-checkpolicy-revdeps

            Log:
            test if definitions of policy interfaces are correct

A recent testing of the sepolgen-ifgen tool revealed that certain
policy interface definitions are not correct. The TC reproduces
the situation.

Even though the problem exists (unnoticed) for some time already,
I believe that we should ship valid and correctly defined policy
interfaces.

The TC covers RHEL-2616.

---
diff --git a/selinux-policy/interface-definitions/main.fmf b/selinux-policy/interface-definitions/main.fmf
new file mode 100644
index 0000000..0c2b9a3
--- /dev/null
+++ b/selinux-policy/interface-definitions/main.fmf
@@ -0,0 +1,26 @@
+summary: Are all policy interfaces defined correctly?
+contact: Milos Malik <mmalik@redhat.com>
+component:
+  - selinux-policy
+  - policycoreutils
+recommend:
+  - /usr/bin/sepolgen-ifgen
+  - selinux-policy
+  - selinux-policy-targeted
+test: ./runtest.sh
+framework: beakerlib
+duration: 10m
+enabled: true
+tag:
+  - NoRHEL4
+  - NoRHEL5
+  - targeted
+link:
+  - verifies: https://issues.redhat.com/browse/RHEL-2616
+  - verifies: https://issues.redhat.com/browse/RHEL-16185
+adjust:
+  - enabled: false
+    when: distro == rhel-4, rhel-5
+    because: decision was made not to fix the problem there
+extra-nitrate: TC#0615941
+id: a6785475-8446-47cc-9167-f2d6ad52d58e

diff --git a/selinux-policy/interface-definitions/runtest.sh b/selinux-policy/interface-definitions/runtest.sh
new file mode 100755
index 0000000..6d80041
--- /dev/null
+++ b/selinux-policy/interface-definitions/runtest.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+rlJournalStart
+    rlPhaseStartSetup
+        rlAssertRpm selinux-policy
+        rlAssertRpm policycoreutils
+    rlPhaseEnd
+
+    rlPhaseStartTest "RHEL-2616 + RHEL-16185"
+        rlRun "sepolgen-ifgen -v -d 2>/dev/null | sort | uniq > output.txt"
+        rlRun "grep -i missing output.txt" 1
+    rlPhaseEnd
+
+    rlPhaseStartCleanup
+        rm -f output.txt
+    rlPhaseEnd
+rlJournalEnd
+

                 reply	other threads:[~2026-09-11 13:21 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=178913287193.1.18400953864685307696.tests-selinux-8d1a0ebb57f6@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