Whamcloud - gitweb
LU-14789 tests: make sanity 133f and 133g working
[fs/lustre-release.git] / lustre / tests / sgpdd-survey.sh
index a83dbf0..b2c1e23 100644 (file)
@@ -1,13 +1,15 @@
 #!/bin/bash
-#set -x
+
 set -e
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
+ALWAYS_EXCEPT="$SGPDD_SURVEY_EXCEPT"
+build_test_filter
+
 # QE uses the following parameters:
 # size=128 crghi=16 thrhi=32
 crghi=${crghi:-2}
@@ -21,11 +23,6 @@ if [ "$SGPDD_YES" != "yes" -o "$REFORMAT" != "yes" ]; then
        exit 0
 fi
 
-# Skip these tests
-ALWAYS_EXCEPT="$SGPDD_SURVEY_EXCEPT"
-
-build_test_filter
-
 init_facets_vars
 
 cleanupall
@@ -60,22 +57,22 @@ 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"