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: set immutable bit on the restorecond PID file
Date: Wed, 12 Aug 2026 16:01:43 GMT [thread overview]
Message-ID: <178655050370.1.2303571470151404693.tests-selinux-712c3f71d38b@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : main
Commit : 712c3f71d38b5d25b2a7a76c820d4c113aa4bb28
Author : Milos Malik <mmalik@redhat.com>
Date : 2026-08-11T15:04:43+00:00
Stats : +7/-2 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/712c3f71d38b5d25b2a7a76c820d4c113aa4bb28?branch=main
Log:
set immutable bit on the restorecond PID file
The restorecond service does not really need its PID file, which means
that neither the systemd process nor the restorecond process should
create it or remove it.
Removal attempts are detected, because the test sets the immutable
bit on the PID file and then it looks for timeout messages in journal.
---
diff --git a/policycoreutils/restorecond-service-timeouts/main.fmf b/policycoreutils/restorecond-service-timeouts/main.fmf
index bd454be..64b970e 100644
--- a/policycoreutils/restorecond-service-timeouts/main.fmf
+++ b/policycoreutils/restorecond-service-timeouts/main.fmf
@@ -4,6 +4,7 @@ contact: Milos Malik <mmalik@redhat.com>
component:
- policycoreutils
recommend:
+ - e2fsprogs
- policycoreutils
- policycoreutils-restorecond
duration: 5m
@@ -27,4 +28,5 @@ adjust:
- enabled: false
when: distro == rhel-8, centos-stream-8
because: the bug is not yet fixed there
+id: 24e8b000-43ab-4db7-8066-502cfc6ec48a
diff --git a/policycoreutils/restorecond-service-timeouts/runtest.sh b/policycoreutils/restorecond-service-timeouts/runtest.sh
index 0857ea2..d0e2058 100755
--- a/policycoreutils/restorecond-service-timeouts/runtest.sh
+++ b/policycoreutils/restorecond-service-timeouts/runtest.sh
@@ -12,18 +12,21 @@ rlJournalStart
rlPhaseStartTest "RHEL-142541 + RHEL-165247"
rlRun "grep ^Type=simple /usr/lib/systemd/system/restorecond.service"
rlRun "touch /run/restorecond.pid"
- rlRun "ls -lZ /run/restorecond.pid"
- rlRun "ls -lZ /run/restorecond.pid | grep :var_run_t"
+ rlRun "chattr +i /run/restorecond.pid"
rlRun "systemctl start restorecond.service"
sleep 2
rlRun -s "systemctl status restorecond.service -l"
rlRun "grep -i -e '/run/restorecond.pid' -e 'failed.*timeout' $rlRun_LOG" 1
rm -f $rlRun_LOG
+
+ rlRun "chattr -i /run/restorecond.pid"
+ rlRun "rm -f /run/restorecond.pid"
rlRun "systemctl restart restorecond.service"
sleep 2
rlRun -s "systemctl status restorecond.service -l"
rlRun "grep -i -e '/run/restorecond.pid' -e 'failed.*timeout' $rlRun_LOG" 1
rm -f $rlRun_LOG
+ rlAssertNotExists /run/restorecond.pid
rlPhaseEnd
rlPhaseStartCleanup
reply other threads:[~2026-08-12 16:01 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=178655050370.1.2303571470151404693.tests-selinux-712c3f71d38b@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