public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if policy installation in container works as expected
@ 2026-09-11 13:22 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:22 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 8cbf323d54e16296d5c82230ea5b4272152928e0
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2025-01-22T06:58:13+00:00
            Stats  : +14/-1 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/8cbf323d54e16296d5c82230ea5b4272152928e0?branch=pr775-checkpolicy-revdeps

            Log:
            test if policy installation in container works as expected

A recent podman + selinux-policy testing revealed too many
"Operation not supported" messages in a scenario which tries
to install selinux-policy packages inside a container. The TC
reproduces the situation.

In order to fix the problem, changes were made in both components:
libsemanage and selinux-policy. Purpose of the TC is to find out
if such error messages still appear or not.

The TC covers RHEL-70632.

---
diff --git a/libsemanage/cross-device-link-in-containers/Makefile b/libsemanage/cross-device-link-in-containers/Makefile
index cc5b0cd..d9930e4 100644
--- a/libsemanage/cross-device-link-in-containers/Makefile
+++ b/libsemanage/cross-device-link-in-containers/Makefile
@@ -59,6 +59,7 @@ $(METADATA): Makefile
 	@echo "Destructive:     no" >> $(METADATA)
 	@echo "Releases:        -RHEL4 -RHEL5 -RHEL6 -RHEL7" >> $(METADATA)
 	@echo "Bug:             2068085" >> $(METADATA) # RHEL-9
+	@echo "Bug:             RHEL-70632" >> $(METADATA) # RHEL-10
 
 	rhts-lint $(METADATA)
 

diff --git a/libsemanage/cross-device-link-in-containers/main.fmf b/libsemanage/cross-device-link-in-containers/main.fmf
index 72ddbf7..90f0fe4 100644
--- a/libsemanage/cross-device-link-in-containers/main.fmf
+++ b/libsemanage/cross-device-link-in-containers/main.fmf
@@ -21,6 +21,7 @@ tag:
   - targeted
 link:
   - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2068085
+  - verifies: https://issues.redhat.com/browse/RHEL-70632
 adjust:
   - enabled: false
     when: distro == rhel-4, rhel-5, rhel-6, rhel-7

diff --git a/libsemanage/cross-device-link-in-containers/runtest.sh b/libsemanage/cross-device-link-in-containers/runtest.sh
index 782bbc2..bcf74b5 100755
--- a/libsemanage/cross-device-link-in-containers/runtest.sh
+++ b/libsemanage/cross-device-link-in-containers/runtest.sh
@@ -41,14 +41,24 @@ rlJournalStart
 
     rlPhaseStartTest "bz#2068085"
         rlRun "pushd selinux1"
+        if rlIsCentOS 8 || rlIsRHEL 8 ; then
+            STREAM_ID="centos/centos:stream8"
+        elif rlIsCentOS 9 || rlIsRHEL 9 ; then
+            STREAM_ID="centos/centos:stream9"
+        elif rlIsCentOS 10 || rlIsRHEL 10 ; then
+            STREAM_ID="centos/centos:stream10"
+        else
+            STREAM_ID="fedora/fedora:rawhide"
+        fi
 cat <<EOF >> ./Dockerfile
-FROM quay.io/centos/centos:stream9
+FROM quay.io/${STREAM_ID}
 RUN dnf install -y selinux-policy selinux-policy-targeted
 EOF
         rlRun "cat ./Dockerfile"
         rlRun -s "podman build -t localhost/selinux . --no-cache"
         rlAssertGrep "^complete" $rlRun_LOG -i
         rlAssertGrep "^commit" $rlRun_LOG -i
+        rlAssertNotGrep "not supported" $rlRun_LOG -i
         rlRun "popd"
 
         rlRun "pushd selinux2"
@@ -60,6 +70,7 @@ EOF
         rlRun -s "podman build -t localhost/selinux2 . --no-cache"
         rlAssertNotGrep "error" $rlRun_LOG -i
         rlAssertNotGrep "failed" $rlRun_LOG -i
+        rlAssertNotGrep "not supported" $rlRun_LOG -i
         rlRun "popd"
     rlPhaseEnd
 

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

only message in thread, other threads:[~2026-09-11 13:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:22 [tests/selinux] pr775-checkpolicy-revdeps: test if policy installation in container works as expected Milos Malik

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