public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Amith Kumar <apeetham@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: file-contexts: Add test for bug1822100
Date: Fri, 11 Sep 2026 13:18:58 GMT	[thread overview]
Message-ID: <178913273843.1.8993930176777091742.tests-selinux-9e8c0e21071f@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-09-11 13:18 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=178913273843.1.8993930176777091742.tests-selinux-9e8c0e21071f@fedoraproject.org \
    --to=apeetham@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