Imported Upstream version 20080331
[ltp-debian.git] / testcases / network / rpc / rpc-tirpc-full-test-suite / tirpc_auth_basic_lib.sh
blobf6edf9bada5e95e6269001be706484a63df5b166
1 #!/bin/bash
3 # This script is a part of RPC & TI-RPC Test Suite
4 # (c) 2007 BULL S.A.S.
5 # Please refer to RPC & TI-RPC Test Suite documentation.
6 # More details at http://nfsv4.bullopensource.org/doc/rpc_testsuite.php
8 # This scripts launch everything needed to test RPC & TI-RPC
9 # Never try to launch alone, run "script_run.sh" instead
10 # Note : this script could be in more than one copy depending on what
11 # tests series you want to run
13 # By C. LACABANNE - cyril.lacabanne@bull.net
14 # creation : 2007-06-05 revision : 2007-
16 # **********************
17 # *** INITIALISATION ***
18 # **********************
20 # simple test suite identification
21 TESTSUITENAME="TIRPC auth domain"
22 TESTSUITEVERS="0.1"
23 TESTSUITEAUTH="Cyril LACABANNE"
24 TESTSUITEDATE="2007-06-05"
25 TESTSUITECOMM=""
27 TESTSERVER_1_PATH="tirpc_svc_1"
28 TESTSERVER_1_BIN="tirpc_svc_1.bin"
29 TESTSERVER_1=$SERVERTSTPACKDIR/$TESTSERVER_1_PATH/$TESTSERVER_1_BIN
31 export TESTSERVER_1_PATH
32 export TESTSERVER_1_BIN
33 export TESTSERVER_1
35 # check if tests run locally or not
36 # if not, logs directory will be change to remote directory
37 if [ "$LOCALIP" != "$CLIENTIP" ]
38 then
39 LOGDIR=/tmp/$LOGDIR
40 if [ $VERBOSE -eq 1 ]
41 then
42 echo " - log dir changes to client log dir : "$LOGDIR # debug !
46 # *****************
47 # *** PROCESSUS ***
48 # *****************
50 echo "*** Starting Test Suite : "$TESTSUITENAME" (v "$TESTSUITEVERS") ***"
52 #-- start TIRPC Server # 1 for that following tests series
53 if [ "$TESTWAY" = "onetomany" ]
54 then
55 # run one server for one or more client
56 $REMOTESHELL $SERVERUSER@$SERVERIP "$TESTSERVER_1 $PROGNUMBASE"&
57 else
58 # launch as much server instances as client instances
59 for ((a=0; a < TESTINSTANCE ; a++))
61 $REMOTESHELL $SERVERUSER@$SERVERIP "$TESTSERVER_1 `expr $PROGNUMBASE + $a`"&
62 done
65 #-- start another instance of TIRPC server for simple API call type test
66 $REMOTESHELL $SERVERUSER@$SERVERIP "$TESTSERVER_1 $PROGNUMNOSVC"&
68 # wait for server creation and initialization
69 sleep $SERVERTIMEOUT
71 ### SCRIPT LIST HERE !!! ###
72 ./$SCRIPTSDIR/tirpc_auth_authnone_create.sh
73 ./$SCRIPTSDIR/tirpc_auth_authsys_create.sh
74 ./$SCRIPTSDIR/tirpc_auth_authsys_create_default.sh
75 ./$SCRIPTSDIR/tirpc_auth_authdes_create.sh
76 ./$SCRIPTSDIR/tirpc_auth_authdes_seccreate.sh
78 #-- Cleanup
79 $REMOTESHELL $SERVERUSER@$SERVERIP "killall -9 "$TESTSERVER_1_BIN
81 # ***************
82 # *** RESULTS ***
83 # ***************