public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Petr Lautrbach <plautrba@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: checkpolicy/checkpolicy: Grep for error messages rather than debug logs
Date: Fri, 11 Sep 2026 13:17:31 GMT	[thread overview]
Message-ID: <178913265162.1.7300832761074330625.tests-selinux-a207b0ec49d1@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : a207b0ec49d167b5eef060a934cf35eddfbb4629
            Author : Petr Lautrbach <plautrba@redhat.com>
            Date   : 2019-04-09T15:23:30+02:00
            Stats  : +4/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/a207b0ec49d167b5eef060a934cf35eddfbb4629?branch=pr775-checkpolicy-revdeps

            Log:
            checkpolicy/checkpolicy: Grep for error messages rather than debug logs

checkpolicy was updated in 2.9 in order not to write debug messages on ouput. It
doesn't output "loading policy ..." messages anymore.

See https://github.com/SELinuxProject/selinux/commit/854fdc1ac40720782491e8ada6837aa4550a7ca1

Fixes:
[   PASS   ] :: Command 'checkpolicy >& /tmp/tmp.NMYnXbEmez' (Expected 1, got 1)
[   FAIL   ] :: File '/tmp/tmp.NMYnXbEmez' should contain 'loading policy configuration from policy.conf'
[   PASS   ] :: Command 'checkpolicy -b >& /tmp/tmp.NMYnXbEmez' (Expected 1, got 1)
[   FAIL   ] :: File '/tmp/tmp.NMYnXbEmez' should contain 'loading policy configuration from policy'

---
diff --git a/checkpolicy/checkpolicy/runtest.sh b/checkpolicy/checkpolicy/runtest.sh
index 815dbaf..7bdfbba 100644
--- a/checkpolicy/checkpolicy/runtest.sh
+++ b/checkpolicy/checkpolicy/runtest.sh
@@ -43,6 +43,7 @@ rlJournalStart
         TEST_DIR=`mktemp -d`
         OUTPUT_FILE=`mktemp`
         rlAssertExists "/usr/bin/checkpolicy"
+        rlAssertExists "/usr/share/man/man8/checkpolicy.8.gz"
     rlPhaseEnd
 
     rlPhaseStartTest "compilation from policy.conf"
@@ -68,9 +69,9 @@ rlJournalStart
 
     rlPhaseStartTest
         rlRun "checkpolicy >& ${TEST_FILE}" 1
-        rlAssertGrep "loading policy configuration from policy.conf" ${TEST_FILE}
+        rlAssertGrep "unable to open policy.conf" ${TEST_FILE}
         rlRun "checkpolicy -b >& ${TEST_FILE}" 1
-        rlAssertGrep "loading policy configuration from policy" ${TEST_FILE}
+        rlAssertGrep "Can't open 'policy':  No such file or directory" ${TEST_FILE}
         rlRun "checkpolicy -V"
         rlRun "checkpolicy -U 2>&1 | grep \"option requires an argument\""
         rlRun "checkpolicy -U xyz" 1
@@ -97,6 +98,7 @@ rlJournalStart
         rlRun "checkpolicy -c 0 2>&1 | grep \"value 0 not in range\""
         rlRun "checkpolicy -t 2>&1 | grep \"option requires an argument\""
         rlRun "checkpolicy -t xyz 2>&1 | grep -i \"unknown target platform\""
+        rlRun "man checkpolicy | col -b | grep -- '-m]'" 1
         rlRun "checkpolicy --help 2>&1 | grep -- '-m]'" 1
     rlPhaseEnd
 

                 reply	other threads:[~2026-09-11 13:17 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=178913265162.1.7300832761074330625.tests-selinux-a207b0ec49d1@fedoraproject.org \
    --to=plautrba@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