Whamcloud - gitweb
LU-3540 lod: update recovery thread
[fs/lustre-release.git] / lustre / tests / functions.sh
index 23ff2a4..8e5a3cd 100644 (file)
@@ -296,7 +296,7 @@ run_compilebench() {
     [ -e $cbench_DIR/compilebench ] || \
         { skip_env "No compilebench build" && return; }
 
-       local space=$(lfs_df $DIR | awk '/^filesystem/{ print $4 }')
+       local space=$(df -P $DIR | tail -n 1 | awk '{ print $4 }')
        if [[ $space -le $((1024 * 1024 * cbench_IDIRS)) ]]; then
                cbench_IDIRS=$((space / 1024 / 1024))
                [[ $cbench_IDIRS -eq 0 ]] &&
@@ -335,6 +335,7 @@ run_metabench() {
     mbench_NFILES=${mbench_NFILES:-30400}
     # threads per client
     mbench_THREADS=${mbench_THREADS:-4}
+       mbench_OPTIONS=${mbench_OPTIONS:-}
 
     [ x$METABENCH = x ] &&
         { skip_env "metabench not found" && return; }
@@ -353,7 +354,7 @@ run_metabench() {
     # -S             Run the file stat tests.
     # -c nfile       Number of files to be used in each test.
     # -k             Cleanup.  Remove the test directories.
-    local cmd="$METABENCH -w $testdir -c $mbench_NFILES -C -S -k"
+       local cmd="$METABENCH -w $testdir -c $mbench_NFILES -C -S -k $mbench_OPTIONS"
     echo "+ $cmd"
 
        # find out if we need to use srun by checking $SRUN_PARTITION
@@ -586,11 +587,13 @@ run_ior() {
     # -t N  transferSize -- size of transfer in bytes (e.g.: 8, 4k, 2m, 1g)"
     # -w    writeFile -- write file"
     # -r    readFile -- read existing file"
+    # -W    checkWrite -- check read after write"
+    # -C    reorderTasks -- changes task ordering to n+1 ordering for readback
     # -T    maxTimeDuration -- max time in minutes to run tests"
     # -k    keepFile -- keep testFile(s) on program exit
 
     local cmd="$IOR -a $ior_type -b ${ior_blockSize}g -o $testdir/iorData \
-         -t $ior_xferSize -v -w -r -i $ior_iteration -T $ior_DURATION -k"
+         -t $ior_xferSize -v -C -w -r -W -i $ior_iteration -T $ior_DURATION -k"
     [ $type = "fpp" ] && cmd="$cmd -F"
 
        echo "+ $cmd"
@@ -809,9 +812,6 @@ run_parallel_grouplock() {
     # mpi_run uses mpiuser
     chmod 0777 $testdir
 
-    do_nodes $clients "lctl set_param llite.*.max_rw_chunk=0" ||
-        error "set_param max_rw_chunk=0 failed "
-
     local cmd
     local status=0
     local subtest
@@ -908,7 +908,7 @@ run_statahead () {
 
     local num_mntpts=$statahead_NUMMNTPTS
     local mntpt_root=$TMP/mntpt/lustre
-    local mntopts=${MNTOPTSTATAHEAD:-$MOUNTOPT}
+    local mntopts=$MNTOPTSTATAHEAD
 
     echo "Mounting $num_mntpts lustre clients starts on $clients"
     trap "cleanup_statahead $clients $mntpt_root $num_mntpts" EXIT ERR