Whamcloud - gitweb
LU-594 Make sure sanity 27v fallout clears
authorBobi Jam <bobijam@whamcloud.com>
Sat, 20 Aug 2011 10:51:33 +0000 (18:51 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Aug 2011 00:42:39 +0000 (20:42 -0400)
We need wait long enough for OST to wake up from
OBD_FAIL_TGT_DELAY_PRECREATE sleep.

Change-Id: I8e4e8153a11a70b66a64f4e8a1deb3e741f58554
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1262
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 2ba4577..18b91e4 100644 (file)
@@ -1207,9 +1207,9 @@ test_27u() { # bug 4900
 run_test 27u "skip object creation on OSC w/o objects =========="
 
 test_27v() { # bug 4900
-       [ "$OSTCOUNT" -lt "2" ] && skip_env "too few OSTs" && return
-       remote_mds_nodsh && skip "remote MDS with nodsh" && return
-       remote_ost_nodsh && skip "remote OST with nodsh" && return
+        [ "$OSTCOUNT" -lt "2" ] && skip_env "too few OSTs" && return
+        remote_mds_nodsh && skip "remote MDS with nodsh" && return
+        remote_ost_nodsh && skip "remote OST with nodsh" && return
 
         exhaust_all_precreations 0x215
         reset_enospc
@@ -1228,9 +1228,10 @@ test_27v() { # bug 4900
 
         local FINISH=`date +%s`
         local TIMEOUT=`lctl get_param -n timeout`
-        [ $((FINISH - START)) -ge $((TIMEOUT / 2)) ] && \
+        local PROCESS=$((FINISH - START))
+        [ $PROCESS -ge $((TIMEOUT / 2)) ] && \
                error "$FINISH - $START >= $TIMEOUT / 2"
-
+        sleep $((TIMEOUT / 2 - PROCESS))
         reset_enospc
 }
 run_test 27v "skip object creation on slow OST ================="