Whamcloud - gitweb
b=12599
[fs/lustre-release.git] / lustre / tests / recovery-small.sh
index 4a2b57a..ee6ebd7 100755 (executable)
@@ -15,32 +15,10 @@ build_test_filter
 
 # Allow us to override the setup if we already have a mounted system by
 # setting SETUP=" " and CLEANUP=" "
-SETUP=${SETUP:-"setup"}
-CLEANUP=${CLEANUP:-"cleanup"}
+SETUP=${SETUP:-""}
+CLEANUP=${CLEANUP:-""}
 
-setup() {
-    [ "$REFORMAT" ] && formatall
-    setupall
-}
-
-cleanup() {
-       cleanupall || { echo "FAILed to clean up"; exit 20; }
-}
-
-if [ ! -z "$EVAL" ]; then
-    eval "$EVAL"
-    exit $?
-fi
-
-if [ "$ONLY" == "cleanup" ]; then
-    sysctl -w lnet.debug=0 || true
-    cleanup
-    exit
-fi
-
-$SETUP
-
-[ "$ONLY" == "setup" ] && exit
+cleanup_and_setup_lustre
 
 test_1() {
     drop_request "mcreate $MOUNT/1"  || return 1
@@ -877,5 +855,5 @@ test_58() { # bug 11546
 run_test 58 "Eviction in the middle of open RPC reply processing"
 
 equals_msg `basename $0`: test complete, cleaning up
-$CLEANUP
+check_and_cleanup_lustre
 [ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true