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] main: run the internal checkpolicy tests
Date: Wed, 03 Jun 2026 14:37:50 GMT	[thread overview]
Message-ID: <178049747068.1.1489853893049999576.tests-selinux-50869431bb49@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : main
            Commit : 50869431bb49cf359a34352fb3ead93bc761ecd7
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2026-06-03T14:37:36+00:00
            Stats  : +86/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/50869431bb49cf359a34352fb3ead93bc761ecd7?branch=main

            Log:
            run the internal checkpolicy tests

The checkpolicy source RPM contains not only checkpolicy sources but
also checkpolicy tests. Purpose of this automated test is to run them
with the current versions of libsepol and checkpolicy components.

---
diff --git a/checkpolicy/internal-tests/main.fmf b/checkpolicy/internal-tests/main.fmf
new file mode 100644
index 0000000..437b964
--- /dev/null
+++ b/checkpolicy/internal-tests/main.fmf
@@ -0,0 +1,28 @@
+summary: Run internal checkpolicy tests
+contact: Milos Malik <mmalik@redhat.com>
+component:
+  - checkpolicy
+require:
+  - bison
+  - checkpolicy
+  - flex
+  - gcc
+  - libsepol-devel
+  - make
+recommend:
+  - libsepol-static
+duration: 5m
+enabled: true
+tag:
+  - NoRHEL4
+  - NoRHEL5
+  - NoRHEL6
+  - NoRHEL7
+  - targeted
+  - avoidImageMode
+adjust+:
+  - enabled: false
+    when: distro == rhel-4, rhel-5, rhel-6, rhel-7
+    because: the test is not relevant there
+extra-nitrate: TC#0620041
+id: 3df4f40d-61a0-4267-b7db-6ff9f5254406

diff --git a/checkpolicy/internal-tests/runtest.sh b/checkpolicy/internal-tests/runtest.sh
new file mode 100755
index 0000000..2977950
--- /dev/null
+++ b/checkpolicy/internal-tests/runtest.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   runtest.sh of /CoreOS/checkpolicy/internal-tests
+#   Description: Run internal checkpolicy tests
+#   Author: Milos Malik <mmalik@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2026 Red Hat, Inc.
+#
+#   This copyrighted material is made available to anyone wishing
+#   to use, modify, copy, or redistribute it subject to the terms
+#   and conditions of the GNU General Public License version 2.
+#
+#   This program is distributed in the hope that it will be
+#   useful, but WITHOUT ANY WARRANTY; without even the implied
+#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+#   PURPOSE. See the GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public
+#   License along with this program; if not, write to the Free
+#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include Beaker environment
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+PACKAGE="checkpolicy"
+
+rlJournalStart
+    rlPhaseStartSetup
+        rlAssertRpm ${PACKAGE}
+        if ! rpm -q libsepol-static >& /dev/null ; then
+            rlRun "dnf install -y libsepol-static --enablerepo '*'"
+        fi
+        rlRun "rpm -qa | grep libsepol | sort"
+    rlPhaseEnd
+
+    rlPhaseStartTest "non-fuzzing tests"
+        rlRun "dnf download --source ${PACKAGE}"
+        rlRun "rpm -ivh ${PACKAGE}-*.src.rpm"
+        rlRun "rm -f ${PACKAGE}-*.src.rpm"
+        rlRun "tar zxf ~/rpmbuild/SOURCES/${PACKAGE}-*.tar.gz"
+        rlRun "pushd ${PACKAGE}-*"
+        rlRun "make test"
+        rlRun "popd"
+    rlPhaseEnd
+
+    rlPhaseStartCleanup
+        rlRun "rm -rf ~/rpmbuild ${PACKAGE}-*"
+    rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
+

                 reply	other threads:[~2026-06-03 14:37 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=178049747068.1.1489853893049999576.tests-selinux-50869431bb49@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