Whamcloud - gitweb
LU-9250 tests: add parallel-scale xdd test 76/26176/5
authorElena Gryaznova <c17455@cray.com>
Fri, 16 Feb 2018 10:11:04 +0000 (13:11 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 27 Feb 2018 03:45:49 +0000 (03:45 +0000)
Patch adds parallel-scale xdd test.

Our customers report the Lustre issues hit during
xdd test. We need a flexible way to reproduce the
failures.

Author: Chennaiah Palla <chennaiah.palla@seagate.com>

Signed-off-by: Chennaiah Palla <chennaiah.palla@seagate.com>
Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: LUS-5206
Seagate-bug-id: MRP-3915
Test-Parameters: testlist=parallel-scale
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Change-Id: Ia4823aa8ce64aad3d43b2611b24f48a532b8796c
Reviewed-on: https://review.whamcloud.com/26176
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/functions.sh
lustre/tests/parallel-scale.sh

index f703f40..b5ab487 100644 (file)
@@ -1142,3 +1142,56 @@ EOF
        rm -rf $testdir
 }
 
+run_xdd() {
+       XDD=${XDD:=$(which xdd 2> /dev/null || true)}
+
+       local clients=${CLIENTS:-$(hostname)}
+       local testdir=$DIR/d0.xdd
+       xdd_queuedepth=${xdd_queuedepth:-4}
+       xdd_blocksize=${xdd_blocksize:-512}
+       xdd_reqsize=${xdd_reqsize:-128}
+       xdd_mbytes=${xdd_mbytes:-100}
+       xdd_passes=${xdd_passes:-40}
+       xdd_rwratio=${xdd_rwratio:-0}
+       xdd_ntargets=${xdd_ntargets:-6}
+       local xdd_custom_params=${xdd_custom_params:-"-dio -stoponerror \
+               -maxpri -minall -noproclock -nomemlock"}
+
+       [ x$XDD = x ] &&
+               { skip "XDD not found" && return; }
+
+       print_opts XDD clients xdd_queuedepth xdd_blocksize xdd_reqsize \
+               xdd_mbytes xdd_passes xdd_rwratio
+
+       mkdir -p $testdir
+
+       local files=""
+       # Target files creates based on the given number of targets
+       for (( i=0; i < $xdd_ntargets; i++ ))
+       do
+               files+="${testdir}/xdd"$i" "
+       done
+
+       # -targets      specifies the devices or files to perform operation
+       # -reqsize      number of 'blocks' per operation
+       # -mbytes       number of 1024*1024-byte blocks to transfer
+       # -blocksize    size of a single 'block'
+       # -passes       number of times to read mbytes
+       # -queuedepth   number of commands to queue on the target
+       # -rwratio      percentage of read to write operations
+       # -verbose      will print out statistics on each pass
+
+       local cmd="$XDD -targets $xdd_ntargets $files -reqsize $xdd_reqsize \
+               -mbytes $xdd_mbytes -blocksize $xdd_blocksize \
+               -passes $xdd_passes -queuedepth $xdd_queuedepth \
+               -rwratio $xdd_rwratio -verbose $xdd_custom_params"
+       echo "+ $cmd"
+
+       local rc=0
+       do_nodesv $clients "$cmd "
+       rc=$?
+
+       [ $rc = 0 ] || error "xdd failed: $rc"
+
+       rm -rf $testdir
+}
index c725969..aea27cf 100644 (file)
@@ -62,6 +62,9 @@ if [ "$SLOW" = "no" ]; then
        fs_test_nobj=${fs_test_nobj:-2}
 fi
 
+# xdd
+[ "$SLOW" = "no" ] && xdd_passes=${xdd_passes:-15}
+
 . $LUSTRE/tests/functions.sh
 
 build_test_filter
@@ -168,6 +171,11 @@ test_fio () {
 }
 run_test fio "fio"
 
+test_xdd () {
+       run_xdd
+}
+run_test xdd "xdd"
+
 [ $(facet_fstype $SINGLEMDS) = zfs -o $(facet_fstype "ost1") = zfs ] &&
        SLOW=$ZFSSLOW