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 sepolicy manpage can generate manpage in HTML form
Date: Fri, 11 Sep 2026 13:20:24 GMT [thread overview]
Message-ID: <178913282402.1.11502165102553667266.tests-selinux-b6ec2fee8d1c@fedoraproject.org> (raw)
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
+
reply other threads:[~2026-09-11 13:20 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=178913282402.1.11502165102553667266.tests-selinux-b6ec2fee8d1c@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