|
|
cb71152 |
#!/bin/bash
|
|
|
cb71152 |
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
|
cb71152 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
cb71152 |
#
|
|
|
cb71152 |
# runtest.sh of /CoreOS/libselinux/Regression/get_default_context
|
|
|
cb71152 |
# Description: Does get_default_context_with_rolelevel work as expected?
|
|
|
cb71152 |
# Author: Vit Mojzis <vmojzis@redhat.com>
|
|
|
cb71152 |
#
|
|
|
cb71152 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
cb71152 |
#
|
|
|
cb71152 |
# Copyright (c) 2020 Red Hat, Inc. All rights reserved.
|
|
|
cb71152 |
#
|
|
|
cb71152 |
# This copyrighted material is made available to anyone wishing
|
|
|
cb71152 |
# to use, modify, copy, or redistribute it subject to the terms
|
|
|
cb71152 |
# and conditions of the GNU General Public License version 2.
|
|
|
cb71152 |
#
|
|
|
cb71152 |
# This program is distributed in the hope that it will be
|
|
|
cb71152 |
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
|
cb71152 |
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
cb71152 |
# PURPOSE. See the GNU General Public License for more details.
|
|
|
cb71152 |
#
|
|
|
cb71152 |
# You should have received a copy of the GNU General Public
|
|
|
cb71152 |
# License along with this program; if not, write to the Free
|
|
|
cb71152 |
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
cb71152 |
# Boston, MA 02110-1301, USA.
|
|
|
cb71152 |
#
|
|
|
cb71152 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
cb71152 |
|
|
|
cb71152 |
# Include Beaker environment
|
|
|
cb71152 |
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
|
cb71152 |
|
|
|
cb71152 |
PACKAGE="libselinux"
|
|
|
cb71152 |
|
|
|
cb71152 |
rlJournalStart
|
|
|
cb71152 |
rlPhaseStartSetup
|
|
|
cb71152 |
rlAssertRpm ${PACKAGE}
|
|
|
cb71152 |
rlAssertRpm python3-${PACKAGE}
|
|
|
cb71152 |
rlRun "setenforce 1"
|
|
|
cb71152 |
rlRun "sestatus"
|
|
|
cb71152 |
rlPhaseEnd
|
|
|
cb71152 |
|
|
|
0541588 |
if rlIsRHEL ">=8.3" || rlIsFedora; then
|
|
|
cb71152 |
rlPhaseStartTest "#1879368"
|
|
|
cb71152 |
rlRun "cat ./reproducer.py"
|
|
|
cb71152 |
rlRun "./reproducer.py" 0
|
|
|
cb71152 |
rlPhaseEnd
|
|
|
0541588 |
fi
|
|
|
cb71152 |
|
|
|
cb71152 |
rlPhaseStartCleanup
|
|
|
cb71152 |
rlPhaseEnd
|
|
|
cb71152 |
rlJournalPrintText
|
|
|
cb71152 |
rlJournalEnd
|