public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: kernel/...: fix --skip-broken detection for DNF5
Date: Fri, 11 Sep 2026 13:21:42 GMT	[thread overview]
Message-ID: <178913290219.1.1265204621903095057.tests-selinux-9e9a717326ec@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 9e9a717326ecb963dfe3c181a427a4e4f45fc879
            Author : Ondrej Mosnacek <omosnace@redhat.com>
            Date   : 2024-06-07T09:58:36+02:00
            Stats  : +9/-3 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/9e9a717326ecb963dfe3c181a427a4e4f45fc879?branch=pr775-checkpolicy-revdeps

            Log:
            kernel/...: fix --skip-broken detection for DNF5

The detection of this flag is broken with DNF5, because it now only
appears under `dnf install --help`. Also, DNF5 now implements the logic
we want (skipping packages that are not available, rather than "broken")
under a new --skip-unavailable flag.

Therefore, detect both using `dnf install --help` and also check for
--skip-unavailable first.

Without this fix the tests try to install each package one by one with
DNF5, which is suboptimal.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>

---
diff --git a/kernel/mount-options-memleak/runtest.sh b/kernel/mount-options-memleak/runtest.sh
index f7fc666..8d21797 100755
--- a/kernel/mount-options-memleak/runtest.sh
+++ b/kernel/mount-options-memleak/runtest.sh
@@ -16,7 +16,9 @@ fi
 function installDepsYum() {
     local yum="$1"; shift
 
-    if "$yum" --help | grep -q -- --skip-broken; then
+    if "$yum" install --help | grep -q -- --skip-unavailable; then
+        "$yum" install -y --skip-unavailable $*
+    elif "$yum" install --help | grep -q -- --skip-broken; then
         "$yum" install -y --skip-broken $*
     else
         for req in $*; do

diff --git a/kernel/selinux-testsuite/runtest.sh b/kernel/selinux-testsuite/runtest.sh
index 09f063a..40846f2 100755
--- a/kernel/selinux-testsuite/runtest.sh
+++ b/kernel/selinux-testsuite/runtest.sh
@@ -82,7 +82,9 @@ function kver_gt() { ! kver_le "$1"; }
 function installDepsYum() {
     local yum="$1"; shift
 
-    if "$yum" --help | grep -q -- --skip-broken; then
+    if "$yum" install --help | grep -q -- --skip-unavailable; then
+        "$yum" install -y --skip-unavailable $*
+    elif "$yum" install --help | grep -q -- --skip-broken; then
         "$yum" install -y --skip-broken $*
     else
         for req in $*; do

diff --git a/kernel/xfrm-refcount-underflow/runtest.sh b/kernel/xfrm-refcount-underflow/runtest.sh
index 895a1af..5822f60 100755
--- a/kernel/xfrm-refcount-underflow/runtest.sh
+++ b/kernel/xfrm-refcount-underflow/runtest.sh
@@ -10,7 +10,9 @@
 function installDepsYum() {
     local yum="$1"; shift
 
-    if "$yum" --help | grep -q -- --skip-broken; then
+    if "$yum" install --help | grep -q -- --skip-unavailable; then
+        "$yum" install -y --skip-unavailable $*
+    elif "$yum" install --help | grep -q -- --skip-broken; then
         "$yum" install -y --skip-broken $*
     else
         for req in $*; do

                 reply	other threads:[~2026-09-11 13:21 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=178913290219.1.1265204621903095057.tests-selinux-9e9a717326ec@fedoraproject.org \
    --to=omosnace@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