From: yangsheng Date: Thu, 28 Feb 2013 08:31:02 +0000 (+0800) Subject: LU-2840 tests: Clean the environment for test. X-Git-Tag: 2.3.63~89 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=b00779a40f744c01863f5f2b6a90e6e8cd3ca093;p=fs%2Flustre-release.git LU-2840 tests: Clean the environment for test. Use unique directory for sanityn test_21. Avoid it impacted by previous test. Signed-off-by: yang sheng Change-Id: I36a06605732bb0048c25c622d4c8f1192d761a88 Reviewed-on: http://review.whamcloud.com/5556 Tested-by: Hudson Reviewed-by: Niu Yawei Reviewed-by: Jian Yu Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index d40429c..63b2aa7 100644 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -472,18 +472,18 @@ run_test 20 "test extra readahead page left in cache ====" cleanup_21() { trap 0 - umount $DIR1/d21 + umount $DIR1/$tdir } 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 - 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 - 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 ===="