From 5b53406773c7fe9b9fa9f2ef4c342f85b5db1de1 Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Tue, 3 May 2011 15:50:15 +0800 Subject: [PATCH] LU-260 Add open-unlinked dir regression test case. Change-Id: Ic9efd3d89377bc34470cb3b7ab88f62b2a03b058 Signed-off-by: Bobi Jam Reviewed-on: http://review.whamcloud.com/485 Tested-by: Hudson Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 5225cd0..bd56ac5 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -7420,6 +7420,25 @@ test_180b() { } run_test 180b "test obdecho directly on obdfilter" +test_181() { # bug 22177 + mkdir -p $DIR/$tdir || error "creating dir $DIR/$tdir" + # create enough files to index the directory + createmany -o $DIR/$tdir/foobar 4000 + # print attributes for debug purpose + lsattr -d . + # open dir + multiop_bg_pause $DIR/$tdir D_Sc || return 1 + MULTIPID=$! + # remove the files & current working dir + unlinkmany $DIR/$tdir/foobar 4000 + rmdir $DIR/$tdir + kill -USR1 $MULTIPID + wait $MULTIPID + stat $DIR/$tdir && error "open-unlinked dir was not removed!" + return 0 +} +run_test 181 "Test open-unlinked dir ========================" + # OST pools tests POOL=${POOL:-cea1} TGT_COUNT=$OSTCOUNT -- 1.8.3.1