Whamcloud - gitweb
LU-14095 gss: use RCU protection for sunrpc cache
[fs/lustre-release.git] / lustre / tests / scrub-performance.sh
index 785335a..0c90e45 100644 (file)
@@ -3,23 +3,22 @@
 set -e
 
 ONLY=${ONLY:-"$*"}
-ALWAYS_EXCEPT="$SCRUB_PERFORMANCE_EXCEPT"
-[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
+ALWAYS_EXCEPT="$SCRUB_PERFORMANCE_EXCEPT"
+build_test_filter
+
 [ "$SLOW" = "no" ] &&
        skip "skip scrub performance test under non-SLOW mode" && exit 0
 
-[ $(facet_fstype $SINGLEMDS) != ldiskfs ] &&
-       skip "ldiskfs only test" && exit 0
-[[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.2.90) ]] &&
-       skip "Need MDS version at least 2.2.90" && exit 0
+[ "$mds1_FSTYPE" != ldiskfs ] &&
+       skip "ldiskfs only test"
+[[ "$MDS1_VERSION" -lt $(version_code 2.2.90) ]] &&
+       skip "Need MDS version at least 2.2.90"
 require_dsh_mds || exit 0
 
 NTHREADS=${NTHREADS:-0}
@@ -41,7 +40,7 @@ if [ ${NTHREADS} -eq 0 ]; then
        NTHREADS=$((CPUCORE * 2))
 fi
 
-stopall
+cleanupall
 
 if ! combined_mgs_mds ; then
        do_rpc_nodes $(facet_active_host mgs) load_modules_local
@@ -97,12 +96,12 @@ scrub_create() {
 }
 
 scrub_cleanup() {
-       stopall
+       cleanupall
        do_rpc_nodes $(facet_active_host $SINGLEMDS) unload_modules
        if ! combined_mgs_mds ; then
                do_rpc_nodes $(facet_active_host mgs) unload_modules
        fi
-       formatall
+       REFORMAT="yes" cleanup_and_setup_lustre
 }
 
 scrub_create_nfiles() {
@@ -135,8 +134,6 @@ scrub_create_nfiles() {
        done
 }
 
-build_test_filter
-
 test_0() {
        local BASECOUNT=0
        local i
@@ -196,4 +193,5 @@ run_test 0 "OI scrub performance test"
 # cleanup the system at last
 scrub_cleanup
 complete $SECONDS
+check_and_cleanup_lustre
 exit_status