public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if restorecond service times out occasionally
@ 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 : 337204b766028f111f16d89ba8c4649e09bde18a
Author : Milos Malik <mmalik@redhat.com>
Date : 2026-04-09T12:56:50+00:00
Stats : +64/-0 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/337204b766028f111f16d89ba8c4649e09bde18a?branch=pr775-checkpolicy-revdeps
Log:
test if restorecond service times out occasionally
A recently reported customer case revealed that the restorecond
service occasionally fails to start because of a timeout. The
exact reproducer is unknown, but the TC reproduces a similar
situation (mislabeled /run/restorecond.pid file) which also leads
to timeouts.
In order to fix the problem, the restorecond service is no longer
a forking type of service. It is a single type of service. The TC
checks this parameter too.
The TC covers RHEL-142541 and RHEL-165247.
---
diff --git a/policycoreutils/restorecond-service-timeouts/main.fmf b/policycoreutils/restorecond-service-timeouts/main.fmf
new file mode 100644
index 0000000..bd454be
--- /dev/null
+++ b/policycoreutils/restorecond-service-timeouts/main.fmf
@@ -0,0 +1,30 @@
+summary: the restorecond service fails to start because of timeout
+description: the restorecond service fails to start because of timeout
+contact: Milos Malik <mmalik@redhat.com>
+component:
+ - policycoreutils
+recommend:
+ - policycoreutils
+ - policycoreutils-restorecond
+duration: 5m
+enabled: true
+tag:
+ - CI-Tier-1
+ - NoRHEL4
+ - NoRHEL5
+ - NoRHEL6
+ - NoRHEL7
+ - NoRHEL8
+ - targeted
+tier: 1
+link:
+ - verifies: https://issues.redhat.com/browse/RHEL-142541
+ - verifies: https://issues.redhat.com/browse/RHEL-165247
+adjust:
+ - enabled: false
+ when: distro == rhel-4, rhel-5, rhel-6, rhel-7
+ because: the test is not relevant there
+ - enabled: false
+ when: distro == rhel-8, centos-stream-8
+ because: the bug is not yet fixed there
+
diff --git a/policycoreutils/restorecond-service-timeouts/runtest.sh b/policycoreutils/restorecond-service-timeouts/runtest.sh
new file mode 100755
index 0000000..0857ea2
--- /dev/null
+++ b/policycoreutils/restorecond-service-timeouts/runtest.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+. /usr/share/beakerlib/beakerlib.sh
+
+rlJournalStart
+ rlPhaseStartSetup
+ rlRun "rpm -qa | grep policycoreutils | sort"
+ rlServiceStop restorecond
+ rlRun "rm -f /run/restorecond.pid"
+ rlPhaseEnd
+
+ 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 "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 "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
+ rlPhaseEnd
+
+ rlPhaseStartCleanup
+ rlRun "rm -f /run/restorecond.pid"
+ rlServiceRestore restorecond
+ 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 restorecond service times out occasionally Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox