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: setsebool: Do not test aliases for non-existing booleans
Date: Fri, 11 Sep 2026 13:22:26 GMT [thread overview]
Message-ID: <178913294650.1.1143841368336618981.tests-selinux-d55f7ad6aec7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : d55f7ad6aec7dce0818851e44891a0eb1b163327
Author : Petr Lautrbach <lautrbach@redhat.com>
Date : 2025-03-10T12:20:06+01:00
Stats : +8/-3 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/d55f7ad6aec7dce0818851e44891a0eb1b163327?branch=pr775-checkpolicy-revdeps
Log:
setsebool: Do not test aliases for non-existing booleans
In CentOS Stream 10 some modules were moved from selinux-policy to
selinux-policy-epel which is available only in EPEL. It caused problem
with non-existing booleans and their aliases. With this change, an alias
is not checked when a new boolean does not exist.
Fixes:
Error getting active value for puppet_manage_all_files
[ PASS ] :: Command 'getsebool puppet_manage_all_files 2>&1 | tee /tmp/tmp.nx2NlWq1zd' (Expected 0, got 0)
[ BEGIN ] :: Running 'getsebool puppetagent_manage_all_files 2>&1 | tee -a /tmp/tmp.nx2NlWq1zd'
Error getting active value for puppetagent_manage_all_files
[ PASS ] :: Command 'getsebool puppetagent_manage_all_files 2>&1 | tee -a /tmp/tmp.nx2NlWq1zd' (Expected 0, got 0)
[ BEGIN ] :: Running 'uniq -c /tmp/tmp.nx2NlWq1zd | grep '2 ''
[ FAIL ] :: Command 'uniq -c /tmp/tmp.nx2NlWq1zd | grep '2 '' (Expected 0, got 1)
---
diff --git a/policycoreutils/setsebool/runtest.sh b/policycoreutils/setsebool/runtest.sh
index 8678b1b..04878f9 100755
--- a/policycoreutils/setsebool/runtest.sh
+++ b/policycoreutils/setsebool/runtest.sh
@@ -114,9 +114,14 @@ rlJournalStart
for LINE in `cat /etc/selinux/*/booleans.subs_dist | sort | uniq | tr -s ' ' | tr ' ' ':'` ; do
OLD_BOOLEAN_NAME=`echo ${LINE} | cut -d : -f 1`
NEW_BOOLEAN_NAME=`echo ${LINE} | cut -d : -f 2`
- rlRun "getsebool ${OLD_BOOLEAN_NAME} 2>&1 | tee ${OUTPUT_FILE}"
- rlRun "getsebool ${NEW_BOOLEAN_NAME} 2>&1 | tee -a ${OUTPUT_FILE}"
- rlRun "uniq -c ${OUTPUT_FILE} | grep '2 '"
+ # do not test this if the new boolean does not exist in the policy
+ if getsebool ${NEW_BOOLEAN_NAME} &> /dev/null; then
+ rlRun "getsebool ${OLD_BOOLEAN_NAME} 2>&1 | tee ${OUTPUT_FILE}"
+ rlRun "getsebool ${NEW_BOOLEAN_NAME} 2>&1 | tee -a ${OUTPUT_FILE}"
+ rlRun "uniq -c ${OUTPUT_FILE} | grep '2 '"
+ else
+ rlLog "$NEW_BOOLEAN_NAME does not exist, skip"
+ fi
done
rlPhaseEnd
fi
reply other threads:[~2026-09-11 13:22 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=178913294650.1.1143841368336618981.tests-selinux-d55f7ad6aec7@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