public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: quit immediately if the anon_inode class is not defined in policy
@ 2026-09-11 13:19 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:19 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : c0794774fb34ebbda0ffaa061a855e07e9758562
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2022-01-27T17:27:40+01:00
            Stats  : +7/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/c0794774fb34ebbda0ffaa061a855e07e9758562?branch=pr775-checkpolicy-revdeps

            Log:
            quit immediately if the anon_inode class is not defined in policy

It makes no sense to run the test in environments where the anon_inode
class is not defined.

---
diff --git a/selinux-policy/anon_inode-and-similar/Makefile b/selinux-policy/anon_inode-and-similar/Makefile
index d7b7a26..f7866fa 100644
--- a/selinux-policy/anon_inode-and-similar/Makefile
+++ b/selinux-policy/anon_inode-and-similar/Makefile
@@ -54,7 +54,7 @@ $(METADATA): Makefile
 	@echo "Type:            Regression" >> $(METADATA)
 	@echo "TestTime:        30m" >> $(METADATA)
 	@echo "RunFor:          selinux-policy" >> $(METADATA)
-	@echo "Requires:        libselinux policycoreutils selinux-policy selinux-policy-targeted gcc glibc-headers" >> $(METADATA)
+	@echo "Requires:        libselinux policycoreutils selinux-policy selinux-policy-targeted gcc glibc-headers setools-console audit" >> $(METADATA)
 	@echo "RhtsRequires:    library(selinux-policy/common)" >> $(METADATA)
 	@echo "Priority:        Normal" >> $(METADATA)
 	@echo "License:         GPLv2" >> $(METADATA)

diff --git a/selinux-policy/anon_inode-and-similar/runtest.sh b/selinux-policy/anon_inode-and-similar/runtest.sh
index 0a2bf68..11ab2a0 100755
--- a/selinux-policy/anon_inode-and-similar/runtest.sh
+++ b/selinux-policy/anon_inode-and-similar/runtest.sh
@@ -33,6 +33,12 @@
 PACKAGE="selinux-policy"
 
 rlJournalStart
+    if ! seinfo -c anon_inode | grep -q anon_inode ; then
+        rlLog "Not applicable to this OS version."
+        rlJournalEnd
+        exit 0
+    fi
+
     rlPhaseStartSetup
         rlRun "rlImport 'selinux-policy/common'"
         rlSESatisfyRequires

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

only message in thread, other threads:[~2026-09-11 13:19 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:19 [tests/selinux] pr775-checkpolicy-revdeps: quit immediately if the anon_inode class is not defined in policy Milos Malik

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