Whamcloud - gitweb
LU-2840 tests: Clean the environment for test.
authoryangsheng <yang.sheng@intel.com>
Thu, 28 Feb 2013 08:31:02 +0000 (16:31 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 11 Mar 2013 21:21:08 +0000 (17:21 -0400)
Use unique directory for sanityn test_21. Avoid it
impacted by previous test.

Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I36a06605732bb0048c25c622d4c8f1192d761a88
Reviewed-on: http://review.whamcloud.com/5556
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanityn.sh

index d40429c..63b2aa7 100644 (file)
@@ -472,18 +472,18 @@ run_test 20 "test extra readahead page left in cache ===="
 
 cleanup_21() {
        trap 0
 
 cleanup_21() {
        trap 0
-       umount $DIR1/d21
+       umount $DIR1/$tdir
 }
 
 test_21() { # Bug 5907
 }
 
 test_21() { # Bug 5907
-       test_mkdir $DIR1/d21
-       mount /etc $DIR1/d21 --bind || error "mount failed" # Poor man's mount.
+       test_mkdir $DIR1/$tdir
+       mount /etc $DIR1/$tdir --bind || error "mount failed" # Poor man's mount.
        trap cleanup_21 EXIT
        trap cleanup_21 EXIT
-       rmdir -v $DIR1/d21 && error "Removed mounted directory"
-       rmdir -v $DIR2/d21 && echo "Removed mounted directory from another mountpoint, needs to be fixed"
-       test -d $DIR1/d21 || error "Mounted directory disappeared"
+       rmdir -v $DIR1/$tdir && error "Removed mounted directory"
+       rmdir -v $DIR2/$tdir && echo "Removed mounted directory from another mountpoint, needs to be fixed"
+       test -d $DIR1/$tdir || error "Mounted directory disappeared"
        cleanup_21
        cleanup_21
-       test -d $DIR2/d21 || test -d $DIR1/d21 && error "Removed dir still visible after umount"
+       test -d $DIR2/$tdir || test -d $DIR1/$tdir && error "Removed dir still visible after umount"
        true
 }
 run_test 21 " Try to remove mountpoint on another dir ===="
        true
 }
 run_test 21 " Try to remove mountpoint on another dir ===="