noinst_SCRIPTS += recovery-random-scale.sh parallel-scale.sh metadata-updates.sh
noinst_SCRIPTS += lustre-rsync-test.sh ost-pools.sh rpc.sh yaml.sh liblustre.sh
noinst_SCRIPTS += lnet-selftest.sh obdfilter-survey.sh mmp.sh
+noinst_SCRIPTS += sgpdd-survey.sh
nobase_noinst_SCRIPTS = cfg/local.sh
nobase_noinst_SCRIPTS += acl/make-tree acl/run cfg/ncli.sh
nobase_noinst_SCRIPTS += racer/dir_create.sh racer/file_create.sh racer/file_list.sh
sanity-gss performance-sanity large-scale recovery-mds-scale
recovery-double-scale recovery-random-scale parallel-scale
lustre_rsync-test metadata-updates ost-pools lnet-selftest
- mmp obdfilter-survey"
+ mmp obdfilter-survey sgpdd-survey"
if [[ -n $@ ]]; then
ACC_SM_ONLY="${ACC_SM_ONLY} $@"
log_test_status $duration $status
$CLEANUP
- $SETUP
+ [ x$suite = xSGPDD_SURVEY ] || $SETUP
+
eval ${suite}="done"
else
echo "Skipping $suite_name"
--- /dev/null
+#!/bin/bash
+#set -x
+set -e
+
+LUSTRE=${LUSTRE:-`dirname $0`/..}
+. $LUSTRE/tests/test-framework.sh
+init_test_env $@
+. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+init_logging
+
+# QE uses the following parameters:
+# size=128 crghi=16 thrhi=32
+crghi=${crghi:-2}
+thrhi=${thrhi:-16}
+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
+fi
+
+# Skip these tests
+ALWAYS_EXCEPT="$SGPDD_SURVEY_EXCEPT"
+
+SGPDDSURVEY=${SGPDDSURVEY:-$(which sgpdd-survey)}
+
+build_test_filter
+
+init_facets_vars
+
+cleanupall
+
+run_sgpdd_host () {
+ local host=$1
+ local devs=$2
+
+ local params="size=$size crghi=$crghi thrhi=$thrhi"
+ do_rpc_nodes $host run_sgpdd $devs "$params"
+}
+
+run_sgpdd_facets () {
+ local facets=$1
+ local facet
+
+ local facetshosts
+ for facet in ${facets//,/ }; do
+ local host=$(facet_host $facet)
+ local dev=${facet}_dev
+ local var=${host}_devs
+ eval ${var}=$(expand_list ${!var} ${!dev})
+ facetshosts=$(expand_list $facetshosts $host)
+ done
+
+ for host in ${facetshosts//,/ }; do
+ var=${host}_devs
+ echo "=== $facets === $host === ${!var} ==="
+ local scsidevs=${!var}
+ run_sgpdd_host $host ${scsidevs}
+ done
+}
+
+test_1 () {
+ local mdss=$(get_facets MDS)
+
+ run_sgpdd_facets $mdss
+}
+run_test 1 "sgpdd-survey, mds, scsidevs"
+
+test_2 () {
+ local osts=$(get_facets OST)
+
+ run_sgpdd_facets $osts
+}
+run_test 2 "sgpdd-survey, osts, scsidevs"
+
+equals_msg `basename $0`: test complete, cleaning up
+[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true
fi
export LST=${LST:-"$LUSTRE/../lnet/utils/lst"}
[ ! -f "$LST" ] && export LST=$(which lst)
+ export SGPDDSURVEY=${SGPDDSURVEY:-$(which sgpdd-survey)}
export MDSRATE=${MDSRATE:-"$LUSTRE/tests/mpi/mdsrate"}
[ ! -f "$MDSRATE" ] && export MDSRATE=$(which mdsrate 2> /dev/null)
if ! echo $PATH | grep -q $LUSTRE/tests/racer; then
done
do_umount
}
+
+run_sgpdd () {
+ local devs=${1//,/ }
+ shift
+ local params=$@
+ local rslt=$TMP/sgpdd_survey
+
+ # sgpdd-survey cleanups ${rslt}.* files
+
+ local cmd="rslt=$rslt $params scsidevs=\"$devs\" $SGPDDSURVEY"
+ echo + $cmd
+ eval $cmd
+ cat ${rslt}.detail
+}
+