public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: enable tests if their required packages are available
@ 2026-09-11 13:20 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:20 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 162cc22a2e2d28aa86166d4545d2ad334b229bc5
Author : Milos Malik <mmalik@redhat.com>
Date : 2022-11-23T10:53:11+01:00
Stats : +25/-27 in 8 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/162cc22a2e2d28aa86166d4545d2ad334b229bc5?branch=pr775-checkpolicy-revdeps
Log:
enable tests if their required packages are available
Some tests were ending prematurely because their required packages
were not available. Fortunately, more and more packages are available
in the EPEL repository now and the situation has changed.
Some tests require packages which are not available on any RHEL and
most likely will not be available there at all.
---
diff --git a/selinux-policy/blueman-and-similar/runtest.sh b/selinux-policy/blueman-and-similar/runtest.sh
index a407ba3..2530481 100755
--- a/selinux-policy/blueman-and-similar/runtest.sh
+++ b/selinux-policy/blueman-and-similar/runtest.sh
@@ -39,6 +39,12 @@ PROCESS_NAME="blueman-mechanism"
PROCESS_CONTEXT="blueman_t"
rlJournalStart
+ if rlIsRHEL ; then
+ rlLog "Not applicable to this OS version."
+ rlJournalEnd
+ exit 0
+ fi
+
rlPhaseStartSetup
rlRun "rlImport 'selinux-policy/common'"
rlSESatisfyRequires
diff --git a/selinux-policy/bz733494-amanda-and-similar/runtest.sh b/selinux-policy/bz733494-amanda-and-similar/runtest.sh
index 8e832c8..80214f1 100755
--- a/selinux-policy/bz733494-amanda-and-similar/runtest.sh
+++ b/selinux-policy/bz733494-amanda-and-similar/runtest.sh
@@ -38,12 +38,6 @@ PROCESS_NAME="amandad"
PROCESS_CONTEXT="amanda_t"
rlJournalStart
- if ! rpm -q amanda amanda-client amanda-server ; then
- rlLog "Required packages are not available/installed."
- rlJournalEnd
- exit 0
- fi
-
rlPhaseStartSetup
rlRun "rlImport 'selinux-policy/common'"
rlSESatisfyRequires
diff --git a/selinux-policy/dhclient-and-similar/main.fmf b/selinux-policy/dhclient-and-similar/main.fmf
index 9c98fb1..e3cdb8f 100644
--- a/selinux-policy/dhclient-and-similar/main.fmf
+++ b/selinux-policy/dhclient-and-similar/main.fmf
@@ -26,6 +26,10 @@ link:
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2035117
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2093709
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2094155
+adjust:
+- when: trigger == build
+ enabled: false
+ because: the test may mess up the IP address
extra-summary: /CoreOS/selinux-policy/Regression/dhclient-and-similar
extra-task: /CoreOS/selinux-policy/Regression/dhclient-and-similar
extra-nitrate: TC#0613884
diff --git a/selinux-policy/dhcpcd-and-similar/runtest.sh b/selinux-policy/dhcpcd-and-similar/runtest.sh
index edb8185..79fad7a 100755
--- a/selinux-policy/dhcpcd-and-similar/runtest.sh
+++ b/selinux-policy/dhcpcd-and-similar/runtest.sh
@@ -40,6 +40,12 @@ PROCESS_CONTEXT="dhcpc_t"
rlJournalStart
rlPhaseStartSetup
+ if rlIsRHEL ; then
+ rlLog "Not applicable to this OS version."
+ rlJournalEnd
+ exit 0
+ fi
+
rlRun "rlImport 'selinux-policy/common'"
rlSESatisfyRequires
rlAssertRpm ${PACKAGE}
diff --git a/selinux-policy/fedora-third-party-and-similar/runtest.sh b/selinux-policy/fedora-third-party-and-similar/runtest.sh
index 54c4031..0903a5e 100755
--- a/selinux-policy/fedora-third-party-and-similar/runtest.sh
+++ b/selinux-policy/fedora-third-party-and-similar/runtest.sh
@@ -38,6 +38,12 @@ PROCESS_NAME="fedora-third-party"
PROCESS_CONTEXT="fedoratp_t"
rlJournalStart
+ if rlIsRHEL ; then
+ rlLog "Not applicable to this OS version."
+ rlJournalEnd
+ exit 0
+ fi
+
rlPhaseStartSetup
rlRun "rlImport 'selinux-policy/common'"
rlSESatisfyRequires
@@ -71,7 +77,7 @@ rlJournalStart
fi
rlRun "touch /run/ostree-booted"
rlSEService - ${SERVICE_NAME} - ${PROCESS_CONTEXT} "start status" 1
- rlRun "restorecon -Rv /etc /var /run"
+ rlRun "restorecon -Rv /etc /var /run -e /var/ARTIFACTS" 0-255
rlRun "fedora-third-party list"
rlSEService - ${SERVICE_NAME} - ${PROCESS_CONTEXT} "restart status stop status" 1
rlPhaseEnd
diff --git a/selinux-policy/sslh-and-similar/runtest.sh b/selinux-policy/sslh-and-similar/runtest.sh
index 0bfdece..7e33840 100755
--- a/selinux-policy/sslh-and-similar/runtest.sh
+++ b/selinux-policy/sslh-and-similar/runtest.sh
@@ -39,12 +39,6 @@ PROCESS_NAME="sslh"
PROCESS_CONTEXT="sslh_t"
rlJournalStart
- if ! rpm -q ${SERVICE_PACKAGE} ; then
- rlLog "Required packages are not available/installed."
- rlJournalEnd
- exit 0
- fi
-
rlPhaseStartSetup
rlRun "rlImport 'selinux-policy/common'"
rlSESatisfyRequires
@@ -96,7 +90,7 @@ rlJournalStart
PROCESS_CONTEXT="unconfined_service_t"
fi
rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "start status" 1
- rlRun "restorecon -Rv /run /var"
+ rlRun "restorecon -Rv /run /var -e /var/ARTIFACTS" 0-255
rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "restart status stop status" 1
rlPhaseEnd
diff --git a/selinux-policy/tlp-and-similar/runtest.sh b/selinux-policy/tlp-and-similar/runtest.sh
index 84e6f4f..469a1db 100755
--- a/selinux-policy/tlp-and-similar/runtest.sh
+++ b/selinux-policy/tlp-and-similar/runtest.sh
@@ -39,12 +39,6 @@ PROCESS_NAME="tlp"
PROCESS_CONTEXT="tlp_t"
rlJournalStart
- if ! rlIsRHEL 7 8 && ! rlIsFedora ; then
- rlLog "Not applicable to this OS version."
- rlJournalEnd
- exit 0
- fi
-
rlPhaseStartSetup
rlRun "rlImport 'selinux-policy/common'"
rlSESatisfyRequires
diff --git a/selinux-policy/usbmuxd-and-similar/runtest.sh b/selinux-policy/usbmuxd-and-similar/runtest.sh
index f96d253..0b1dc0f 100755
--- a/selinux-policy/usbmuxd-and-similar/runtest.sh
+++ b/selinux-policy/usbmuxd-and-similar/runtest.sh
@@ -39,12 +39,6 @@ PROCESS_NAME="usbmuxd"
PROCESS_CONTEXT="usbmuxd_t"
rlJournalStart
- if ! rpm -q ${SERVICE_PACKAGE} ; then
- rlLog "Required packages are not available/installed."
- rlJournalEnd
- exit 0
- fi
-
rlPhaseStartSetup
rlRun "rlImport 'selinux-policy/common'"
rlSESatisfyRequires
@@ -105,7 +99,7 @@ rlJournalStart
PROCESS_CONTEXT="unconfined_service_t"
fi
rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "start status" 1
- rlRun "restorecon -Rv /var /run"
+ rlRun "restorecon -Rv /var /run -e /var/ARTIFACTS" 0-255
rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "restart status stop status" 1
rlPhaseEnd
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:20 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:20 [tests/selinux] pr775-checkpolicy-revdeps: enable tests if their required packages are available Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox