public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if definitions of policy interfaces are correct
@ 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 : 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
+

^ 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: test if definitions of policy interfaces are correct Milos Malik

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