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 the targetd-and-similar test
Date: Fri, 11 Sep 2026 13:23:24 GMT	[thread overview]
Message-ID: <178913300469.1.5464983533248242481.tests-selinux-5842e5401506@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 5842e540150649012aca404dff6233b92bb33fb2
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2025-11-13T08:13:39+00:00
            Stats  : +1/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/5842e540150649012aca404dff6233b92bb33fb2?branch=pr775-checkpolicy-revdeps

            Log:
            fix the targetd-and-similar test

The automated test runs the following command which produces an error:

  # targetctl clear
  Traceback (most recent call last):
    File "/usr/bin/targetctl", line 7, in <module>
      sys.exit(main())
               ~~~~^^
    File "/usr/lib/python3.14/site-packages/rtslib/targetctl.py", line 79, in main
      funcs[sys.argv[1]](savefile)
      ~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  TypeError: clear() takes 0 positional arguments but 1 was given
  # echo $?
  1
  #

Even though SELinux is not the cause, the test fails because of the error.
To work around that problem, the expected exit code is between 0 and 255 now.

---
diff --git a/selinux-policy/targetd-and-similar/runtest.sh b/selinux-policy/targetd-and-similar/runtest.sh
index c0530e8..2c11ecb 100755
--- a/selinux-policy/targetd-and-similar/runtest.sh
+++ b/selinux-policy/targetd-and-similar/runtest.sh
@@ -169,7 +169,7 @@ rlJournalStart
     rlPhaseStartTest "real scenario -- standalone service"
         rlRun "rm -f /etc/target/saveconfig.json"
         rlRun "rm -f /etc/target/targetd.yaml"
-        rlRun "targetctl clear"
+        rlRun "targetctl clear" 0-255
         rlRun "targetctl save"
         rlRun "echo \"password: Str0nGp4ssw0rD\" > /etc/target/targetd.yaml"
         rlRun "sed -i \"s/use_lvmetad = 1/use_lvmetad = 0/\" /etc/lvm/lvm.conf"

                 reply	other threads:[~2026-09-11 13:23 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=178913300469.1.5464983533248242481.tests-selinux-5842e5401506@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