Whamcloud - gitweb
LU-482 test: sync new fs before first replay test
[fs/lustre-release.git] / lustre / tests / replay-dual.sh
index ece5b6a..1af2e4d 100755 (executable)
@@ -38,6 +38,11 @@ rm -rf $DIR/[df][0-9]*
 
 [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE
 
+# LU-482 Avert LVM and VM inability to flush caches in pre .33 kernels
+if [ $LINUX_VERSION_CODE -lt $(kernel_version 2 6 33) ]; then
+    sync; sleep 5; sync; sleep 5; sync; sleep 5
+fi
+
 test_0a() {
     touch $MOUNT2/$tfile-A # force sync FLD/SEQ update before barrier
     replay_barrier $SINGLEMDS
@@ -549,9 +554,9 @@ run_test 21b "commit on sharing, two clients"
 
 # end commit on sharing tests 
 
-equals_msg `basename $0`: test complete, cleaning up
+complete $(basename $0) $SECONDS
 SLEEP=$((`date +%s` - $NOW))
 [ $SLEEP -lt $TIMEOUT ] && sleep $SLEEP
 [ "$MOUNTED2" = yes ] && zconf_umount $HOSTNAME $MOUNT2 || true
 check_and_cleanup_lustre
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true
+exit_status