dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone
5972c3
#!/bin/bash
5972c3
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
5972c3
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5972c3
#
5972c3
#   runtest.sh of /CoreOS/util-linux/various
5972c3
#   Description: This test groups small sanity and regression tests for util-linux
5972c3
#   Author: Miroslav Vadkerti <mvadkert@redhat.com>
5972c3
#
5972c3
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5972c3
#
5972c3
#   Copyright (c) 2013 Red Hat, Inc. All rights reserved.
5972c3
#
5972c3
#   This copyrighted material is made available to anyone wishing
5972c3
#   to use, modify, copy, or redistribute it subject to the terms
5972c3
#   and conditions of the GNU General Public License version 2.
5972c3
#
5972c3
#   This program is distributed in the hope that it will be
5972c3
#   useful, but WITHOUT ANY WARRANTY; without even the implied
5972c3
#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
5972c3
#   PURPOSE. See the GNU General Public License for more details.
5972c3
#
5972c3
#   You should have received a copy of the GNU General Public
5972c3
#   License along with this program; if not, write to the Free
5972c3
#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
5972c3
#   Boston, MA 02110-1301, USA.
5972c3
#
5972c3
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5972c3
5972c3
# Include Beaker environment
5972c3
#. /usr/bin/rhts-environment.sh || exit 1
5972c3
. /usr/share/beakerlib/beakerlib.sh || exit 1
5972c3
5972c3
PACKAGE="util-linux"
5972c3
5972c3
rlJournalStart
5972c3
    rlPhaseStartSetup
5972c3
        rlAssertRpm $PACKAGE
5972c3
    rlPhaseEnd
5972c3
5972c3
    rlPhaseStartTest "return code of chfn should be always 1 in case failure"
5972c3
        rlRun "chfn -f a:b" 1
5972c3
        rlRun "chfn -o a:b" 1
5972c3
        rlRun "chfn -p a:b" 1
5972c3
        rlRun "chfn -h a:b" 1
5972c3
        rlRun "chfn -x a:b" 1
5972c3
        rlRun "chfn -f a -o b -p c -h d unknown-user" 1
5972c3
    rlPhaseEnd
5972c3
5972c3
    rlPhaseStartCleanup
5972c3
    rlPhaseEnd
5972c3
rlJournalPrintText
5972c3
rlJournalEnd