1*b4dd7d09SAndy Fiddaman 2*b4dd7d09SAndy Fiddaman#### ksh93 test suite 3*b4dd7d09SAndy Fiddaman 4*b4dd7d09SAndy Fiddaman## Introduction 5*b4dd7d09SAndy Fiddaman 6*b4dd7d09SAndy FiddamanThe directory /usr/demo/ksh/tests/ contains the ksh93 test suite 7*b4dd7d09SAndy Fiddamanwhich is used to verify the correct behaviour of ksh93. 8*b4dd7d09SAndy Fiddaman 9*b4dd7d09SAndy FiddamanThe test suite is split into modules with the ending *.sh 10*b4dd7d09SAndy Fiddamanand a frontend called "shtests" which is used to run the tests. 11*b4dd7d09SAndy Fiddaman 12*b4dd7d09SAndy Fiddaman## Basic description: 13*b4dd7d09SAndy Fiddaman 14*b4dd7d09SAndy Fiddaman/usr/demo/ksh/tests/shtests <options> <varname=value> <testmodule> 15*b4dd7d09SAndy Fiddaman 16*b4dd7d09SAndy FiddamanBy default, with no <options>, each test is run three times: 17*b4dd7d09SAndy Fiddaman 18*b4dd7d09SAndy Fiddaman o In the posix/C locale; 19*b4dd7d09SAndy Fiddaman o In the C.UTF-8 locale; 20*b4dd7d09SAndy Fiddaman o As a compiled script using $SHCOMP. 21*b4dd7d09SAndy Fiddaman 22*b4dd7d09SAndy Fiddaman<options> may be: 23*b4dd7d09SAndy Fiddaman -c execute test module as compiled shell script only 24*b4dd7d09SAndy Fiddaman -p execute test module as normal shell script in posix/C only 25*b4dd7d09SAndy Fiddaman -u execute test module as normal shell script in c.UTF-8 only 26*b4dd7d09SAndy Fiddaman -t do not print timing information 27*b4dd7d09SAndy Fiddaman -v use VMDEBUG 28*b4dd7d09SAndy Fiddaman<varname=value> 29*b4dd7d09SAndy Fiddaman Sets one or more environment variables to value "value". 30*b4dd7d09SAndy Fiddaman<testmodule> 31*b4dd7d09SAndy Fiddaman file name of test module 32*b4dd7d09SAndy Fiddaman 33*b4dd7d09SAndy Fiddaman## Basic usage in illumos: 34*b4dd7d09SAndy Fiddaman 35*b4dd7d09SAndy FiddamanThe tests can be executed like this: 36*b4dd7d09SAndy Fiddaman$ export SHELL=<path-to-ksh93-executable> 37*b4dd7d09SAndy Fiddaman$ export SHCOMP=/usr/bin/shcomp 38*b4dd7d09SAndy Fiddamanfor t in /usr/demo/ksh/tests/*.sh ; do 39*b4dd7d09SAndy Fiddaman $SHELL /usr/demo/ksh/tests/shtests "$t" 40*b4dd7d09SAndy Fiddamandone 41*b4dd7d09SAndy Fiddaman 42*b4dd7d09SAndy FiddamanNote that you MUST NOT use "/usr/bin/ksh93" as value for 43*b4dd7d09SAndy FiddamanSHELL since /usr/bin/ksh93 on illumos is a wrapper which 44*b4dd7d09SAndy Fiddamanselects a suitable executable in /usr/bin/<isa>/ksh93 45*b4dd7d09SAndy Fiddamanbased on the hardware capabilities defined via /usr/bin/isalist 46*b4dd7d09SAndy Fiddaman 47*b4dd7d09SAndy FiddamanValid values for SHELL are: 48*b4dd7d09SAndy Fiddaman- SHELL=/usr/bin/i86/ksh93 # 32-bit i386 49*b4dd7d09SAndy Fiddaman- SHELL=/usr/bin/amd64/ksh93 # 64-bit AMD64 50*b4dd7d09SAndy Fiddaman- SHELL=/usr/bin/sparcv7/ksh93 # 32-bit SPARC 51*b4dd7d09SAndy Fiddaman- SHELL=/usr/bin/sparcv9/ksh93 # 64-bit SPARC 52