public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if python code produces deprecation messages related to SWIG
@ 2026-09-11 13:23 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:23 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 1402404f9d7b04b305823944f333b5c25ccd9e39
Author : Milos Malik <mmalik@redhat.com>
Date : 2026-01-12T13:05:48+00:00
Stats : +70/-0 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/1402404f9d7b04b305823944f333b5c25ccd9e39?branch=pr775-checkpolicy-revdeps
Log:
test if python code produces deprecation messages related to SWIG
When python modules are imported, DeprecationWarning messages can
appear. They are caused by the Swig code used in those modules.
Purpose of this TC is to find them.
The TC covers RHEL-118812, RHEL-138405 and RHEL-138406.
---
diff --git a/other/swig-deprecation-warnings/main.fmf b/other/swig-deprecation-warnings/main.fmf
new file mode 100644
index 0000000..3517e20
--- /dev/null
+++ b/other/swig-deprecation-warnings/main.fmf
@@ -0,0 +1,32 @@
+summary: test if python code produces deprecation messages
+contact: Milos Malik <mmalik@redhat.com>
+test: ./runtest.sh
+framework: beakerlib
+component:
+ - libselinux
+ - libsemanage
+ - policycoreutils
+ - setools
+recommend:
+ - python3
+ - python3-libselinux
+ - python3-libsemanage
+ - python3-policycoreutils
+ - python3-setools
+duration: 5m
+enabled: true
+link:
+ - verifies: https://issues.redhat.com/browse/RHEL-118812
+ - verifies: https://issues.redhat.com/browse/RHEL-138405
+ - verifies: https://issues.redhat.com/browse/RHEL-138406
+tag:
+ - NoRHEL4
+ - NoRHEL5
+ - NoRHEL6
+ - NoRHEL7
+ - NoRHEL8
+adjust+:
+ - enabled: false
+ when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-8
+ continue: false
+
diff --git a/other/swig-deprecation-warnings/runtest.sh b/other/swig-deprecation-warnings/runtest.sh
new file mode 100755
index 0000000..16af69a
--- /dev/null
+++ b/other/swig-deprecation-warnings/runtest.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+rlJournalStart
+ rlPhaseStartSetup
+ rlRun "sestatus"
+ rlRun "rpm -qa | grep -e libsepol -e libselinux -e libsemanage -e selinux-policy -e policycoreutils -e setools | sort"
+ rlPhaseEnd
+
+ rlPhaseStartTest "libselinux - RHEL-118812"
+ rlRun -s "python3 -c \"import warnings ; warnings.simplefilter('always') ; import selinux\""
+ rlRun "grep -i deprecation $rlRun_LOG" 1
+ rm -f $rlRun_LOG
+ rlPhaseEnd
+
+ rlPhaseStartTest "libsemanage - RHEL-138405"
+ rlRun -s "python3 -c \"import warnings ; warnings.simplefilter('always') ; import semanage\""
+ rlRun "grep -i deprecation $rlRun_LOG" 1
+ rm -f $rlRun_LOG
+ rlPhaseEnd
+
+ rlPhaseStartTest "policycoreutils - RHEL-138406"
+ rlRun -s "python3 -c \"import warnings ; warnings.simplefilter('always') ; import seobject ; import sepolgen ; import sepolicy\""
+ rlRun "grep -i deprecation $rlRun_LOG" 1
+ rm -f $rlRun_LOG
+ rlPhaseEnd
+
+ rlPhaseStartTest "setools"
+ rlRun -s "python3 -c \"import warnings ; warnings.simplefilter('always') ; import setools\""
+ rlRun "grep -i deprecation $rlRun_LOG" 1
+ rm -f $rlRun_LOG
+ rlPhaseEnd
+
+ rlPhaseStartCleanup
+ rlPhaseEnd
+rlJournalEnd
+
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:23 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:23 [tests/selinux] pr775-checkpolicy-revdeps: test if python code produces deprecation messages related to SWIG Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox