Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TAG=""
- SERVER=127.0.0.1
- DIR=/export/test1/pynfs
- DRYRUN=0
- PYUSER=""
- PYGROUP=""
- UTAG=""
- USESPECIAL=""
- SECUIRITY=""
- OUTPATH="/home/ffilz/ganesha/pynfs-results"
- EXEC="./testserver.py"
- VERSION=`pwd | sed -e 's@.*/\(nfs4\.[0-9]\)$@\1@'`
- if [ $VERSION = "nfs4.0" ] ; then
- SECURE="--secure"
- else
- SECURE=""
- fi
- run_tests()
- {
- FLAGS=`echo $* | sed -e 's@ @-@g'`
- BASE=$OUTPATH/TESTOUT.$VERSION.$FLAGS
- FILE=$BASE.$DATE$TAG$UTAG
- if [ $DRYRUN -eq 0 ]
- then
- $EXEC -v --outfile $FILE.log --maketree $SERVER:$DIR --showomit $SECURE $SECURITY $USESPECIAL $PYUSER $PYGROUP --rundeps $@
- rc=$?
- echo RC = $rc
- if [ -e $FILE.log ] ; then
- ../showresults.py --showomit "$FILE.log" > "$FILE.out"
- ../showresults.py --showomit "$FILE.log" | grep -v PASS > "$FILE.fail"
- echo "ls -ltr $BASE*"
- fi
- else
- echo FLAGS=$FLAGS
- echo $EXEC -v --outfile $FILE.log --maketree $SERVER:$DIR --showomit $SECURE $SECURITY $USESPECIAL $PYUSER $PYGROUP --rundeps $@
- fi
- if [ -e $FILE.log ] || [ $DRYRUN -eq 1 ] ; then
- echo ../showresults.py --showomit $FILE.log
- echo "results saved to $FILE.log"
- echo "output saved to $FILE.out"
- echo "failures saved to $FILE.fail"
- echo "ls -ltr $BASE*"
- else
- echo "----- FAILURE -----"
- fi
- }
- while getopts ":t:s:yud:xp:ck:3C" OPT; do
- case $OPT in
- t) TAG=.$OPTARG
- ;;
- s) SERVER=$OPTARG
- ;;
- d) DIR=$OPTARG
- ;;
- y) DRYRUN=1
- ;;
- x) SECURE=""
- ;;
- u) PYUSER="--uid=500"
- PYGROUP="--gid=501"
- UTAG=".user=ffilz"
- DIR=$DIR/ffilz
- ;;
- \?) echo usage
- echo "pynfs [-t tag] [-s server] [-d dir] [-x] [-u] [-p] [-k sec] [-y] test cases"
- echo " -t tag to add to file name to distinguish runs"
- echo " -s server to run against"
- echo " -d directory to run against"
- echo " -x don't use secure option for 4.0"
- echo " -u run as ffilz (500:501)"
- echo " -p run with --usespecial option"
- echo " -k specify security flavor to use"
- echo " -y dry run, just display the command that will be run and the files produced"
- echo " -3 run NFS3 tests"
- echo
- echo "pynfs [-c]"
- echo " show codes and flags for test cases"
- echo
- echo "pynfs [-?]"
- echo " show this help"
- exit 1
- ;;
- p) USESPECIAL="--usespecial=$OPTARG"
- ;;
- c) $EXEC --showcodesflags
- exit 0
- ;;
- k) SECURITY="--security=$OPTARG"
- ;;
- 3) EXEC="./testserver3.py"
- VERSION="nfs3.0"
- ;;
- C) rm -Rf /export/test1/pynfs/
- ;;
- esac
- done
- shift $(($OPTIND - 1))
- DATE=`date +%Y-%m-%d`
- # SATT1a runs only on FSAL_GPFS
- # RD12 assumes AUTH_SYS - OK to run though
- if [ -n "$1" ] ; then
- if [ "$1" = bfskip ] ; then
- run_tests CID1 CID6 SATT1a CIDCF2 COMP6 CR13 CR14 LINK4a LINK9 LOOKP2a OPCF3a OPEN4 RDDR12 RNM11 SATT12a WRT5 RD4 RM7 RNM10 LOCK19 LOCK22 DELEG11 DELEG12 DELEG13a DELEG13b DELEG13c DELEG13d DELEG13e GSS8 RD9g WRT10g
- elif [ "$1" = gan ] ; then
- if [ $VERSION = "nfs4.0" ] ; then
- run_tests ganesha RD12 LOCK8c
- elif [ $VERSION = "nfs4.1" ] ; then
- run_tests ganesha
- else
- run_tests ganesha
- fi
- else
- run_tests $@
- fi
- else
- if [ $VERSION = "nfs4.0" ] ; then
- run_tests all ganesha RD12 LOCK8c
- elif [ $VERSION = "nfs4.1" ] ; then
- run_tests all ganesha
- else
- run_tests all
- fi
- fi
- exit $rc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement