public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] main: fix test code issues in the qat-service test
@ 2026-09-10 10:25 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-10 10:25 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : main
            Commit : 5fc349dc5ebdd80b7e3c8f01d24d7d967cb0ab38
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2026-09-10T10:23:35+00:00
            Stats  : +16/-7 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/5fc349dc5ebdd80b7e3c8f01d24d7d967cb0ab38?branch=main

            Log:
            fix test code issues in the qat-service test

The test code was written with incomplete knowledge of the qat
service functions and related SELinux policy checks. It should
be fixed now.

The TC also covers the RHEL-251355 bug which is a clone of the
RHEL-211089 bug for RHEL 9.

---
diff --git a/selinux-policy/qat-service-and-similar/main.fmf b/selinux-policy/qat-service-and-similar/main.fmf
index 0accdbb..6034179 100644
--- a/selinux-policy/qat-service-and-similar/main.fmf
+++ b/selinux-policy/qat-service-and-similar/main.fmf
@@ -37,6 +37,7 @@ tag:
 link:
   - verifies: https://issues.redhat.com/browse/RHEL-211077
   - verifies: https://issues.redhat.com/browse/RHEL-211089
+  - verifies: https://issues.redhat.com/browse/RHEL-251355
 adjust+:
   - enabled: false
     when: distro == rhel-4, rhel-5, rhel-6, rhel-7
@@ -46,4 +47,5 @@ adjust+:
     because: the qatlib package is not available there
 extra-summary: /CoreOS/selinux-policy/Regression/qat-service-and-similar
 extra-task: /CoreOS/selinux-policy/Regression/qat-service-and-similar
-
+extra-nitrate: TC#0620332
+id: 5ed71da6-94c5-491a-8f88-1d78900d93d4

diff --git a/selinux-policy/qat-service-and-similar/runtest.sh b/selinux-policy/qat-service-and-similar/runtest.sh
index f52788b..a268514 100755
--- a/selinux-policy/qat-service-and-similar/runtest.sh
+++ b/selinux-policy/qat-service-and-similar/runtest.sh
@@ -29,7 +29,7 @@
 . /usr/share/beakerlib/beakerlib.sh || exit 1
 
 PACKAGE="selinux-policy"
-FILE_PATH="/usr/bin/qat_init.sh"
+FILE_PATH=`which qat_init.sh`
 SERVICE_NAME="qat"
 PROCESS_NAME="qat_init.sh"
 if seinfo -t | grep -q qatlib ; then
@@ -62,18 +62,25 @@ rlJournalStart
         rlSESearchRule "allow qatlib_t hugetlbfs_t : dir { getattr } [ ]"
     rlPhaseEnd
 
-    rlPhaseStartTest "RHEL-211089"
-        rlSEMatchPathCon "/dev/hugepages/qat" "hugetlbfs_t"
+    rlPhaseStartTest "RHEL-211089 + RHEL-251355"
+        rlRun "matchpathcon /dev/hugepages/qat | grep -i none"
         rlSESearchRule "allow qatlib_t hugetlbfs_t : dir { search create add_name write setattr } [ ]"
     rlPhaseEnd
     fi
 
     if [ -f /usr/lib/systemd/system/${SERVICE_NAME}.service ] ; then
     rlPhaseStartTest "real scenario -- standalone service"
-        rlSEService - ${SERVICE_NAME} - ${PROCESS_CONTEXT} "start status" 1
+        rlRun "modprobe intel_qat"
+        rlRun "lsmod | grep qat"
+        rlRun "service ${SERVICE_NAME} start" 0,1
+        rlRun "service ${SERVICE_NAME} status -l --no-pager" 0,1,3
+        sleep 2
         rlRun "restorecon -Rv /etc /run /var -e /var/ARTIFACTS" 0-255
-        rlSEService - ${SERVICE_NAME} - ${PROCESS_CONTEXT} "restart status" 1
-        rlSEService - ${SERVICE_NAME} - ${PROCESS_CONTEXT} "stop status" 1
+        rlRun "service ${SERVICE_NAME} restart" 0,1
+        rlRun "service ${SERVICE_NAME} status -l --no-pager" 0,1,3
+        sleep 2
+        rlRun "service ${SERVICE_NAME} stop" 0,1
+        rlRun "service ${SERVICE_NAME} status -l --no-pager" 0,1,3
     rlPhaseEnd
     fi
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-10 10:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 10:25 [tests/selinux] main: fix test code issues in the qat-service test Milos Malik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox