public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Zdenek Pytela <zpytela@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: Update systemd-oomd test
Date: Fri, 11 Sep 2026 13:23:05 GMT	[thread overview]
Message-ID: <178913298585.1.9944227830605673318.tests-selinux-bbaec0906ee2@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : bbaec0906ee230e8b8ad4d01079e0dcde0f84a3f
            Author : Zdenek Pytela <zpytela@redhat.com>
            Date   : 2025-08-11T13:41:35+02:00
            Stats  : +2/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/bbaec0906ee230e8b8ad4d01079e0dcde0f84a3f?branch=pr775-checkpolicy-revdeps

            Log:
            Update systemd-oomd test

Do not check the type of /proc/pressure with matchpathcon because
the type is assigned using genfscon which is not recognised by
userspace tools.

Ensure that the /etc/systemd/system/-.slice.d and
/etc/systemd/system/user@.service.d directories exist before
creating files in them.

---
diff --git a/selinux-policy/systemd-oomd/runtest.sh b/selinux-policy/systemd-oomd/runtest.sh
index 1534656..6ab389b 100755
--- a/selinux-policy/systemd-oomd/runtest.sh
+++ b/selinux-policy/systemd-oomd/runtest.sh
@@ -71,7 +71,6 @@ rlJournalStart
             rlLog "The ${SERVICE_NAME} service is not SELinux confined."
         else
         rlSEMatchPathCon "${FILE_PATH}" "${FILE_CONTEXT}"
-        rlSEMatchPathCon "/proc/pressure" "proc_psi_t"
         rlSESearchRule "allow systemd_oomd_t proc_psi_t : file { getattr ioctl lock open read } [ ]"
         rlSESearchRule "allow systemd_oomd_t domain : dir { getattr ioctl lock open read search } [ ]"
         rlSESearchRule "allow systemd_oomd_t domain : file { getattr ioctl lock open read } [ ]"
@@ -93,12 +92,14 @@ rlJournalStart
         rlRun "systemctl status ${SERVICE_NAME}"
 
         # enable swap-based killing on all units in the root slice
+        mkdir -p /etc/systemd/system/-.slice.d
         cat >> /etc/systemd/system/-.slice.d/override.conf << EOF
 [Slice]
 ManagedOOMSwap=kill
 EOF
 
         # memory pressure example settings
+        mkdir -p /etc/systemd/system/user@.service.d
         cat >> /etc/systemd/system/user@.service.d/override.conf << EOF
 [Service]
 ManagedOOMMemoryPressure=kill

                 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=178913298585.1.9944227830605673318.tests-selinux-bbaec0906ee2@fedoraproject.org \
    --to=zpytela@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