public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Petr Lautrbach <lautrbach@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: Manually watchdog mount nfs fs
Date: Fri, 11 Sep 2026 13:23:57 GMT [thread overview]
Message-ID: <178913303794.1.13086019010257846321.tests-selinux-c9f49d075cf4@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : c9f49d075cf421da4e2c3b8572b7bb2d8d5037e1
Author : Petr Lautrbach <lautrbach@redhat.com>
Date : 2026-09-10T08:55:43+00:00
Stats : +14/-5 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/c9f49d075cf421da4e2c3b8572b7bb2d8d5037e1?branch=pr775-checkpolicy-revdeps
Log:
Manually watchdog mount nfs fs
There's a bug [1] in recent nfs-utils which causes hang of `mount`
command. For this test it means that the test is killed when maximum
test time '10m' exceeded. But there's no cleanup and so next test which
grep's for 'selinux' in mounted filesystems incorrectly finds leftovers
from this test.
This change tries to workaround described problem using its own watchdog
and cleaning up when `mount 127.0.0.1:/selinux $STORE_ROOT` does not
finish in 15 seconds
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2525909
---
diff --git a/libsemanage/semanage-root-on-nfs/test.sh b/libsemanage/semanage-root-on-nfs/test.sh
index d7c944a..02c7e8f 100755
--- a/libsemanage/semanage-root-on-nfs/test.sh
+++ b/libsemanage/semanage-root-on-nfs/test.sh
@@ -8,6 +8,14 @@ if [ -z "$STORE_ROOT" ]; then
STORE_ROOT=/var/lib/selinux
fi
+clean_nfs() {
+ rlLog "Cleanup nfs mounts and mount points"
+ rlRun "umount $STORE_ROOT"
+ rlRun "systemctl disable nfs-server --now"
+ rlRun "umount /srv/nfs/selinux"
+ rlRun "rm -rf /srv"
+}
+
rlJournalStart
rlPhaseStartSetup
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
@@ -25,7 +33,11 @@ rlJournalStart
EOF"
rlRun "exportfs -a"
rlRun "showmount -e 127.0.0.1"
- rlRun "mount 127.0.0.1:/selinux $STORE_ROOT"
+ rlWatchdog 'mount 127.0.0.1:/selinux $STORE_ROOT' 15 KILL
+ if ! mountpoint -q "$STORE_ROOT"; then
+ clean_nfs
+ rlDie "NFS mount did not finish successfully"
+ fi
rlPhaseEnd
rlPhaseStartTest "semanage root on nfs"
@@ -34,10 +46,7 @@ EOF"
rlPhaseEnd
rlPhaseStartCleanup
- rlRun "umount $STORE_ROOT"
- rlRun "systemctl disable nfs-server --now"
- rlRun "umount /srv/nfs/selinux"
- rlRun "rm -rf /srv"
+ clean_nfs
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
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=178913303794.1.13086019010257846321.tests-selinux-c9f49d075cf4@fedoraproject.org \
--to=lautrbach@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