#!/bin/sh
################################################################################
##                                                                            ##
## Copyright (c) International Business Machines  Corp., 2008                 ##
##                                                                            ##
## 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, write to the Free Software               ##
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    ##
##                                                                            ##
################################################################################

export TCID=umount123
export TST_TOTAL=2
export TST_COUNT=0

for tttype in `ls /dev/tty*`
do
device_no="${tttype}:8"
case "$device_no" in
[0-9]|[0-9][0-9])
    tst_resm TINFO "Testing umount01 with $tttype"
    umount01 -D $tttype
    RC=$?
    if  [ $RC -eq 0 ]
    then
     tst_resm TPASS "umount01 Passed with $tttype"
    else
     tst_resm TFAIL "umount01 Failed with $tttype"
    fi
echo;;
esac
done


for tttype in `ls /dev/tty*`
do
device_no="${tttype}:8"
case "$device_no" in
[0-9]|[0-9][0-9])
    tst_resm TINFO "Testing umount02 with $tttype"
    umount02 -D $tttype
    RC=$?
    if  [ $RC -eq 0 ]
    then
     tst_resm TPASS "umount02 Passed with $tttype"
    else
     tst_resm TFAIL "umount02 Failed with $tttype"
    fi
echo;;
esac
done

for tttype in `ls /dev/tty*`
do
device_no="${tttype}:8"
case "$device_no" in
[0-9]|[0-9][0-9])
    tst_resm TINFO "Testing umount03 with $tttype"
    umount03 -D $tttype
    RC=$?
    if  [ $RC -eq 0 ]
    then
     tst_resm TPASS "umount03 Passed with $tttype"
    else
     tst_resm TFAIL "umount03 Failed with $tttype"
    fi
echo;;
esac
done

tst_exit

