X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fmds-survey.sh;h=93715b25ab1b8a57e1de4879b4014862a4cbb272;hb=3afd06e2dc99a0a9a1f267b8a80c8e5208917856;hp=5945711e3692a25e7a4817e3c2bbc1cb81b8045e;hpb=069f593572509d6ee285ba6ea8950101ccb62d72;p=fs%2Flustre-release.git diff --git a/lustre/tests/mds-survey.sh b/lustre/tests/mds-survey.sh index 5945711..93715b2 100644 --- a/lustre/tests/mds-survey.sh +++ b/lustre/tests/mds-survey.sh @@ -1,13 +1,22 @@ #!/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="$MDS_SURVEY_EXCEPT " + +build_test_filter + +MDSSURVEY=${MDSSURVEY:-$(which mds-survey 2>/dev/null || true)} +[ -z ${MDSSURVEY} ] && skip_env "mds-survey not found" + +if [ "$MDS1_VERSION" -lt $(version_code 2.3.51) ]; then + skip "Need MDS version at least 2.3.51" +fi + file_count=${file_count:-150000} dir_count=${dir_count:-4} thrhi=${thrhi:-8} @@ -15,19 +24,6 @@ thrlo=${thrlo:-1} [ "$SLOW" = no ] && { file_count=50000; dir_count=2; thrhi=4; } -# Skip these tests -ALWAYS_EXCEPT="$MDS_SURVEY_EXCEPT" - -MDSSURVEY=${MDSSURVEY:-$(which mds-survey 2>/dev/null || true)} -if [ -z ${MDSSURVEY} ]; then - skip_env "mds-survey not found" && exit -fi - -if [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.3.51) ]; then - skip_env "Need MDS version at least 2.3.51" && exit -fi - -build_test_filter check_and_setup_lustre adjust_inode() { @@ -121,13 +117,9 @@ run_test 1 "Metadata survey with zero-stripe" test_2() { local mdscount=$(get_node_count "$(mdts_nodes)") - if [ $mdscount -gt 1 ]; then - skip_env "Only run this test on single MDS" && return - fi + [ $mdscount -gt 1 ] && skip_env "Only run this test on single MDS" + [ $ost_count -eq 0 ] && skip_env "Need to mount OST to test" - if [ $ost_count -eq 0 ]; then - skip_env "Need to mount OST to test" && return - fi mds_survey_run "mdd" "1" } run_test 2 "Metadata survey with stripe_count = 1"