Whamcloud - gitweb
LU-7934 osp: fix tr->otr_next_id overflow
[fs/lustre-release.git] / lustre / tests / replay-single.sh
index 5b00f7e..31586b2 100755 (executable)
@@ -32,8 +32,8 @@ case "$(lsb_release -sr)" in  # only disable tests for el7
        ;;
 esac
 
-#                                                  63 min  7 min  AT AT AT AT"
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="1 2 3 4 6 12 16 44a      44b    65 66 67 68"
+#                                  7.5  (min)"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="44b"
 
 [ $(facet_fstype $SINGLEMDS) = "zfs" ] &&
 # bug number for skipped test:        LU-1867  LU-3127
@@ -873,7 +873,7 @@ test_40(){
        lctl get_param mdc.*.connect_flags | grep -q layout_lock &&
                skip "layout_lock needs MDS connection for IO" && return 0
 
-       $LCTL mark multiop $MOUNT/$tfile OS_c
+       $LCTL mark "$HOSTNAME multiop $MOUNT/$tfile OS_c"
        multiop $MOUNT/$tfile OS_c  &
        PID=$!
        writeme -s $MOUNT/${tfile}-2 &
@@ -2130,8 +2130,10 @@ random_fail_mdt() {
 
 cleanup_70c() {
        trap 0
-       kill -9 $tar_70c_pid
+       rm -f $DIR/replay-single.70c.lck
+       rm -rf /$DIR/$tdir
 }
+
 test_70c () {
        local clients=${CLIENTS:-$HOSTNAME}
        local rc=0
@@ -2148,16 +2150,14 @@ test_70c () {
 
        trap cleanup_70c EXIT
        (
-               while true; do
+               while [ ! -e $DIR/replay-single.70c.lck ]; do
                        test_mkdir -p -c$MDSCOUNT $DIR/$tdir || break
                        if [ $MDSCOUNT -ge 2 ]; then
                                $LFS setdirstripe -D -c$MDSCOUNT $DIR/$tdir ||
                                error "set default dirstripe failed"
                        fi
                        cd $DIR/$tdir || break
-                       tar cf - /etc | tar xf - || error "tar failed"
-                       cd $DIR || break
-                       rm -rf $DIR/$tdir || break
+                       tar cf - /etc | tar xf - || error "tar failed in loop"
                done
        )&
        tar_70c_pid=$!
@@ -2166,6 +2166,9 @@ test_70c () {
        random_fail_mdt $MDSCOUNT $duration $tar_70c_pid
        kill -0 $tar_70c_pid || error "tar $tar_70c_pid stopped"
 
+       touch $DIR/replay-single.70c.lck
+       wait $tar_70c_pid || error "$?: tar failed"
+
        cleanup_70c
        true
 }
@@ -3595,6 +3598,23 @@ test_102d() {
 }
 run_test 102d "check replay & reconstruction with multiple mod RPCs in flight"
 
+test_103() {
+       remote_mds_nodsh && skip "remote MDS with nodsh" && return
+#define OBD_FAIL_MDS_TRACK_OVERFLOW 0x162
+       do_facet mds1 $LCTL set_param fail_loc=0x80000162
+
+       mkdir -p $DIR/$tdir
+       createmany -o $DIR/$tdir/t- 30 ||
+               error "create files on remote directory failed"
+       sync
+       rm -rf $DIR/$tdir/t-*
+       sync
+#MDS should crash with tr->otr_next_id overflow
+       fail mds1
+}
+run_test 103 "Check otr_next_id overflow"
+
+
 check_striped_dir_110()
 {
        $CHECKSTAT -t dir $DIR/$tdir/striped_dir ||