Whamcloud - gitweb
b=18417
authorgirish <girish>
Wed, 11 Feb 2009 06:54:52 +0000 (06:54 +0000)
committergirish <girish>
Wed, 11 Feb 2009 06:54:52 +0000 (06:54 +0000)
i=kalpak
i=girish
o=adilger

cleanup correctly after sanity 102 tests

lustre/tests/sanity.sh

index 0524904..84c68b9 100644 (file)
@@ -3807,10 +3807,9 @@ setup_test102() {
 }
 
 cleanup_test102() {
-       [ "$SETUP_TEST102" = "yes" ] || return
        trap 0
+       [ "$SETUP_TEST102" = "yes" ] || return
        rm -f $TMP/f102.tar
-       rm -rf $DIR/$tdir
        SETUP_TEST102=no
 }
 
@@ -4034,6 +4033,8 @@ test_102j() {
 }
 run_test 102j "non-root tar restore stripe info from tarfile, not keep osts ==="
 
+cleanup_test102
+
 run_acl_subtest()
 {
     $LUSTRE/tests/acl/run $LUSTRE/tests/acl/$1.test
@@ -4299,6 +4300,8 @@ test_116() {
        echo "$MAXC files created on larger OST $MAXI1"
        [ $MINC -gt 0 ] && echo "Wrote $(($MAXC * 100 / $MINC - 100))% more files to larger OST $MAXI1"
        [ $MAXC -gt $MINC ] || error_ignore "stripe QOS didn't balance free space"
+
+       rm -rf $DIR/$tdir/OST${MINI}
 }
 run_test 116 "stripe QOS: free space balance ==================="
 
@@ -4328,7 +4331,7 @@ reset_async() {
        FILE=$DIR/reset_async
 
        # Ensure all OSCs are cleared
-       $SETSTRIPE $FILE 0 -1 -1
+       $SETSTRIPE -c -1 $FILE
         dd if=/dev/zero of=$FILE bs=64k count=$OSTCOUNT
        sync
         rm $FILE