Whamcloud - gitweb
LU-14808 utils: fix YAML support for DOM files
[fs/lustre-release.git] / lustre / tests / parallel-scale-nfs.sh
index 74ae30b..7f426ee 100755 (executable)
@@ -1,15 +1,17 @@
 #!/bin/bash
-#
-#set -vx
 
 NFSVERSION=${1:-"3"}
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 # only call init_test_env if this script is called directly
 if [[ -z "$TESTSUITE" || "$TESTSUITE" = "$(basename $0 .sh)" ]]; then
        init_test_env $@
+else
+       . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+
 fi
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+
 init_logging
 
 racer=$LUSTRE/tests/racer/racer.sh
@@ -23,7 +25,7 @@ NFS_CLIENTS=$(exclude_items_from_list $NFS_CLIENTS $LUSTRE_CLIENT_NFSSRV)
 NFS_CLIMNTPT=${NFS_CLIMNTPT:-$MOUNT}
 
 [ -z "$NFS_CLIENTS" ] &&
-       skip_env "need at least two nodes: nfs server and nfs client" && exit 0
+       skip_env "need at least two nodes: nfs server and nfs client"
 
 [ "$NFSVERSION" = "4" ] && cl_mnt_opt="${MOUNT_OPTS:+$MOUNT_OPTS,}32bitapi" ||
        cl_mnt_opt=""
@@ -69,7 +71,6 @@ NFSCLIENT=true
 FAIL_ON_ERROR=false
 
 # common setup
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
 clients=${NFS_CLIENTS:-$HOSTNAME}
 generate_machine_file $clients $MACHINEFILE ||
        error "Failed to generate machine file"
@@ -125,7 +126,9 @@ test_iorfpp() {
 run_test iorfpp "iorfpp"
 
 test_racer_on_nfs() {
-       $racer $CLIENTS
+       local racer_params="MDSCOUNT=$MDSCOUNT OSTCOUNT=$OSTCOUNT LFS=$LFS"
+
+       do_nodes $CLIENTS "$racer_params $racer $TESTDIR"
 }
 run_test racer_on_nfs "racer on NFS client"