Whamcloud - gitweb
LU-403 Add support for RHEL5 kernel 2.6.18-238.12.1.el5
[fs/lustre-release.git] / lustre / tests / lustre-rsync-test.sh
index 0e95931..3064507 100644 (file)
@@ -10,8 +10,9 @@ SRCDIR=`dirname $0`
 export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin
 
 ONLY=${ONLY:-"$*"}
-ALWAYS_EXCEPT="$LRSYNC_EXCEPT 5a 5b"
-# bug number for skipped test: -  20878
+[ -n "$ONLY" ] && SLOW=yes
+ALWAYS_EXCEPT="$LRSYNC_EXCEPT"
+# bug number for skipped test:
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
 [ "$ALWAYS_EXCEPT$EXCEPT" ] && \
@@ -29,10 +30,6 @@ init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
-REPLLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
-
-[ "$REPLLOG" ] && rm -f $REPLLOG || true
-
 check_and_setup_lustre
 
 DIR=${DIR:-$MOUNT}
@@ -561,9 +558,30 @@ test_8() {
 }
 run_test 8 "Replicate multiple file/directory moves"
 
-log "cleanup: ======================================================"
+test_9() {
+    init_src
+    init_changelog
+
+    mkdir $DIR/$tdir/foo
+    touch $DIR/$tdir/foo/a1
+
+    $LRSYNC -s $DIR -t $TGT -m $MDT0 -u $CL_USER -l $LREPL_LOG
+
+    check_diff ${DIR}/$tdir $TGT/$tdir
+
+    rm -rf $DIR/$tdir/foo
+
+    $LRSYNC -s $DIR -t $TGT -m $MDT0 -u $CL_USER -l $LREPL_LOG
+
+    check_diff ${DIR}/$tdir $TGT/$tdir
+
+    fini_changelog
+    cleanup_src_tgt
+    return 0
+}
+run_test 9 "Replicate recursive directory removal"
+
 cd $ORIG_PWD
+complete $(basename $0) $SECONDS
 check_and_cleanup_lustre
-echo '=========================== finished ==============================='
-[ -f "$REPLLOG" ] && cat $REPLLOG && grep -q FAIL $REPLLOG && exit 1 || true
-echo "$0: completed"
+exit_status