Whamcloud - gitweb
LU-2562 test: cleanup previous test result
authorHongchao Zhang <hongchao.zhang@whamcloud.com>
Tue, 15 Jan 2013 12:54:11 +0000 (20:54 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 8 Feb 2013 18:51:45 +0000 (13:51 -0500)
in sanity.sh, test_51ba only depends on test_51b, but test_51a
also create files under $DIR/$tdir, which causes test_51ba fail
for it also takes those files into account.

Change-Id: I42f491f64c8d2d65bee656c167c9523274cd7200
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/5183
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/tests/sanity.sh

index d470133..1ebc64d 100644 (file)
@@ -3484,7 +3484,7 @@ run_test 50 "special situations: /proc symlinks  ==============="
 
 test_51a() {   # was test_51
        # bug 1516 - create an empty entry right after ".." then split dir
-       test_mkdir $DIR/$tdir
+       test_mkdir -p $DIR/$tdir
        touch $DIR/$tdir/foo
        $MCREATE $DIR/$tdir/bar
        rm $DIR/$tdir/foo
@@ -3505,6 +3505,9 @@ test_51b() {
        [ $PARALLEL == "yes" ] && skip "skip parallel run" && return
        local BASE=$DIR/$tdir
 
+       # cleanup the directory
+       rm -fr $BASE
+
        test_mkdir -p $BASE
 
        local mdtidx=$(printf "%04x" $($LFS getstripe -M $BASE))