3 # This test is a part of RPC & TI-RPC Test Suite created by Cyril LACABANNE
5 # Please refer to RPC & TI-RPC Test Suite documentation.
6 # More details at http://nfsv4.bullopensource.org/doc/rpc_testsuite.php
8 # TEST : RPC clntudp_create stress
9 # creation : 2007-06-15 revision 2007-
11 # **********************
12 # *** INITIALISATION ***
13 # **********************
14 # Parameters such as tests information, threads number...
16 TESTNAME
="RPC_create-destroy_clntudp_create.stress"
18 # test binaries, used to call
19 TESTCLIENTPATH
="rpc_suite/rpc/rpc_createdestroy_clntudp_create"
20 TESTCLIENTBIN
="2-stress.bin"
21 TESTCLIENT
=$CLIENTTSTPACKDIR/$TESTCLIENTPATH/$TESTCLIENTBIN
22 # table to save all tests result
24 # tmp file declaration to store test returned result
25 TMPRESULTFILE
=/tmp
/rpcts.tmp
31 # erase temp. result file
32 echo -n "">$TMPRESULTFILE
34 # function to collect log result
37 # default : test failed
40 # if result table is empty last test crashes (segment fault), so return must be "failed"
41 if [ ${#result[*]} -eq 0 ]
46 for ((a
=0; a
< TESTINSTANCE-1
; a
++))
48 if [ ${result[$a]} -ne ${result[`expr $a + 1`]} ]
54 # if all test instances return same result return the first element, note that test succeeds if value is 0
58 # function to put test result into logfile
63 1)r_valueTxt
="FAILED";;
65 3)r_valueTxt
="INTERRUPTED";;
67 5)r_valueTxt
="UNTESTED";;
70 echo $TESTCLIENTPATH"/"$
( echo $TESTCLIENTBIN | cut
-d .
-f1 )": execution: "$r_valueTxt>>$LOCLOGDIR/$TESTLOGFILE
73 # launch client instances depeding on test...
74 for ((a
=0; a
< TESTINSTANCE
; a
++))
76 $REMOTESHELL $CLIENTUSER@
$CLIENTIP "$TESTCLIENT $SERVERIP $PROGNUMNOSVC $NBTESTPROCESS" >>$TMPRESULTFILE&
80 # wait for the end of all test
83 # test if all test instances have stopped
84 # if it remains at least one instances, script kills instances and put status HUNG to the whole test case
86 IS_EX
=`$REMOTESHELL $CLIENTUSER@$CLIENTIP "ps -e | grep $TESTCLIENTBIN"`
92 echo " - error : prog is still running -> kill"
94 $REMOTESHELL $CLIENTUSER@
$CLIENTIP "killall -9 $TESTCLIENTBIN"
97 echo " * $TESTNAME execution: "$r_valueTxt
105 # if test program correctly run, this part aims to collect all test results and put this result into log file
106 result
=( $
(cat $TMPRESULTFILE) )
109 echo " * $TESTNAME execution: "$r_valueTxt