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: fix tests which fail in other environments
Date: Fri, 11 Sep 2026 13:22:25 GMT [thread overview]
Message-ID: <178913294551.1.4698740245364408607.tests-selinux-a310ff9f85e8@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : a310ff9f85e85cbaafd58df5b1e31673eaa64146
Author : Milos Malik <mmalik@redhat.com>
Date : 2025-02-27T08:25:04+01:00
Stats : +9/-3 in 4 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/a310ff9f85e85cbaafd58df5b1e31673eaa64146?branch=pr775-checkpolicy-revdeps
Log:
fix tests which fail in other environments
The modified tests were failing because:
* the running restorecond service causes problems to the subsequent tests
* an irrelevant bug was tested
* the bind component is available in multiple versions
* rpm output contained unnecessary whitespaces
These issues should be fixed now.
---
diff --git a/policycoreutils/restorecond_pointer_abuse/runtest.sh b/policycoreutils/restorecond_pointer_abuse/runtest.sh
index 2056c98..57463a3 100755
--- a/policycoreutils/restorecond_pointer_abuse/runtest.sh
+++ b/policycoreutils/restorecond_pointer_abuse/runtest.sh
@@ -80,8 +80,9 @@ rlJournalStart
rlPhaseStartCleanup
rlRun "rlFileRestore" 0
- rlServiceRestore restorecond
+ rlServiceStop restorecond
rm -f ${OUTPUT_FILE}
rlPhaseEnd
rlJournalPrintText
rlJournalEnd
+
diff --git a/selinux-policy/boothd-and-similar/runtest.sh b/selinux-policy/boothd-and-similar/runtest.sh
index db907b6..213acb1 100755
--- a/selinux-policy/boothd-and-similar/runtest.sh
+++ b/selinux-policy/boothd-and-similar/runtest.sh
@@ -72,7 +72,9 @@ rlJournalStart
rlPhaseStartTest "RHEL-57104 + RHEL-58060"
rlSESearchRule "allow boothd_t kernel_t : unix_stream_socket { connectto } [ ]"
rlPhaseEnd
+ fi
+ if ! rlIsRHEL 8 9 && ! rlIsCentOS 8 9 ; then
rlPhaseStartTest "RHEL-75471"
rlSESearchRule "allow boothd_t systemd_machined_t : unix_stream_socket { connectto } [ ]"
rlPhaseEnd
diff --git a/selinux-policy/bz562833-chrooted-named-file-contexts/runtest.sh b/selinux-policy/bz562833-chrooted-named-file-contexts/runtest.sh
index 7b6ddd4..074f2bb 100755
--- a/selinux-policy/bz562833-chrooted-named-file-contexts/runtest.sh
+++ b/selinux-policy/bz562833-chrooted-named-file-contexts/runtest.sh
@@ -38,7 +38,7 @@ rlJournalStart
rlSESatisfyRequires
rlAssertRpm ${PACKAGE}
rlAssertRpm ${PACKAGE}-targeted
- rlAssertRpm bind
+ rlRun "rpm -qa | grep bind | sort"
rlServiceStop ` rlSEListServices 53 `
rlFileBackup /etc/shadow
@@ -222,7 +222,7 @@ rlJournalStart
rlRun "getsebool -a | grep named"
rlRun "echo ${ROOT_PASSWORD} | passwd --stdin root"
rlSEService ${ROOT_PASSWORD} named named named_t "start status" 1
- rlRun "restorecon -Rv /run /var -e /var/ARTIFACTS" 0-255
+ rlRun "restorecon -Rv /etc /run /var -e /var/ARTIFACTS" 0-255
rlRun "runcon system_u:system_r:initrc_t:s0 bash -c 'rndc querylog'"
rlRun "runcon system_u:system_r:initrc_t:s0 bash -c 'rndc dumpdb'"
rlRun "runcon system_u:system_r:initrc_t:s0 bash -c 'rndc tsig-list'"
diff --git a/selinux-policy/rpm-suppress-stderr/test.sh b/selinux-policy/rpm-suppress-stderr/test.sh
index 37c2846..17a537f 100755
--- a/selinux-policy/rpm-suppress-stderr/test.sh
+++ b/selinux-policy/rpm-suppress-stderr/test.sh
@@ -45,6 +45,9 @@ rlJournalStart
rlRun "chroot $tmp/merged/ /usr/bin/rpm -i $RPMS 2> error.log"
# warnings can be ignored/removed
rlRun "sed -i 's/^warning.*$//' error.log"
+ # whitespaces can be ignored/removed
+ rlRun "sed -i 's/^[[:space:]]*$//' error.log"
+ rlRun "sed -i '/^$/d' error.log"
rlAssert0 "error.log should be empty" `stat -c "%s" error.log`
rlRun "cat error.log"
rlRun "fusermount -u $tmp/merged/"
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=178913294551.1.4698740245364408607.tests-selinux-a310ff9f85e8@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