X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsgpdd-survey.sh;h=d0df78862acbcf3ceb7d935bbc0730d31e10fab0;hb=3cce65712d94cffe8f1626545845b95b88aef672;hp=3b27420953df5097c7b881963ce9711dae2cac24;hpb=8c4f96f910786ff3d73474ef5f8d4a96a30a0bed;p=fs%2Flustre-release.git diff --git a/lustre/tests/sgpdd-survey.sh b/lustre/tests/sgpdd-survey.sh index 3b27420..d0df788 100644 --- a/lustre/tests/sgpdd-survey.sh +++ b/lustre/tests/sgpdd-survey.sh @@ -16,9 +16,9 @@ size=${size:-1024} [ "$SLOW" = no ] && { crghi=2; thrhi=2; } -if ! ([ "$SGPDD_YES" ] && [ "$REFORMAT" ]); then - skip_env "$0 reformats all devices, please set SGPDD_YES and REFORMAT to run this test" - exit 0 +if [ "$SGPDD_YES" != "yes" -o "$REFORMAT" != "yes" ]; then + skip_env "$0 reformats all devices, set SGPDD_YES=yes REFORMAT=yes" + exit 0 fi # Skip these tests @@ -46,13 +46,13 @@ run_sgpdd_facets () { for facet in ${facets//,/ }; do local host=$(facet_host $facet) local dev=${facet}_dev - local var=${host}_devs + local var=$(node_var_name ${host}_devs) eval ${var}=$(expand_list ${!var} ${!dev}) facetshosts=$(expand_list $facetshosts $host) done for host in ${facetshosts//,/ }; do - var=${host}_devs + var=$(node_var_name ${host}_devs) echo "=== $facets === $host === ${!var} ===" local scsidevs=${!var} run_sgpdd_host $host ${scsidevs} @@ -60,24 +60,24 @@ run_sgpdd_facets () { } test_1 () { - local mdss=$(get_facets MDS) + local mdss=$(get_facets MDS) - check_progs_installed $(facets_hosts $mdss) $SGPDDSURVEY sg_map || \ - { skip_env "SGPDDSURVEY=$SGPDDSURVEY or sg_map not found" && return 0; } + check_progs_installed $(facets_hosts $mdss) $SGPDDSURVEY sg_map || + skip_env "SGPDDSURVEY=$SGPDDSURVEY or sg_map not found" - run_sgpdd_facets $mdss + run_sgpdd_facets $mdss } run_test 1 "sgpdd-survey, mds, scsidevs" test_2 () { - local osts=$(get_facets OST) + local osts=$(get_facets OST) - check_progs_installed $(facets_hosts $osts) $SGPDDSURVEY sg_map || \ - { skip_env "SGPDDSURVEY=$SGPDDSURVEY or sg_map not found" && return 0; } + check_progs_installed $(facets_hosts $osts) $SGPDDSURVEY sg_map || + skip_env "SGPDDSURVEY=$SGPDDSURVEY or sg_map not found" - run_sgpdd_facets $osts + run_sgpdd_facets $osts } run_test 2 "sgpdd-survey, osts, scsidevs" -complete $(basename $0) $SECONDS +complete $SECONDS exit_status