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] main: improve tests which fail often
Date: Tue, 06 Oct 2026 09:06:55 GMT [thread overview]
Message-ID: <179127761516.1.4852143733027512084.tests-selinux-d0b9436d66df@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : main
Commit : d0b9436d66df3247cfdbc48c1dac31d5b5de36cd
Author : Milos Malik <mmalik@redhat.com>
Date : 2026-10-05T16:34:30+02:00
Stats : +45/-1 in 5 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/d0b9436d66df3247cfdbc48c1dac31d5b5de36cd?branch=main
Log:
improve tests which fail often
The following automated tests are improved now:
* selinux-policy/exim-and-similar (directory ownership issue)
* selinux-policy/interface-definitions (certain interfaces are missing)
* selinux-policy/nvme-stas-and-similar (unwanted access to /root/.local/lib)
* selinux-policy/systemd-machined-and-similar (mislabeled subtree)
---
diff --git a/selinux-policy/exim-and-similar/runtest.sh b/selinux-policy/exim-and-similar/runtest.sh
index 01b5036..bc6559b 100755
--- a/selinux-policy/exim-and-similar/runtest.sh
+++ b/selinux-policy/exim-and-similar/runtest.sh
@@ -111,6 +111,9 @@ rlJournalStart
# for RHELs where the SELinux domain does not exist yet
PROCESS_CONTEXT="sendmail_t"
fi
+ if [ -d /var/log/exim ] ; then
+ getent passwd exim && chown -R exim:exim /var/log/exim
+ fi
rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "start status" 1
rlRun "lsof | grep exim_daemon_notify"
rlRun "restorecon -Rv /etc /run /var -e /var/ARTIFACTS" 0-255
diff --git a/selinux-policy/interface-definitions/known-patterns.txt b/selinux-policy/interface-definitions/known-patterns.txt
new file mode 100644
index 0000000..2b3e357
--- /dev/null
+++ b/selinux-policy/interface-definitions/known-patterns.txt
@@ -0,0 +1,39 @@
+userdom_admin_home_dir_filetrans
+userdom_append_user_tmp_files
+userdom_attach_admin_tun_iface
+userdom_bin_spec_domtrans_unpriv_users
+userdom_create_user_tmp_sockets
+userdom_domtrans_user_home
+userdom_domtrans_user_tmp
+userdom_dontaudit_read_user_tmp_files
+userdom_dontaudit_relabelfrom_user_ptys
+userdom_dontaudit_setattr_user_tmp
+userdom_dontaudit_user_getattr_tmp_sockets
+userdom_dontaudit_write_user_home_content_files
+userdom_entry_spec_domtrans_unpriv_users
+userdom_filetrans_home_content
+userdom_home_manager
+userdom_home_reader
+userdom_list_user_home_dirs
+userdom_manage_user_tmp_dirs
+userdom_manage_user_tmp_files
+userdom_manage_user_tmpfs_files
+userdom_read_user_home_content_files
+userdom_read_user_tmp_files
+userdom_read_user_tmpfs_files
+userdom_relabel_user_tmp_dirs
+userdom_rw_user_tmpfs_files
+userdom_rw_user_tmp_sock_files
+userdom_search_admin_dir
+userdom_search_user_home_dirs
+userdom_search_user_tmp_dirs
+userdom_stream_connect
+userdom_unpriv_usertype
+userdom_use_inherited_user_terminals
+userdom_user_application_domain
+userdom_user_home_content_filetrans
+userdom_user_home_dir_filetrans
+userdom_user_home_domtrans
+userdom_user_tmp_file
+userdom_user_tmp_filetrans
+userdom_use_user_terminals
diff --git a/selinux-policy/interface-definitions/runtest.sh b/selinux-policy/interface-definitions/runtest.sh
index 29c0826..db0b6c9 100755
--- a/selinux-policy/interface-definitions/runtest.sh
+++ b/selinux-policy/interface-definitions/runtest.sh
@@ -12,7 +12,7 @@ rlJournalStart
# the bug is fixed on RHEL-8 but it was auto-closed on RHEL-9
rlPhaseStartTest "RHEL-2616 + RHEL-16185"
rlRun "sepolgen-ifgen -v -d 2>/dev/null | sort | uniq > output.txt"
- rlRun "grep -i missing output.txt" 1
+ rlRun "grep -v -f known-patterns.txt output.txt | grep -i missing" 1
rlPhaseEnd
fi
diff --git a/selinux-policy/nvme-stas-and-similar/runtest.sh b/selinux-policy/nvme-stas-and-similar/runtest.sh
index ba83928..8fcf40c 100755
--- a/selinux-policy/nvme-stas-and-similar/runtest.sh
+++ b/selinux-policy/nvme-stas-and-similar/runtest.sh
@@ -92,6 +92,7 @@ rlJournalStart
rlRun "cp -f ${CUR_FILE} /etc/systemd/system/"
COPIED_FILE=`echo ${CUR_FILE} | sed 's|/usr/lib|/etc|'`
rlRun "sed -i 's|^ExecStart=.*python.* /|ExecStart=/|' ${COPIED_FILE}"
+ rlRun "sed -i 's|\(\[Service\]\)|\1\nEnvironment=PYTHONNOUSERSITE=1\n|' ${COPIED_FILE}"
rlRun "systemctl daemon-reload"
rlRun "grep '^ExecStart=' ${COPIED_FILE}"
fi
diff --git a/selinux-policy/systemd-machined-and-similar/runtest.sh b/selinux-policy/systemd-machined-and-similar/runtest.sh
index 4fa2ecf..e179161 100755
--- a/selinux-policy/systemd-machined-and-similar/runtest.sh
+++ b/selinux-policy/systemd-machined-and-similar/runtest.sh
@@ -155,6 +155,7 @@ rlJournalStart
rlRun "journalctl -M test --system"
rlRun "journalctl -M test --user"
rlWatchdog "machinectl login test" 20
+ rlRun "restorecon -Rv /etc /run /var -e /var/ARTIFACTS" 0-255
rlRun "machinectl list-images"
rlRun "machinectl image-status test"
if rlIsFedora ; then
reply other threads:[~2026-10-06 9:06 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=179127761516.1.4852143733027512084.tests-selinux-d0b9436d66df@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