Whamcloud - gitweb
b=13572
authorgrev <grev>
Mon, 22 Oct 2007 23:04:24 +0000 (23:04 +0000)
committergrev <grev>
Mon, 22 Oct 2007 23:04:24 +0000 (23:04 +0000)
i=Adilger

t-f wait_delete_complete() function; force test_79 to wait;
quiet test_65l output.

lustre/tests/sanity.sh
lustre/tests/test-framework.sh

index 1fc08a5..ec4518c 100644 (file)
@@ -2777,7 +2777,7 @@ run_test 65k "validate manual striping works properly with deactivated OSCs"
 test_65l() { # bug 12836
        mkdir -p $DIR/$tdir/test_dir
        $LFS setstripe $DIR/$tdir/test_dir 65536 -1 -1
-       $LFS find -mtime -1 $DIR/$tdir
+       $LFS find -mtime -1 $DIR/$tdir >/dev/null
 }
 run_test 65l "lfs find on -1 stripe dir ========================"
 
@@ -3274,6 +3274,9 @@ run_test 78 "handle large O_DIRECT writes correctly ============"
 test_79() { # bug 12743
        [ $(grep -c obdfilter $LPROC/devices) -eq 0 ] &&
                skip "skipping test for remote OST" && return
+
+       wait_delete_completed
+
         BKTOTAL=`awk 'BEGIN{total=0}; {total+=$1}; END{print total}' \
                  $LPROC/obdfilter/*/kbytestotal`
         BKFREE=`awk 'BEGIN{free=0}; {free+=$1}; END{print free}' \
index 37f50e5..17c1435 100644 (file)
@@ -477,6 +477,24 @@ cleanup_check() {
     return 0
 }
 
+wait_delete_completed () {
+    local TOTALPREV=`awk 'BEGIN{total=0}; {total+=$1}; END{print total}' \
+            $LPROC/osc/*/kbytesavail`
+
+    local WAIT=0
+    local MAX_WAIT=20
+    while [ "$WAIT" -ne "$MAX_WAIT" ]; do
+        sleep 1
+        TOTAL=`awk 'BEGIN{total=0}; {total+=$1}; END{print total}' \
+            $LPROC/osc/*/kbytesavail`
+        [ "$TOTAL" -eq "$TOTALPREV" ] && break
+        echo "Waiting delete completed ... prev: $TOTALPREV current: $TOTAL "
+        TOTALPREV=$TOTAL
+        WAIT=$(( WAIT + 1))
+    done
+    echo "Delete completed."
+}
+
 wait_for_host() {
     HOST=$1
     check_network "$HOST" 900