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: test if python code produces deprecation messages related to SWIG
Date: Fri, 11 Sep 2026 13:23:30 GMT [thread overview]
Message-ID: <178913301006.1.3002503175144338786.tests-selinux-1402404f9d7b@fedoraproject.org> (raw)
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
+
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=178913301006.1.3002503175144338786.tests-selinux-1402404f9d7b@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