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: improve the incorrectly written io_uring checks
Date: Fri, 11 Sep 2026 13:21:31 GMT	[thread overview]
Message-ID: <178913289182.1.4104987593290058596.tests-selinux-6a777019bcc9@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 6a777019bcc92ee9a25b10e92d99c1481f3e8742
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2024-03-27T10:57:41+00:00
            Stats  : +15/-3 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/6a777019bcc92ee9a25b10e92d99c1481f3e8742?branch=pr775-checkpolicy-revdeps

            Log:
            improve the incorrectly written io_uring checks

I wrote certain io_uring checks incorrectly, because I misunderstood
the comments in the RHEL-11792 ticket. They should be correct now.

In order to properly test the io_uring feature, the feature needs to
be enabled (it is by default on Fedora). If the kernel command line
does not contain the "io_uring" string, the automated test adds the
necessary options and reboots the machine.

---
diff --git a/selinux-policy/anon_inode-and-similar/Makefile b/selinux-policy/anon_inode-and-similar/Makefile
index d9db08b..0e381d6 100644
--- a/selinux-policy/anon_inode-and-similar/Makefile
+++ b/selinux-policy/anon_inode-and-similar/Makefile
@@ -54,7 +54,7 @@ $(METADATA): Makefile
 	@echo "Type:            Regression" >> $(METADATA)
 	@echo "TestTime:        30m" >> $(METADATA)
 	@echo "RunFor:          selinux-policy" >> $(METADATA)
-	@echo "Requires:        libselinux policycoreutils selinux-policy selinux-policy-targeted gcc glibc-headers setools-console audit fio" >> $(METADATA)
+	@echo "Requires:        libselinux policycoreutils selinux-policy selinux-policy-targeted gcc glibc-headers setools-console audit fio grubby" >> $(METADATA)
 	@echo "RhtsRequires:    library(selinux-policy/common)" >> $(METADATA)
 	@echo "Priority:        Normal" >> $(METADATA)
 	@echo "License:         GPLv2" >> $(METADATA)

diff --git a/selinux-policy/anon_inode-and-similar/main.fmf b/selinux-policy/anon_inode-and-similar/main.fmf
index 56e34d1..755b0cd 100644
--- a/selinux-policy/anon_inode-and-similar/main.fmf
+++ b/selinux-policy/anon_inode-and-similar/main.fmf
@@ -16,6 +16,7 @@ recommend:
   - setools-console
   - audit
   - fio
+  - grubby
 environment:
     AVC_ERROR: +no_avc_check
 duration: 30m
@@ -27,6 +28,7 @@ tag:
   - NoRHEL7
   - NoRHEL8
   - targeted
+  - reboot
 link:
   - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1954145
   - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1974559

diff --git a/selinux-policy/anon_inode-and-similar/runtest.sh b/selinux-policy/anon_inode-and-similar/runtest.sh
index 583c1ec..9359ba3 100755
--- a/selinux-policy/anon_inode-and-similar/runtest.sh
+++ b/selinux-policy/anon_inode-and-similar/runtest.sh
@@ -29,6 +29,15 @@
 # Include rhts environment
 . /usr/share/beakerlib/beakerlib.sh
 
+if rlIsRHEL 9 || rlIsCentOS 9 ; then
+    if ! grep io_uring /proc/cmdline ; then
+        grubby --update-kernel ALL --args io_uring.enable=y
+        grubby --update-kernel ALL --args sysctl.kernel.io_uring_disabled=0
+        sync
+        rhts-reboot
+    fi
+fi
+
 PACKAGE="selinux-policy"
 
 rlJournalStart
@@ -80,11 +89,12 @@ rlJournalStart
       fi
 
         rlRun "fio --filename=/root/pokus --iodepth=16 --rw=write --ioengine=io_uring --bs=16k --size=2G --numjobs=30 --runtime=100s --group_reporting=1 --name=mytest" 0-255
+        rlRun "fio --filename=/root/pokus --iodepth=16 --rw=write --ioengine=io_uring_cmd --bs=16k --size=2G --numjobs=30 --runtime=100s --group_reporting=1 --name=mytest" 0-255
     rlPhaseEnd
 
     rlPhaseStartTest "RHEL-11792"
-        rlSEMatchPathCon "/dev/ng0n1" "fixed_disk_device_t"
-        rlSESearchRule "allow unconfined_t fixed_disk_device_t : io_uring { cmd } [ ]"
+        rlSESearchRule "allow unconfined_t unconfined_t : io_uring { cmd } [ ]"
+        rlSESearchRule "allow unconfined_service_t unconfined_service_t : io_uring { cmd } [ ]"
     rlPhaseEnd
 
     rlPhaseStartCleanup

                 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=178913289182.1.4104987593290058596.tests-selinux-6a777019bcc9@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