Whamcloud - gitweb
LU-11078 tests: customise run_ior() 88/32688/3
authorElena Gryaznova <c17455@cray.com>
Sat, 9 Jun 2018 10:11:00 +0000 (13:11 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 4 Jan 2019 04:46:41 +0000 (04:46 +0000)
Sometimes it is required to run ior with parameters
missing in run_ior() cmd, custom mpi threads per
cient and custom striping.

Now these parameters can be specified by:
  ior_custom_params
  mpi_ior_custom_threads
  ior_stripe_params

Test-Parameters:trivial testlist=parallel-scale
Signed-off-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Change-Id: I785d7aece107b2b53d0c422fbaec5c469b5bbc97
Reviewed-on: https://review.whamcloud.com/32688
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/functions.sh

index 2eebe3d..72ea7db 100644 (file)
@@ -619,7 +619,8 @@ run_ior() {
        # mpi_run uses mpiuser
        chmod 0777 $testdir
        if [ -z "$NFSCLIENT" ]; then
        # mpi_run uses mpiuser
        chmod 0777 $testdir
        if [ -z "$NFSCLIENT" ]; then
-               $LFS setstripe $testdir -c -1 ||
+               ior_stripe_params=${ior_stripe_params:-"-c -1"}
+               $LFS setstripe $testdir $ior_stripe_params ||
                        { error "setstripe failed" && return 2; }
        fi
 
                        { error "setstripe failed" && return 2; }
        fi
 
@@ -635,9 +636,14 @@ run_ior() {
        # -T    maxTimeDuration -- max time in minutes to run tests"
        # -k    keepFile -- keep testFile(s) on program exit
 
        # -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}${ior_blockUnit} \
+       local cmd
+       if [ -n "$ior_custom_params" ]; then
+               cmd="$IOR $ior_custom_params -o $testdir/iorData"
+       else
+               cmd="$IOR -a $ior_type -b ${ior_blockSize}${ior_blockUnit} \
                -o $testdir/iorData -t $ior_xferSize -v -C -w -r -W \
                -i $ior_iteration -T $ior_DURATION -k"
                -o $testdir/iorData -t $ior_xferSize -v -C -w -r -W \
                -i $ior_iteration -T $ior_DURATION -k"
+       fi
 
        [ $type = "fpp" ] && cmd="$cmd -F"
 
 
        [ $type = "fpp" ] && cmd="$cmd -F"
 
@@ -648,8 +654,9 @@ run_ior() {
                        -n $((num_clients * ior_THREADS)) -p $SRUN_PARTITION \
                        -- $cmd
        else
                        -n $((num_clients * ior_THREADS)) -p $SRUN_PARTITION \
                        -- $cmd
        else
+               mpi_ior_custom_threads=${mpi_ior_custom_threads:-"$((num_clients * ior_THREADS))"}
                mpi_run ${MACHINEFILE_OPTION} ${MACHINEFILE} \
                mpi_run ${MACHINEFILE_OPTION} ${MACHINEFILE} \
-                       -np $((num_clients * $ior_THREADS)) $cmd
+                       -np $mpi_ior_custom_threads $cmd
        fi
 
     local rc=$?
        fi
 
     local rc=$?