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: enable tests if their required packages are available
Date: Fri, 11 Sep 2026 13:20:18 GMT [thread overview]
Message-ID: <178913281880.1.2148078100256250947.tests-selinux-162cc22a2e2d@fedoraproject.org> (raw)
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
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=178913281880.1.2148078100256250947.tests-selinux-162cc22a2e2d@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