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 the actions recognized by sedismod and sedispol
Date: Fri, 11 Sep 2026 13:21:13 GMT [thread overview]
Message-ID: <178913287335.1.15808806433197360227.tests-selinux-ef67d0deea00@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : ef67d0deea003d009673bd22fe0b8f7a7999f53a
Author : Milos Malik <mmalik@redhat.com>
Date : 2023-11-23T19:25:59+00:00
Stats : +24/-0 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/ef67d0deea003d009673bd22fe0b8f7a7999f53a?branch=pr775-checkpolicy-revdeps
Log:
test the actions recognized by sedismod and sedispol
Since SELinux user-space 3.6 was introduced, the sedismod and sedispol
programs are able to perform various actions non-interactively when
the following options are supplied: -a, --actions. In previous versions,
these actions were only usable in the interactive mode.
From now on, the automated test also covers these options.
---
diff --git a/checkpolicy/sedismod/runtest.sh b/checkpolicy/sedismod/runtest.sh
index c15b882..8227ccb 100755
--- a/checkpolicy/sedismod/runtest.sh
+++ b/checkpolicy/sedismod/runtest.sh
@@ -74,6 +74,18 @@ rlJournalStart
done
rlPhaseEnd
+ if sedismod --help | grep -q actions ; then
+ rlPhaseStartTest "test the non-interactive actions"
+ rlLog "introduced in version 3.6"
+ for ACTION in 1 2 3 4 5 6 7 8 9 0 a b c u F v ; do
+ rlRun "sedismod -a ${ACTION} ${POLICY_FILE} > ${ACTION}.txt"
+ rlRun "ls -l ${ACTION}.txt"
+ rlRun "test -s ${ACTION}.txt"
+ rlRun "rm -f ${ACTION}.txt"
+ done
+ rlPhaseEnd
+ fi
+
rlPhaseStartCleanup
rlRun "rm -f ${OUTPUT_FILE} ${POLICY_FILE}"
rlPhaseEnd
diff --git a/checkpolicy/sedispol/runtest.sh b/checkpolicy/sedispol/runtest.sh
index 3a182e1..ac198ff 100755
--- a/checkpolicy/sedispol/runtest.sh
+++ b/checkpolicy/sedispol/runtest.sh
@@ -68,6 +68,18 @@ rlJournalStart
rlRun "grep permisions ${OUTPUT_FILE}" 1
rlPhaseEnd
+ if sedispol --help | grep -q actions ; then
+ rlPhaseStartTest "test the non-interactive actions"
+ rlLog "introduced in version 3.6"
+ for ACTION in 1 2 3 4 5 6 8 c b C r t a p u F ; do
+ rlRun "sedispol -a ${ACTION} ${POLICY_FILE} > ${ACTION}.txt"
+ rlRun "ls -l ${ACTION}.txt"
+ rlRun "test -s ${ACTION}.txt"
+ rlRun "rm -f ${ACTION}.txt"
+ done
+ rlPhaseEnd
+ fi
+
rlPhaseStartCleanup
rlRun "rm -f ${OUTPUT_FILE}"
rlPhaseEnd
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=178913287335.1.15808806433197360227.tests-selinux-ef67d0deea00@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