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: add the selinux-autorelabel service test to upstream
Date: Fri, 11 Sep 2026 13:18:14 GMT	[thread overview]
Message-ID: <178913269444.1.11200977284182925318.tests-selinux-6b50be9a8313@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 6b50be9a83136810fac57207896b014067b828a5
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2020-09-11T13:56:37+00:00
            Stats  : +125/-0 in 4 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/6b50be9a83136810fac57207896b014067b828a5?branch=pr775-checkpolicy-revdeps

            Log:
            add the selinux-autorelabel service test to upstream

The selinux-autorelabel service is available in various Fedoras
and RHELs, so it makes sense to run the TC in upstream testing.

There are no changes in the TC functionality, only moving the
downstream TC to the upstream repo.

---
diff --git a/policycoreutils/selinux-autorelabel-service/Makefile b/policycoreutils/selinux-autorelabel-service/Makefile
new file mode 100644
index 0000000..52a146a
--- /dev/null
+++ b/policycoreutils/selinux-autorelabel-service/Makefile
@@ -0,0 +1,65 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Makefile of /CoreOS/policycoreutils/Regression/selinux-autorelabel-service
+#   Description: incorrectly set StandardInput and StandardOutput of selinux-autorelabel service
+#   Author: Milos Malik <mmalik@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2020 Red Hat, Inc.
+#
+#   This program is free software: you can redistribute it and/or
+#   modify it under the terms of the GNU General Public License as
+#   published by the Free Software Foundation, either version 2 of
+#   the License, or (at your option) any later version.
+#
+#   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, see http://www.gnu.org/licenses/.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+export TEST=/CoreOS/policycoreutils/Regression/selinux-autorelabel-service
+export TESTVERSION=1.0
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+	./runtest.sh
+
+build: $(BUILT_FILES)
+	test -x runtest.sh || chmod a+x runtest.sh
+
+clean:
+	rm -f *~ $(BUILT_FILES)
+
+include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+	@echo "Owner:           Milos Malik <mmalik@redhat.com>" > $(METADATA)
+	@echo "Name:            $(TEST)" >> $(METADATA)
+	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)
+	@echo "Path:            $(TEST_DIR)" >> $(METADATA)
+	@echo "Description:     incorrectly set StandardInput and StandardOutput of selinux-autorelabel service" >> $(METADATA)
+	@echo "Type:            Regression" >> $(METADATA)
+	@echo "TestTime:        5m" >> $(METADATA)
+	@echo "RunFor:          policycoreutils" >> $(METADATA)
+	@echo "Requires:        policycoreutils" >> $(METADATA)
+	@echo "Priority:        Normal" >> $(METADATA)
+	@echo "License:         GPLv2+" >> $(METADATA)
+	@echo "Confidential:    no" >> $(METADATA)
+	@echo "Destructive:     no" >> $(METADATA)
+	@echo "Releases:        -RHEL4 -RHEL6 -RHEL7 -RHELClient5 -RHELServer5" >> $(METADATA)
+	@echo "Bug:             1766578" >> $(METADATA) # RHEL-8
+	@echo "Bug:             1778094" >> $(METADATA) # RHEL-8
+
+	rhts-lint $(METADATA)
+

diff --git a/policycoreutils/selinux-autorelabel-service/PURPOSE b/policycoreutils/selinux-autorelabel-service/PURPOSE
new file mode 100644
index 0000000..db87dd1
--- /dev/null
+++ b/policycoreutils/selinux-autorelabel-service/PURPOSE
@@ -0,0 +1,9 @@
+PURPOSE of /CoreOS/policycoreutils/Regression/selinux-autorelabel-service
+Author: Milos Malik <mmalik@redhat.com>
+
+Description: incorrectly set StandardInput and StandardOutput of selinux-autorelabel service
+
+Bugzilla links:
+ * https://bugzilla.redhat.com/show_bug.cgi?id=1766578
+ * https://bugzilla.redhat.com/show_bug.cgi?id=1778094
+

diff --git a/policycoreutils/selinux-autorelabel-service/main.fmf b/policycoreutils/selinux-autorelabel-service/main.fmf
new file mode 100644
index 0000000..6b8d0eb
--- /dev/null
+++ b/policycoreutils/selinux-autorelabel-service/main.fmf
@@ -0,0 +1,2 @@
+path: /policycoreutils/selinux-autorelabel-service
+tier: 2

diff --git a/policycoreutils/selinux-autorelabel-service/runtest.sh b/policycoreutils/selinux-autorelabel-service/runtest.sh
new file mode 100755
index 0000000..49fca5b
--- /dev/null
+++ b/policycoreutils/selinux-autorelabel-service/runtest.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   runtest.sh of /CoreOS/policycoreutils/Regression/selinux-autorelabel-service
+#   Description: incorrectly set StandardInput and StandardOutput of selinux-autorelabel service
+#   Author: Milos Malik <mmalik@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2020 Red Hat, Inc.
+#
+#   This program is free software: you can redistribute it and/or
+#   modify it under the terms of the GNU General Public License as
+#   published by the Free Software Foundation, either version 2 of
+#   the License, or (at your option) any later version.
+#
+#   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, see http://www.gnu.org/licenses/.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include Beaker environment
+. /usr/bin/rhts-environment.sh || exit 1
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+PACKAGE="policycoreutils"
+
+rlJournalStart
+    rlPhaseStartSetup
+        rlAssertRpm ${PACKAGE}
+    rlPhaseEnd
+
+    rlPhaseStartTest "bz#1766578 + bz#1778094"
+        rlRun "grep ^Standard /usr/lib/systemd/system/selinux-autorelabel.service"
+        rlRun "grep 'StandardInput.*tty' /usr/lib/systemd/system/selinux-autorelabel.service" 1
+        rlRun "grep -e 'StandardOutput.*journal.console' -e 'StandardOutput.*console.journal' /usr/lib/systemd/system/selinux-autorelabel.service"
+    rlPhaseEnd
+
+    rlPhaseStartCleanup
+    rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
+

                 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=178913269444.1.11200977284182925318.tests-selinux-6b50be9a8313@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