public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if sepolicy manpage can generate manpage in HTML form
@ 2026-09-11 13:20 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:20 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : b6ec2fee8d1cf35c356fa2bde6820f6f5cfebefd
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2023-01-17T11:43:37+01:00
            Stats  : +47/-7 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/b6ec2fee8d1cf35c356fa2bde6820f6f5cfebefd?branch=pr775-checkpolicy-revdeps

            Log:
            test if sepolicy manpage can generate manpage in HTML form

The sepolicy tool can generate man pages for specific SELinux domains.
When the sepolicy tool was instructed to generate man pages in HTML
form (--web), the generated HTML files were very incomplete. The TC
reproduces the situation.

The newly added TC checks if the sepolicy manpage command works
correctly. The checks related to the sepolicy manpage command
were removed from the sepolicy-generate TC.

The TC covers BZ#1989840.

---
diff --git a/policycoreutils/sepolicy-generate/runtest.sh b/policycoreutils/sepolicy-generate/runtest.sh
index e51e519..f79213f 100755
--- a/policycoreutils/sepolicy-generate/runtest.sh
+++ b/policycoreutils/sepolicy-generate/runtest.sh
@@ -106,16 +106,10 @@ rlJournalStart
         rlRun "rm -rf mypolicy"
     rlPhaseEnd
 
-    rlPhaseStartTest "sepolicy manpage --web, bz1854639"
-        rlRun "sepolicy manpage --web -d zebra_t"
-        rlRun "ls /tmp/*release*" 0 "Html file with OS name exists."
-        rlRun "cat /tmp/*release* > /tmp/testfile"
-        rlAssertGrep "href=zebra.html" "/tmp/testfile"
-    rlPhaseEnd
-
     rlPhaseStartCleanup
         rlRun "popd"
         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
     rlPhaseEnd
 rlJournalPrintText
 rlJournalEnd
+

diff --git a/policycoreutils/sepolicy-manpage/main.fmf b/policycoreutils/sepolicy-manpage/main.fmf
new file mode 100644
index 0000000..eae4499
--- /dev/null
+++ b/policycoreutils/sepolicy-manpage/main.fmf
@@ -0,0 +1,19 @@
+summary: sepolicy manpage sanity test
+description: Does the sepolicy manpage command work correctly?
+contact: Milos Malik <mmalik@redhat.com>
+component:
+  - policycoreutils
+framework: beakerlib
+recommend:
+  - /usr/bin/sepolicy
+duration: 10m
+enabled: true
+tier: 3
+link:
+  - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1854639
+  - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1989840
+adjust:
+  - enabled: false
+    when: distro == rhel-4, rhel-5, rhel-6
+    because: the sepolicy command is not available there
+

diff --git a/policycoreutils/sepolicy-manpage/runtest.sh b/policycoreutils/sepolicy-manpage/runtest.sh
new file mode 100755
index 0000000..32c12a3
--- /dev/null
+++ b/policycoreutils/sepolicy-manpage/runtest.sh
@@ -0,0 +1,27 @@
+#!/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
+        rlRun "rpm -qa | grep policycoreutils"
+    rlPhaseEnd
+
+    rlPhaseStartTest "sepolicy manpage --web, bz#1854639 + bz#1989840"
+        rlRun "sepolicy manpage --web -d zebra_t"
+        if rlIsRHEL 7 8 ; then
+            rlRun "ls -l /tmp/*release*" 0 "Html file with OS name exists."
+            rlRun "cat /tmp/*release* > /tmp/testfile"
+        else
+            rlRun "ls -l /tmp/index.html" 0 "HTML file exists"
+            rlRun "cat /tmp/index.html > /tmp/testfile"
+        fi
+        rlAssertGrep "href=zebra.html" "/tmp/testfile"
+        rlRun "ls -l /tmp/zebra.html"
+    rlPhaseEnd
+
+    rlPhaseStartCleanup
+        rlRun "rm -f /tmp/zebra* /tmp/index.html /tmp/*release*"
+    rlPhaseEnd
+rlJournalEnd
+

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

only message in thread, other threads:[~2026-09-11 13:20 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:20 [tests/selinux] pr775-checkpolicy-revdeps: test if sepolicy manpage can generate manpage in HTML form Milos Malik

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