#!/bin/sh
# lib64-tc.sh : test case for Linux Annex / lib64 lib32  directory

# $Log: lib64-tc.sh,v $
# Revision 1.2  2004/03/19 14:41:32  ajosey
# correct test2 to look for /lib not /lib32
#
# Revision 1.1  2004/02/17 11:24:18  ajosey
# Check in new testset for lib64 and lib32 directories
#
#

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

tp1()
{
	tpstart "Reference 6.1.5-1(C)"
	tet_infoline "If the system is one of the following 64-bit architectures then" 
	tet_infoline "it must place its 64-bit libraries in /lib64 which must exist and be searchable"
	tet_infoline "Architectures:PPC64,S390X,SPARC64 and AMD64"
        ARCH=`uname -m`
	tet_infoline "Architecture found:  $ARCH"
        case $ARCH in
                ia64)  tpresult UNSUPPORTED;;
                sparc64|ppc64|s390x|x86_64) 
		if ! test -r /lib64
		then
			FAIL=Y
			tet_infoline "/lib64 not found"
		fi

		;;
                *) tpresult UNSUPPORTED;;
        esac

	tpresult				# set result code
}


tp2()
{
	tpstart "Reference 6.1.5-2(C)"
	tet_infoline "If the system is one of the following 64-bit architectures then" 
	tet_infoline "it must place its 32-bit libraries in /lib which must exist and be searchable"
	tet_infoline "Architectures:PPC64,S390X,SPARC64 and AMD64"
        ARCH=`uname -m`
	tet_infoline "Architecture found:  $ARCH"
        case $ARCH in
                ia64)  tpresult UNSUPPORTED;;
                sparc64|ppc64|s390x|x86_64) 
		if ! test -r /lib
		then
			FAIL=Y
			tet_infoline "/lib not found"
		fi

		;;
                *) tpresult UNSUPPORTED;;
        esac

	tpresult				# set result code
}


startup() # startup 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
