public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milos Malik <mmalik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: search for AVCs only, ignore USER_AVCs
Date: Fri, 11 Sep 2026 13:18:46 GMT	[thread overview]
Message-ID: <178913272674.1.6751050095806670396.tests-selinux-2132272e2991@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 2132272e2991109f532217fe8f4009252acc3992
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2021-01-29T13:22:20+00:00
            Stats  : +3/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/2132272e2991109f532217fe8f4009252acc3992?branch=pr775-checkpolicy-revdeps

            Log:
            search for AVCs only, ignore USER_AVCs

Because the test uses a custom policy module, there will always
be at least 2 USER_AVC messages reported (received policyload notice
caused by insertion and removal of the policy module). The ausearch
calls should only care about AVC messages.
The test also uses the semanage command, which is not required in Makefile.
Both issues are now fixed.

---
diff --git a/selinux-policy/rsyslog-and-similar/Makefile b/selinux-policy/rsyslog-and-similar/Makefile
index 71bb017..5e88b90 100644
--- a/selinux-policy/rsyslog-and-similar/Makefile
+++ b/selinux-policy/rsyslog-and-similar/Makefile
@@ -69,6 +69,7 @@ $(METADATA): Makefile
 	@echo "Requires:        setools" >> $(METADATA)
 	@echo "Requires:        setools-console" >> $(METADATA)
 	@echo "Requires:        shadow-utils" >> $(METADATA)
+	@echo "Requires:        /usr/sbin/semanage" >> $(METADATA)
 	@echo "RhtsRequires:    library(selinux-policy/common)" >> $(METADATA)
 	@echo "Priority:        Normal" >> $(METADATA)
 	@echo "License:         GPLv2" >> $(METADATA)

diff --git a/selinux-policy/rsyslog-and-similar/runtest.sh b/selinux-policy/rsyslog-and-similar/runtest.sh
index cb40304..6fefc7a 100755
--- a/selinux-policy/rsyslog-and-similar/runtest.sh
+++ b/selinux-policy/rsyslog-and-similar/runtest.sh
@@ -87,7 +87,7 @@ rlJournalStart
         rlRun "update_rsys"
         rlRun "systemctl restart rsyslog"
         sleep 3
-        rlRun "ausearch -m AVC -m USER_AVC --start $tst_Time" 1
+        rlRun "ausearch -m AVC --start $tst_Time" 1
         rlRun "cp -rv /etc/rsyslog.conf-orig /etc/rsyslog.conf"
         rlRun "systemctl restart rsyslog"
     rlPhaseEnd
@@ -103,7 +103,7 @@ rlJournalStart
         rlRun "echo ' ' >> /etc/rsyslog.conf"
         rlRun "systemctl restart rsyslog"
         sleep 3
-        rlRun "ausearch -m AVC -m USER_AVC --start $tst_Time" 1
+        rlRun "ausearch -m AVC --start $tst_Time" 1
         rlRun 'semanage fcontext -d -t public_content_rw_t "/my/custom(/.*)?"'
         rlRun "semodule -r rsyslog_imfile_policy"
 	rlRun "cp -rv /etc/rsyslog.conf-orig /etc/rsyslog.conf"

                 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=178913272674.1.6751050095806670396.tests-selinux-2132272e2991@fedoraproject.org \
    --to=mmalik@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