public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: file-contexts: Add test for bug1822100
@ 2026-09-11 13:18 Amith Kumar
0 siblings, 0 replies; only message in thread
From: Amith Kumar @ 2026-09-11 13:18 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 9e8c0e21071f8437c5aac99fa27c794b2554e664
Author : Amith Kumar <apeetham@redhat.com>
Date : 2021-04-07T14:46:07+00:00
Stats : +10/-0 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/9e8c0e21071f8437c5aac99fa27c794b2554e664?branch=pr775-checkpolicy-revdeps
Log:
file-contexts: Add test for bug1822100
Add an semanage case to file-contexts test suite which verifies bug
1822100. The fix checks for the broken pipe error generated by the
'semanage fcontext -l | egrep ..' command.
Signed-off-by: Amith Kumar <apeetham@redhat.com>
---
diff --git a/policycoreutils/file-contexts/Makefile b/policycoreutils/file-contexts/Makefile
index fde8428..37dce15 100644
--- a/policycoreutils/file-contexts/Makefile
+++ b/policycoreutils/file-contexts/Makefile
@@ -60,5 +60,6 @@ $(METADATA): Makefile
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6" >> $(METADATA)
+ @echo "Bug: 1822100" >> $(METADATA) # RHEL-8
rhts-lint $(METADATA)
diff --git a/policycoreutils/file-contexts/runtest.sh b/policycoreutils/file-contexts/runtest.sh
index d421ec8..c4f28f8 100755
--- a/policycoreutils/file-contexts/runtest.sh
+++ b/policycoreutils/file-contexts/runtest.sh
@@ -205,6 +205,15 @@ rlJournalStart
rlRun "rm -rf /tmp/test"
rlPhaseEnd
+ rlPhaseStartTest "semanage loses sys.stderr bz#1822100"
+ rlRun "semanage fcontext -l | egrep -s -q -e '^/home'" 0
+ # Capture Broken pipe error
+ rlRun "semanage fcontext -l 2> /tmp/output_file | egrep -s -q -e '^/home'"
+ rlAssertGrep "Broken pipe" /tmp/output_file
+ rlAssertNotGrep "lost sys.stderr" /tmp/output_file
+ rlRun "rm -f /tmp/output_file"
+ rlPhaseEnd
+
rlPhaseStartCleanup
rlRun "rm -rf stdout"
rlPhaseEnd
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:18 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:18 [tests/selinux] pr775-checkpolicy-revdeps: file-contexts: Add test for bug1822100 Amith Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox