Whamcloud - gitweb
LU-12472 tests: update sanity-krb5.sh
[fs/lustre-release.git] / lustre / tests / large-scale.sh
index 8da9783..9fd35a7 100644 (file)
@@ -19,13 +19,12 @@ init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
-remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0
+remote_mds_nodsh && skip "remote MDS with nodsh"
 
-[ -z "$CLIENTS" ] && skip_env "$TESTSUITE: Need two or more clients" && exit 0
+[ -z "$CLIENTS" ] && skip_env "$TESTSUITE: Need two or more clients"
 [ $CLIENTCOUNT -lt 2 ] &&
-       skip_env "$TESTSUITE: Need 2+ clients, have only $CLIENTCOUNT" && exit 0
+       skip_env "$TESTSUITE: Need 2+ clients, have only $CLIENTCOUNT"
 
-#
 [ "$SLOW" = "no" ] && EXCEPT_SLOW=""
 
 MOUNT_2=""
@@ -71,42 +70,46 @@ test_3a() {
 
     local num=$increment
 
-    while [ $num -le $CLIENTCOUNT ]; do
-        list=$(comma_list ${nodes[@]:0:$num}) 
-
-        generate_machine_file $list $machinefile ||
-            { error "can not generate machinefile"; exit 1; }
-
-        for i in $(seq $iters); do
-            mdsrate_cleanup $num $machinefile $nfiles $dir 'f%%d' --ignore
-
-            COMMAND="${MDSRATE} --create --nfiles $nfiles --dir $dir --filefmt 'f%%d'"
-            mpi_run -np $((num * nthreads)) -machinefile $machinefile ${COMMAND} | tee ${LOG} &
-
-            pid=$!
-            echo "pid=$pid"
-
-            # 2 threads 100000 creates 117 secs
-            sleep 20
-
-            log "$i : Starting failover on $SINGLEMDS"
-            facet_failover $SINGLEMDS
-            if ! wait_recovery_complete $SINGLEMDS $((TIMEOUT * 10)); then
-                echo "$SINGLEMDS recovery is not completed!"
-                kill -9 $pid
-                exit 7
-            fi
-
-            duration=$(do_facet $SINGLEMDS lctl get_param -n $procfile | grep recovery_duration)
-            
-            res=( "${res[@]}" "$num" )
-            res=( "${res[@]}" "$duration" )
-            echo "RECOVERY TIME: NFILES=$nfiles number of clients: $num  $duration"
-            wait $pid
-
-        done
-        num=$((num + increment))
-    done
+       while [ $num -le $CLIENTCOUNT ]; do
+               list=$(comma_list ${nodes[@]:0:$num})
+
+               generate_machine_file $list $machinefile ||
+                       { error "can not generate machinefile"; exit 1; }
+
+               for i in $(seq $iters); do
+                       mdsrate_cleanup $num $machinefile $nfiles $dir 'f%%d' \
+                               --ignore
+
+                       COMMAND="${MDSRATE} --create --nfiles $nfiles --dir
+                                $dir --filefmt 'f%%d'"
+                       mpi_run ${MACHINEFILE_OPTION} $machinefile \
+                               -np $((num * nthreads)) ${COMMAND} | tee ${LOG}&
+
+                       pid=$!
+                       echo "pid=$pid"
+
+                       # 2 threads 100000 creates 117 secs
+                       sleep 20
+
+                       log "$i : Starting failover on $SINGLEMDS"
+                       facet_failover $SINGLEMDS
+                       if ! wait_recovery_complete $SINGLEMDS \
+                            $((TIMEOUT * 10)); then
+                               echo "$SINGLEMDS recovery is not completed!"
+                               kill -9 $pid
+                               exit 7
+                       fi
+
+                       duration=$(do_facet $SINGLEMDS lctl get_param -n \
+                               $procfile | grep recovery_duration)
+
+                       res=( "${res[@]}" "$num" )
+                       res=( "${res[@]}" "$duration" )
+                       echo "RECOVERY TIME: NFILES=$nfiles number of clients: $num $duration"
+                       wait $pid
+               done
+               num=$((num + increment))
+       done
 
     mdsrate_cleanup $num $machinefile $nfiles $dir 'f%%d' --ignore