Whamcloud - gitweb
LU-260 Add open-unlinked dir regression test case.
authorBobi Jam <bobijam@whamcloud.com>
Tue, 3 May 2011 07:50:15 +0000 (15:50 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 12 May 2011 22:02:11 +0000 (15:02 -0700)
Change-Id: Ic9efd3d89377bc34470cb3b7ab88f62b2a03b058
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/485
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 5225cd0..bd56ac5 100644 (file)
@@ -7420,6 +7420,25 @@ test_180b() {
 }
 run_test 180b "test obdecho directly on obdfilter"
 
 }
 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
 # OST pools tests
 POOL=${POOL:-cea1}
 TGT_COUNT=$OSTCOUNT