Whamcloud - gitweb
LU-774 test: wait till space from previous tests is released
authorBobi Jam <bobijam@whamcloud.com>
Tue, 25 Oct 2011 10:12:34 +0000 (18:12 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 9 Nov 2011 19:39:36 +0000 (14:39 -0500)
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Idf4933f9b40c74b99bf763eb896680a4e0c942ff
Reviewed-on: http://review.whamcloud.com/1588
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/tests/replay-ost-single.sh

index 7a74166..d81acbf 100755 (executable)
@@ -177,6 +177,12 @@ test_6() {
     f=$TDIR/$tfile
     rm -f $f
     sync && sleep 2 && sync    # wait for delete thread
     f=$TDIR/$tfile
     rm -f $f
     sync && sleep 2 && sync    # wait for delete thread
+
+    # wait till space is returned, following
+    # (( $before > $after_dd)) test counting on that
+    wait_mds_ost_sync || return 4
+    wait_destroy_complete || return 5
+
     before=`kbytesfree`
     dd if=/dev/urandom bs=4096 count=1280 of=$f || return 28
     lfs getstripe $f
     before=`kbytesfree`
     dd if=/dev/urandom bs=4096 count=1280 of=$f || return 28
     lfs getstripe $f
@@ -208,6 +214,12 @@ test_7() {
     f=$TDIR/$tfile
     rm -f $f
     sync && sleep 5 && sync    # wait for delete thread
     f=$TDIR/$tfile
     rm -f $f
     sync && sleep 5 && sync    # wait for delete thread
+
+    # wait till space is returned, following
+    # (( $before > $after_dd)) test counting on that
+    wait_mds_ost_sync || return 4
+    wait_destroy_complete || return 5
+
     before=`kbytesfree`
     dd if=/dev/urandom bs=4096 count=1280 of=$f || return 4
     sync
     before=`kbytesfree`
     dd if=/dev/urandom bs=4096 count=1280 of=$f || return 4
     sync