public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: fix tests which fail in other environments
@ 2026-09-11 13:22 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:22 UTC (permalink / raw)
To: git-commits
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/"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:22 [tests/selinux] pr775-checkpolicy-revdeps: fix tests which fail in other environments Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox