#!/bin/sh
# dev-tc.sh : test case for /dev directory

# This is 1.2
#
# dev-tc.sh,v
# Revision 1.2  2000/04/09 07:15:21  cyeoh
# Added CVS header information
#
#

tet_startup="startup"		# startup function
tet_cleanup="cleanup"		# cleanup function
iclist="ic1 ic2"		# list invocable components
ic1="tp1"
ic2="tp2"


tp1()
{
	tpstart "Reference 3.6-1(A)" 
	tet_infoline "The /dev directory exists and is searchable"
	lsb_test_dir_searchable /dev >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult			# set result code
}

tp2() 
{
	tpstart "Reference 3.6-2(C)"
	tet_infoline "If the implementation supports user creation of devices then"
	tet_infoline "	The /dev directory shall contain a  command named MAKEDEV "

	if test -z $LSB_USER_DEV_CREAT
	then
		tet_infoline "LSB_USER_DEV_CREAT parameter not defined in tetexec.cfg"
		tpresult UNSUPPORTED
		return
	fi

	if ! test -x /dev/MAKEDEV
	then
		FAIL=Y
	fi
	tpresult				# set result code
}


startup() # start-up function
{
     rm -f out.stdout out.stderr out.experr >/dev/null 2>&1
}

cleanup() # clean-up function
{
     rm -f out.stdout out.stderr out.experr >/dev/null 2>&1
}

# source common shell functions

. $TET_EXECUTE/LIB/shfuncs.sh
. $TET_EXECUTE/LIB/lsbfuncs.sh

# execute shell test case manager - must be last line
. $TET_ROOT/lib/xpg3sh/tcm.sh
