From: Elena Gryaznova Date: Thu, 20 Feb 2020 12:32:54 +0000 (+0300) Subject: LU-13268 tests: customize lnet-selftest for performance X-Git-Tag: 2.13.53~152 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=cf2303aa022ca342910528ec4223637f1e34a656;p=fs%2Flustre-release.git LU-13268 tests: customize lnet-selftest for performance Sometimes we need to run read/write/ping tests separately with different lst check flags. Patch allows to: set the required list of tests via new lst_TESTS variable; set lst check to LST_BRW_CHECK_NONE, LST_BRW_CHECK_FULL or LST_BRW_CHECK_SIMPLE. Test-Parameters: trivial testlist=lnet-selftest Cray-bug-id: LUS-8005 Signed-off-by: Elena Gryaznova Reviewed-by: Alexey Lyashkov Reviewed-by: Vladimir Saveliev Change-Id: I502028f645f39f391c19b2028fc6ba5b7bdb1a96 Reviewed-on: https://review.whamcloud.com/37639 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Vladimir Saveliev Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/lnet-selftest.sh b/lustre/tests/lnet-selftest.sh index d02e377..6155c8b 100755 --- a/lustre/tests/lnet-selftest.sh +++ b/lustre/tests/lnet-selftest.sh @@ -35,6 +35,18 @@ if [ "$SLOW" = no ]; then [ $smoke_DURATION -le 300 ] || smoke_DURATION=300 fi +lst_TESTS=${lst_TESTS:-"write read ping"} + +# "none" -> LST_BRW_CHECK_NONE +# "full" -> LST_BRW_CHECK_FULL +# "simple" -> LST_BRW_CHECK_SIMPLE +lst_CHECK=${lst_CHECK:-"full"} + +case $lst_CHECK in + full|simple) check="check=$lst_CHECK";; + none) check="";; + *) error Unknown flag $lst_CHECK;; +esac nodes=$(comma_list "$(osts_nodes) $(mdts_nodes)") lst_SERVERS=${lst_SERVERS:-$(comma_list "$(host_nids_address $nodes $NETTYPE)")} lst_CLIENTS=${lst_CLIENTS:-$(comma_list "$(host_nids_address $CLIENTS $NETTYPE)")} @@ -91,7 +103,6 @@ test_smoke_sub () { local servers=$1 local clients=$2 - local nc=$(echo ${clients//,/ } | wc -w) local ns=$(echo ${servers//,/ } | wc -w) echo '#!/bin/bash' @@ -104,24 +115,27 @@ test_smoke_sub () { echo "$LST add_group s $(nids_list $servers)" echo "$LST add_batch b" - pre="$LST add_test --batch b --loop $lst_LOOP " - for t in "brw read" "brw write" ; do - for s in $lst_SIZES; do - for c in $lst_CONCR; do - for d in "${nc}:${ns} --from c --to s" "${ns}:${nc} --from s --to c"; do - echo -n "$pre" - echo " --concurrency $c --distribute $d $t check=full size=$s" - done - done - done - done - - for c in $lst_CONCR; do - for d in "${nc}:${ns} --from c --to s" "${ns}:${nc} --from s --to c"; do - echo -n "$pre" - echo " --concurrency $c --distribute $d ping " - done - done + pre="$LST add_test --batch b --loop $lst_LOOP " + for t in $lst_TESTS; do + for s in $lst_SIZES; do + for c in $lst_CONCR; do + for d in "${nc}:${ns} --from c --to s" \ + "${ns}:${nc} --from s --to c"; do + echo -n "$pre --concurrency $c"\ + " --distribute $d " + case $t in + read|write) + echo -n "brw $t" \ + " $check size=$s";; + ping) + echo -n $t;; + *) error Unknonwn LST test;; + esac + echo + done + done + done + done echo $LST run b echo sleep 1