public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: kernel/labeling_before_policy_load: misc tweaks
Date: Fri, 11 Sep 2026 13:20:41 GMT [thread overview]
Message-ID: <178913284194.1.6169165328523464052.tests-selinux-bdffd24e923f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : bdffd24e923f39618189a6d99db72f03405df1a7
Author : Ondrej Mosnacek <omosnace@redhat.com>
Date : 2023-05-18T16:19:56+02:00
Stats : +24/-10 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/bdffd24e923f39618189a6d99db72f03405df1a7?branch=pr775-checkpolicy-revdeps
Log:
kernel/labeling_before_policy_load: misc tweaks
- ensure the current booted kernel is set as default
(fixes the case where a newer kernel package has been installed since
boot)
- add Beaker compat workaround
- add descriptions to most rlRun asserts
- run zipl also after the cleanup `dracut -f` invocation
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
diff --git a/kernel/labeling_before_policy_load/runtest.sh b/kernel/labeling_before_policy_load/runtest.sh
index 65956bf..a9ec1a5 100755
--- a/kernel/labeling_before_policy_load/runtest.sh
+++ b/kernel/labeling_before_policy_load/runtest.sh
@@ -7,16 +7,26 @@
# Include Beakerlib environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
+# Beaker compat
+if [ -n "$JOBID" ] && [ -n "$TESTID" ]; then
+ function tmt-reboot() { rstrnt-reboot; }
+ TMT_REBOOT_COUNT="$REBOOTCOUNT"
+fi
+
rlJournalStart
if [ $TMT_REBOOT_COUNT -lt 1 ]; then
rlPhaseStartSetup "Setup"
rlRun "uname -r" 0 "Kernel version before reboot"
- rlRun "install -d /usr/lib/dracut/modules.d/97bz1777525"
- rlRun "install module-setup.sh relabel.sh /usr/lib/dracut/modules.d/97bz1777525"
- rlRun "dracut --regenerate-all -f"
+ rlRun "install -d /usr/lib/dracut/modules.d/97bz1777525" 0 \
+ "Install dracut plugin directory for testing"
+ rlRun "install module-setup.sh relabel.sh /usr/lib/dracut/modules.d/97bz1777525" 0 \
+ "Install dracut plugin for testing"
+ rlRun "dracut -f" 0 "Rebuild the initramfs"
+ rlRun "grubby --set-default /boot/vmlinuz-$(uname -r)" 0 \
+ "Ensure the current booted kernel is the default"
if command -v zipl >/dev/null; then
- rlRun "zipl"
+ rlRun "zipl" 0 "Run zipl"
fi
rlPhaseEnd
@@ -27,20 +37,24 @@ fi
rlPhaseEnd
rlPhaseStartTest "Test"
- # Test writing labels (BZ 1777525)
+ rlLog "Test writing labels (BZ 1777525)"
rlRun "ls -lZ /etc/testfile"
rlRun "ls -lZ /etc/testfile | grep -qF ':etc_t:'" 0 \
- "/etc/testfile is labeled correctly"
+ "Test that /etc/testfile is labeled correctly"
- # Test reading labels (BZ 1839819)
+ rlLog "Test reading labels (BZ 1839819)"
rlRun "cat /etc/labeldump"
rlAssertNotDiffer "/etc/labeldump" labeldump-expected.txt
rlPhaseEnd
rlPhaseStartCleanup
- rlRun "rm -f /etc/labeldump /etc/testfile"
- rlRun "rm -rf /usr/lib/dracut/modules.d/97bz1777525"
- rlRun "dracut --regenerate-all -f"
+ rlRun "rm -f /etc/labeldump /etc/testfile" 0 "Remove test files"
+ rlRun "rm -rf /usr/lib/dracut/modules.d/97bz1777525" 0 \
+ "Remove the dracut plugin"
+ rlRun "dracut -f" 0 "Rebuild the initramfs again"
+ if command -v zipl >/dev/null; then
+ rlRun "zipl" 0 "Run zipl"
+ fi
rlPhaseEnd
rlJournalPrintText
rlJournalEnd
reply other threads:[~2026-09-11 13:20 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=178913284194.1.6169165328523464052.tests-selinux-bdffd24e923f@fedoraproject.org \
--to=omosnace@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