Whamcloud - gitweb
b=13534
[fs/lustre-release.git] / lustre / tests / replay-single.sh
index aa05069..9b8be16 100755 (executable)
@@ -474,7 +474,7 @@ test_20b() { # bug 10480
 
     fail $SINGLEMDS                            # start orphan recovery
     df -P $DIR || df -P $DIR || true    # reconnect
-    sleep 2
+    wait_mds_recovery_done || error "MDS recovery not done"
 
     AFTERUSED=`df -P $DIR | tail -1 | awk '{ print $3 }'`
     log "before $BEFOREUSED, after $AFTERUSED"
@@ -485,9 +485,10 @@ test_20b() { # bug 10480
 run_test 20b "write, unlink, eviction, replay, (test mds_cleanup_orphans)"
 
 test_20c() { # bug 10480
-    dd if=/dev/zero of=$DIR/$tfile bs=4k count=10000
-
-    exec 100< $DIR/$tfile
+    multiop $DIR/$tfile Ow_c &
+    pid=$!
+    # give multiop a chance to open
+    sleep 1
 
     ls -la $DIR/$tfile
 
@@ -495,8 +496,7 @@ test_20c() { # bug 10480
 
     df -P $DIR || df -P $DIR || true    # reconnect
 
-    exec 100<&-
-
+    kill -USR1 $pid
     test -s $DIR/$tfile || error "File was truncated"
 
     return 0
@@ -1061,9 +1061,10 @@ test_48() {
 run_test 48 "MDS->OSC failure during precreate cleanup (2824)"
 
 test_50() {
-    local oscdev=`grep ${ost1_svc}-osc-MDT0000 $LPROC/devices | awk '{print $1}'`
+    local oscdev=`do_facet $SINGLEMDS grep ${ost1_svc}-osc-MDT0000 $LPROC/devices | awk '{print $1}'`
     [ "$oscdev" ] || return 1
-    $LCTL --device $oscdev recover &&  $LCTL --device $oscdev recover
+    do_facet $SINGLEMDS $LCTL --device $oscdev recover || return 2
+    do_facet $SINGLEMDS $LCTL --device $oscdev recover || return 3
     # give the mds_lov_sync threads a chance to run
     sleep 5
 }