public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Petr Lautrbach <lautrbach@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: Does `sepolicy generate --application` detect writeable locations?
Date: Fri, 11 Sep 2026 13:20:55 GMT [thread overview]
Message-ID: <178913285530.1.3119603870587700611.tests-selinux-91109dac9f61@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 91109dac9f6185d0e3968db2812b8708a44a35d2
Author : Petr Lautrbach <lautrbach@redhat.com>
Date : 2023-08-09T10:57:04+00:00
Stats : +47/-0 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/91109dac9f6185d0e3968db2812b8708a44a35d2?branch=pr775-checkpolicy-revdeps
Log:
Does `sepolicy generate --application` detect writeable locations?
Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
---
diff --git a/policycoreutils/sepolicy-generate-application/main.fmf b/policycoreutils/sepolicy-generate-application/main.fmf
new file mode 100644
index 0000000..5e1cb37
--- /dev/null
+++ b/policycoreutils/sepolicy-generate-application/main.fmf
@@ -0,0 +1,11 @@
+summary: Does `sepolicy generate --application ...` detect writeable locations?
+test: ./test.sh
+framework: beakerlib
+component:
+ - policycoreutils
+require:
+ - policycoreutils
+ - policycoreutils-devel
+ - mariadb-server
+ - abrt
+tier: '3'
diff --git a/policycoreutils/sepolicy-generate-application/test.sh b/policycoreutils/sepolicy-generate-application/test.sh
new file mode 100755
index 0000000..4e8c868
--- /dev/null
+++ b/policycoreutils/sepolicy-generate-application/test.sh
@@ -0,0 +1,36 @@
+#!/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 "tmp=\$(mktemp -d)" 0 "Create tmp directory"
+ rlRun "pushd $tmp"
+ rlRun "set -o pipefail"
+ rlPhaseEnd
+
+ rlPhaseStartTest "/usr/bin/mysqld_safe"
+ rlRun "mkdir policy"
+ rlRun "sepolicy generate -p policy --application /usr/bin/mysqld_safe"
+ rlRun "cat policy/*fc"
+ for dir in `rpm -ql --dump mariadb-server | sed -n -E '\%\/var\/(log|run|lib)[[:graph:]]* [[:alnum:]]* [[:alnum:]]* [[:alnum:]]* 04.*%s%^([^ ]*).*%\1%p'`; do
+ rlRun "grep $dir policy/*.fc"
+ done
+ rlRun "rm -rf policy"
+ rlPhaseEnd
+
+ rlPhaseStartTest "/usr/sbin/abrtd"
+ rlRun "mkdir policy"
+ rlRun "sepolicy generate -p policy --application /usr/sbin/abrtd"
+ rlRun "cat policy/*fc"
+ for dir in `rpm -ql --dump abrt | sed -n -E '\%\/var\/(log|run|lib)[[:graph:]]* [[:alnum:]]* [[:alnum:]]* [[:alnum:]]* 04.*%s%^([^ ]*).*%\1%p'`; do
+ rlRun "grep $dir policy/*.fc"
+ done
+ rlRun "rm -rf policy"
+ rlPhaseEnd
+
+ rlPhaseStartCleanup
+ rlRun "popd"
+ rlRun "rm -r $tmp" 0 "Remove tmp directory"
+ 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=178913285530.1.3119603870587700611.tests-selinux-91109dac9f61@fedoraproject.org \
--to=lautrbach@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