From b00779a40f744c01863f5f2b6a90e6e8cd3ca093 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Thu, 28 Feb 2013 16:31:02 +0800 Subject: [PATCH] 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 --- lustre/tests/sanityn.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 ====" -- 1.8.3.1