On Tue, 2008-12-09 at 11:33 +0100, Le Rouzic wrote: > Hi, > Here is a new patch to be applied on the November Release > (ltp-full-20081130.tgz). > It fixes and improves build/install scripts in the Sun-RPC/TI RPC test > suite. > It takes care also about some portmap/rpcbind conflicts in the tests > scripts. >
Thanks for this Patch. I would also report some problems we faced internally soon in a separate mail. Regards-- Subrata > Best Regards > > > plain text document attachment (ltprpctirpc.patch.overnov08) > diff -Nru ltp-full-20081130.orig/runtest/stress.part3 > ltp-full-20081130.patched/runtest/stress.part3 > --- ltp-full-20081130.orig/runtest/stress.part3 2008-12-02 > 15:12:37.000000000 +0100 > +++ ltp-full-20081130.patched/runtest/stress.part3 2008-12-02 > 15:15:03.000000000 +0100 > @@ -884,10 +884,6 @@ > mc_cmds mc_cmds > mc_opts export TCsrc=$LTPROOT/testcases/network/multicast/mc_opts; mc_opts > rpc01 export TCbin=$LTPROOT/testcases/network/rpc/basic_tests/rpc01; rpc01 > - > -# Disabling this till tirpc is built and run properly > -#rpc_tirpc_ts_run.sh export > TCbin=$LTPROOT/testcases/network/rpc/rpc-tirpc-full-test-suite/rpc_tirpc_ts_run.sh; > rpc_tirpc_ts_run.sh > - > - > +run_rpc_tests.sh export > TCbin=$LTPROOT/testcases/network/rpc/rpc-tirpc-full-test-suite; > run_rpc_tests.sh > perf_lan export TCbin=$LTPROOT/testcases/network/tcp_cmds/perf_lan; perf_lan > > diff -Nru > ltp-full-20081130.orig/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01 > ltp-full-20081130.patched/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01 > --- > ltp-full-20081130.orig/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01 > 2008-12-02 15:23:48.000000000 +0100 > +++ > ltp-full-20081130.patched/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01 > 2008-12-02 15:25:19.000000000 +0100 > @@ -30,6 +30,8 @@ > # HISTORY: > # 04/20/01 Robbie Williamson ([EMAIL PROTECTED]) > # -Written > +# 11/20/08 Aime Le Rouzic ([EMAIL PROTECTED]) > +# - Adapt to rpcbind > # > # CMD FLAG ARGS > # rpcinfo -p > @@ -79,11 +81,21 @@ > > echo "Checking for portmap or rpcbind daemon on `hostname` and $RHOST" > ps -ewf | grep portmap | grep -v grep > /dev/null > -[ $? -eq 0 ] || ps -ewf | grep rpcbind | grep -v grep > /dev/null > -[ $? -eq 0 ] || end_testcase "The portmap or rpcbind daemon is NOT running" > +if [ $? -eq 0 ] > +then > + PORTMAPPER="portmap" > +else > + ps -ewf | grep rpcbind | grep -v grep > /dev/null > + if [ $? -eq 0 ] > + then > + PORTMAPPER="rpcbind" > + else > + echo "The portmap or rpcbind daemon is NOT running" > + fi > +fi > > -rsh -n $RHOST "ps -ewf" | grep portmap | grep -v grep > /dev/null > -[ $? -eq 0 ] || rsh -n $RHOST "ps -ewf" | grep rpcbind | grep -v grep > > /dev/null > +ssh -n $RHOST "ps -ewf" | grep portmap | grep -v grep > /dev/null > +[ $? -eq 0 ] || ssh -n $RHOST "ps -ewf" | grep rpcbind | grep -v grep > > /dev/null > [ $? -eq 0 ] || end_testcase "The portmap or rpcbind daemon is NOT running > on $RHOST" > > echo "Test rpcinfo with default options" > @@ -180,8 +192,20 @@ > # bogusprog, 99999 as versnum. > > echo "rpcinfo <no flags>" > -rpcinfo > -[ $? -eq 1 ] || end_testcase "rpcinfo <no flags> should fail" > +case $PORTMAPPER in > + portmap) > + rpcinfo > + [ $? -eq 1 ] || end_testcase "rpcinfo <no flags> should fail" > + ;; > + rpcbind) > + rpcinfo > + [ $? -eq 0 ]|| end_testcase "rpcinfo <no flags> should not fail" > + ;; > + *) > + echo " portmap or rpcbind not running" > + exit 1 > + ;; > +esac > > echo "rpcinfo -p <bad hostname>" > rpcinfo -p bogushost > diff -Nru > ltp-full-20081130.orig/testcases/network/rpc/rpc-tirpc-full-test-suite/configure.auto > > ltp-full-20081130.patched/testcases/network/rpc/rpc-tirpc-full-test-suite/configure.auto > --- > ltp-full-20081130.orig/testcases/network/rpc/rpc-tirpc-full-test-suite/configure.auto > 2008-12-02 16:43:29.000000000 +0100 > +++ > ltp-full-20081130.patched/testcases/network/rpc/rpc-tirpc-full-test-suite/configure.auto > 2008-12-02 16:44:25.000000000 +0100 > @@ -3,8 +3,9 @@ > # Prepare test suite & Make Makefile shell script for RPC & TIRPC Test Suite > # Automatic configuration script design for LTP > # (c) 2008 BULL S.A.S. > -# created by Aurelien Charbon - [EMAIL PROTECTED] > -# creation : 2008-02-25 > +# > +# 2008-02-25: created by Aurelien Charbon - Bull SA - [EMAIL PROTECTED] > +# 2008-11-27: updated by Aime Le Rouzic - Bull SA - [EMAIL PROTECTED] > > # *************************** > # *** initialization part *** > @@ -13,7 +14,7 @@ > #define current directory, where test suite is installed > RPCTSDIR=`pwd` > DEFAULTDIR=$RPCTSDIR/tests_pack > -DEFAULTIP=localhost > +DEFAULTIP=`hostname` > DEFAULTUSR=root > TSTPACKDIR=$RPCTSDIR/tests_pack > NBTHREADPROCESS=4 > @@ -24,6 +25,8 @@ > export TSTPACKDIR > export SERVERTSTPACKDIR > export CLIENTTSTPACKDIR > +export SERVERDEPLOYDIR > +export CLIENTDEPLOYDIR > export NBTHREADPROCESS > export NBTESTPROCESS > > @@ -43,9 +46,13 @@ > > SERVERTSTPACKDIR=$DEFAULTDIR > echo 'SERVERTSTPACKDIR='$SERVERTSTPACKDIR >>rpc_ts_run.sh > +SERVERDEPLOYDIR=$RPCTSDIR > +echo 'SERVERDEPLOYDIR='$SERVERDEPLOYDIR >>rpc_ts_run.sh > > CLIENTTSTPACKDIR=$DEFAULTDIR > echo 'CLIENTTSTPACKDIR='$CLIENTTSTPACKDIR >>rpc_ts_run.sh > +CLIENTDEPLOYDIR=$RPCTSDIR > +echo 'CLIENTDEPLOYDIR='$CLIENTDEPLOYDIR >>rpc_ts_run.sh > > echo "# LOCALIP variable is computer IP/name used to run tests scripts" > >>rpc_ts_run.sh > echo "# if LOCALIP = SERVERIP = CLIENTIP, that means all tests are in local > mode" >>rpc_ts_run.sh > @@ -55,7 +62,12 @@ > echo 'LOCALIP='$LOCALIP >>rpc_ts_run.sh > > > -SERVERIP=$DEFAULTIP > +if [ -z "$RHOST" ] > +then > + SERVERIP=$DEFAULTIP > +else > + SERVERIP=$RHOST > +fi > echo 'SERVERIP='$SERVERIP >>rpc_ts_run.sh > > CLIENTIP=$DEFAULTIP > @@ -91,6 +103,8 @@ > cat inc/install.hdr >install.sh > chmod +x install.sh > echo "">>install.sh > +echo 'SERVERDEPLOYDIR='$SERVERDEPLOYDIR >>install.sh > +echo 'CLIENTDEPLOYDIR='$CLIENTDEPLOYDIR >>install.sh > echo 'SERVERTSTPACKDIR='$SERVERTSTPACKDIR >>install.sh > echo 'CLIENTTSTPACKDIR='$CLIENTTSTPACKDIR >>install.sh > echo 'LOCALIP='$LOCALIP >>install.sh > diff -Nru > ltp-full-20081130.orig/testcases/network/rpc/rpc-tirpc-full-test-suite/configure.interactive > > ltp-full-20081130.patched/testcases/network/rpc/rpc-tirpc-full-test-suite/configure.interactive > --- > ltp-full-20081130.orig/testcases/network/rpc/rpc-tirpc-full-test-suite/configure.interactive > 2008-12-02 16:45:04.000000000 +0100 > +++ > ltp-full-20081130.patched/testcases/network/rpc/rpc-tirpc-full-test-suite/configure.interactive > 2008-12-02 16:45:24.000000000 +0100 > @@ -4,6 +4,9 @@ > # (c) 2007 BULL S.A.S. > # created by Cyril Lacabanne ([EMAIL PROTECTED]) > # creation : 2007-05-25 revision : 2007-06-06 > +# 2008-11-27: updated by Aime Le Rouzic - Bull SA - [EMAIL PROTECTED] > +# > + > > # *************************** > # *** initialization part *** > @@ -23,6 +26,8 @@ > export TSTPACKDIR > export SERVERTSTPACKDIR > export CLIENTTSTPACKDIR > +export SERVERDEPLOYDIR > +export CLIENTDEPLOYDIR > export NBTHREADPROCESS > export NBTESTPROCESS > > @@ -41,22 +46,28 @@ > # Prompt for Server tests pack dir > echo "Leave blank to set default directory to $DEFAULTDIR" > echo -n "Directory to install test pack on server : " > -read SERVERTSTPACKDIR > +read SERVERDEPLOYDIR > > -if [ -z "$SERVERTSTPACKDIR" ] > +if [ -z "$SERVERDEPLOYDIR" ] > then > + SERVERDEPLOYDIR=$RPCTSDIR > SERVERTSTPACKDIR=$DEFAULTDIR > +else > + SERVERTSTPACKDIR=$SERVERDEPLOYDIR/tests_pack > fi > echo 'SERVERTSTPACKDIR='$SERVERTSTPACKDIR >>rpc_ts_run.sh > > # Prompt for Client tests pack dir > echo "Leave blank to set default directory to $DEFAULTDIR" > echo -n "Directory to install test pack on client : " > -read CLIENTTSTPACKDIR > +read CLIENTDEPLOYDIR > > -if [ -z "$CLIENTTSTPACKDIR" ] > +if [ -z "$CLIENTDEPLOYDIR" ] > then > + CLIENTDEPLOYDIR=$RPCTSDIR > CLIENTTSTPACKDIR=$DEFAULTDIR > +else > + CLIENTTSTPACKDIR=$CLIENTDEPLOYDIR/tests_pack > fi > echo 'CLIENTTSTPACKDIR='$CLIENTTSTPACKDIR >>rpc_ts_run.sh > > @@ -176,6 +187,8 @@ > cat inc/install.hdr >install.sh > chmod +x install.sh > echo "">>install.sh > +echo 'SERVERDEPLOYDIR='$SERVERDEPLOYDIR >>install.sh > +echo 'CLIENTDEPLOYDIR='$CLIENTDEPLOYDIR >>install.sh > echo 'SERVERTSTPACKDIR='$SERVERTSTPACKDIR >>install.sh > echo 'CLIENTTSTPACKDIR='$CLIENTTSTPACKDIR >>install.sh > echo 'LOCALIP='$LOCALIP >>install.sh > diff -Nru > ltp-full-20081130.orig/testcases/network/rpc/rpc-tirpc-full-test-suite/inc/install.ftr > > ltp-full-20081130.patched/testcases/network/rpc/rpc-tirpc-full-test-suite/inc/install.ftr > --- > ltp-full-20081130.orig/testcases/network/rpc/rpc-tirpc-full-test-suite/inc/install.ftr > 2008-12-02 16:50:47.000000000 +0100 > +++ > ltp-full-20081130.patched/testcases/network/rpc/rpc-tirpc-full-test-suite/inc/install.ftr > 2008-12-02 16:51:21.000000000 +0100 > @@ -9,21 +9,23 @@ > cc -I/usr/include/tirpc -x c $TSTPACKDIR/cleaner.c.src -ltirpc -lpthread -o > $TSTPACKDIR/cleaner.bin > > # deployment on client if needed > -if [ $LOCALIP != $CLIENTIP ] > +if [ "$LOCALIP" != "$CLIENTIP" ] || [ "$TSTPACKDIR" != "$CLIENTTSTPACKDIR" ] > then > + scp Makefile.clnt [EMAIL PROTECTED]:$CLIENTDEPLOYDIR/Makefile > + ssh [EMAIL PROTECTED] "mkdir $CLIENTTSTPACKDIR" > scp -r $TSTPACKDIR/* [EMAIL PROTECTED]:$CLIENTTSTPACKDIR > - scp Makefile.clnt [EMAIL PROTECTED]:$CLIENTTSTPACKDIR/Makefile > - ssh [EMAIL PROTECTED] "make -f $CLIENTTSTPACKDIR/Makefile all" > + ssh [EMAIL PROTECTED] "cd $CLIENTDEPLOYDIR; make -f > $CLIENTDEPLOYDIR/Makefile all" > ssh [EMAIL PROTECTED] "cc -I/usr/include/tirpc -x c > $CLIENTTSTPACKDIR/cleaner.c.src -ltirpc -lpthread -o > $CLIENTTSTPACKDIR/cleaner.bin" > fi > > # deployment on server if needed > -if [ $LOCALIP != $SERVERIP ] > +if [ "$LOCALIP" != "$SERVERIP" ] || [ "$TSTPACKDIR" != "$SERVERTSTPACKDIR" ] > then > + scp Makefile.svc [EMAIL PROTECTED]:$SERVERDEPLOYDIR/Makefile > + ssh [EMAIL PROTECTED] "mkdir $SERVERTSTPACKDIR" > scp -r $TSTPACKDIR/* [EMAIL PROTECTED]:$SERVERTSTPACKDIR > - scp Makefile.svc [EMAIL PROTECTED]:$SERVERTSTPACKDIR/Makefile > - ssh [EMAIL PROTECTED] "make -f $SERVERTSTPACKDIR/Makefile all" > - ssh [EMAIL PROTECTED] "cc -I/usr/include/tirpc -x c > $SERVERTSTPACKDIR/cleaner.c.src -ltirpc -lpthread -o > $SERVERTSTPACKDIR/cleaner.bin" > + ssh [EMAIL PROTECTED] "cd $SERVERDEPLOYDIR; make -f > $SERVERDEPLOYDIR/Makefile all" > + ssh [EMAIL PROTECTED] "cc -I/usr/include/tirpc -x c > $SERVERTSTPACKDIRcleaner.c.src -ltirpc -lpthread -o > $SERVERTSTPACKDIR/cleaner.bin" > fi > > exit 0 > diff -Nru > ltp-full-20081130.orig/testcases/network/rpc/rpc-tirpc-full-test-suite/README > ltp-full-20081130.patched/testcases/network/rpc/rpc-tirpc-full-test-suite/README > --- > ltp-full-20081130.orig/testcases/network/rpc/rpc-tirpc-full-test-suite/README > 2008-12-02 16:47:36.000000000 +0100 > +++ > ltp-full-20081130.patched/testcases/network/rpc/rpc-tirpc-full-test-suite/README > 2008-12-02 16:47:53.000000000 +0100 > @@ -32,6 +32,7 @@ > ---------------------------- > Created by: Cyril Lacabanne - Bull SA > Maintain by: Aurélien Charbon - Bull SA - [EMAIL PROTECTED] > +11-27-08: Updated by Aime Le Rouzic - Bull SA - [EMAIL PROTECTED] > > Web page: http://nfsv4.bullopensource.org/doc/rpc_testsuite.php > > @@ -52,7 +53,8 @@ > Preparation > ----------- > You need one, two or three computers, all computers need ssh to run > -test suite correctly and public keys must be shared between computers. > +test suite correctly and public keys MUST be shared between computers. > +It is REQUIRED ssh is used WITHOUT passwd. > Use ssh-keygen to do that. > > > @@ -100,8 +102,12 @@ > ------------------------- > Launch Test Suite Scripts > ------------------------- > - To run with defaults values: > + To run with defaults values (`hostname` for the client , RHOST env > variable or `hostname`) > ./run_rpc_tirpc_test_auto.sh > + or > + run_rpc_test_auto.sh > + or > + run_tirpc_test_auto.sh > > To select and run the tests with choiced values: > ./run_rpc_tirpc_test_interactive.sh > @@ -113,7 +119,6 @@ > or > ./runltp -f rpctirpc > > - > ------------- > Tests results > ------------- > diff -Nru ltp-full-20081130.orig/testscripts/ltpstress.sh > ltp-full-20081130.patched/testscripts/ltpstress.sh > --- ltp-full-20081130.orig/testscripts/ltpstress.sh 2008-12-02 > 15:18:06.000000000 +0100 > +++ ltp-full-20081130.patched/testscripts/ltpstress.sh 2008-12-02 > 15:17:14.000000000 +0100 > @@ -25,7 +25,9 @@ > # HISTORY : > # 02/11/2003 Robbie Williamson ([EMAIL PROTECTED]) > # written > -#################################################### > +# 11/20/2008 Aime Le Rouzic ([EMAIL PROTECTED]) > +# adapt script to work with portmap and rpcbind > +############################################################## > > export LTPROOT=${PWD} > echo $LTPROOT | grep testscripts > /dev/null 2>&1 > @@ -168,39 +170,47 @@ > if [ $? -eq 1 ];then > Echo "Error: Could not start rpcbind daemon." > exit 1 > + else > + echo "The RPC test suite is using rpcbind" > fi > + else > + echo "The RPC test suite is using portmap" > fi > + else > + echo "The RPC test suite is using rpcbind" > fi > + else > + echo "The RPC test suite is using portmap" > fi > > - rpcinfo -p | grep nfs > + ps -p | grep nfs > if [ $? -eq 1 ];then > /usr/sbin/rpc.nfsd > fi > sleep 1 > - rpcinfo -p | grep nfs > + ps -p | grep nfs > if [ $? -eq 1 ];then > echo "Error: Could not start nfs server daemon." > exit 1 > fi > > - rpcinfo -p | grep status > + ps -p | grep status > if [ $? -eq 1 ];then > /sbin/rpc.statd > fi > sleep 1 > - rpcinfo -p | grep status > + ps -p | grep status > if [ $? -eq 1 ];then > echo "Error: Could not start statd daemon." > exit 1 > fi > > - rpcinfo -p | grep mount > + ps -p | grep mount > if [ $? -eq 1 ];then > /usr/sbin/rpc.mountd > fi > sleep 1 > - rpcinfo -p | grep mount > + ps -p | grep mount > if [ $? -eq 1 ];then > echo "Error: Could not start mountd daemon." > exit 1 ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
