X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Flreplicate-test.sh;h=563839deba49f4caca3e1c783c0de15b8ff2a402;hb=fe249e5bec43c7eebd8145311d2aa5b4ce023f9d;hp=12dbcb9f05f717f6b181c0643f124f83cef58c0c;hpb=ac53d779e9249d87e0e56bcc58a56ac0371796cc;p=fs%2Flustre-release.git diff --git a/lustre/tests/lreplicate-test.sh b/lustre/tests/lreplicate-test.sh index 12dbcb9..563839d 100644 --- a/lustre/tests/lreplicate-test.sh +++ b/lustre/tests/lreplicate-test.sh @@ -10,8 +10,8 @@ SRCDIR=`dirname $0` export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin ONLY=${ONLY:-"$*"} -ALWAYS_EXCEPT="$LREPLICATE_EXCEPT" -# bug number for skipped test: - +ALWAYS_EXCEPT="$LREPLICATE_EXCEPT 5a 5b" +# bug number for skipped test: - 20878 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! [ "$ALWAYS_EXCEPT$EXCEPT" ] && \ @@ -187,7 +187,6 @@ test_1() { fini_changelog cleanup_src_tgt return $RC - } run_test 1 "Simple Replication" @@ -392,7 +391,20 @@ test_4() { $KILL -SIGCONT $child_pid sleep 60 - $KILL -SIGKILL $child_pid + $KILL -SIGKILL $(pgrep run_iozone.sh) + $KILL -SIGKILL $(pgrep iozone) + + # After killing 'run_iozone.sh', process 'iozone' becomes the + # child of PID 1. Hence 'wait' does not wait for it. Killing + # iozone first, means more iozone processes are spawned off which + # is not desirable. So, after sending a sigkill, the test goes + # into a wait loop for iozone to cleanup and exit. + wait + while [ "$(pgrep "iozone")" != "" ]; + do + ps -ef | grep iozone | grep -v grep + sleep 1; + done $LREPLICATE -l $LREPL_LOG check_diff $DIR/$tdir $TGT/$tdir @@ -505,9 +517,9 @@ test_7() { createmany -o $DIR/$tdir/$tfile $NUMFILES # To simulate replication to another lustre filesystem, replicate - # the changes to $DIR/tgt. Disable changelogs before replication - # so that the files created as part of replication are not logged. - do_facet $SINGLEMDS lctl set_param -n mdd.$MDT0.changelog off + # the changes to $DIR/tgt. We can't turn off the changelogs + # while we are registered, so lreplicate better not try to + # replicate the replication steps. It seems ok :) mkdir $DIR/tgt $LREPLICATE -s $DIR -t $DIR/tgt -m $MDT0 -u $CL_USER -l $LREPL_LOG @@ -563,5 +575,5 @@ log "cleanup: ======================================================" cd $ORIG_PWD check_and_cleanup_lustre echo '=========================== finished ===============================' -[ -f "$REPLOG" ] && cat $REPLLOG && grep -q FAIL $REPLLOG && exit 1 || true +[ -f "$REPLLOG" ] && cat $REPLLOG && grep -q FAIL $REPLLOG && exit 1 || true echo "$0: completed"