Whamcloud - gitweb
LU-2469 test: Skip failing ZFS tests
[fs/lustre-release.git] / lustre / tests / recovery-small.sh
index 89b336f..3f4a5cb 100755 (executable)
@@ -19,6 +19,10 @@ require_dsh_mds || exit 0
 #                                   1  2.5  2.5    4    4          (min)"
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="17  26a  26b    50   51     57"
 
+[ $(facet_fstype $SINGLEMDS) = "zfs" ] &&
+# bug number for skipped test:       LU-2194
+       ALWAYS_EXCEPT="$ALWAYS_EXCEPT 19b"
+
 build_test_filter
 
 # Allow us to override the setup if we already have a mounted system by
@@ -409,20 +413,23 @@ test_19a() {
        local BEFORE=`date +%s`
        local EVICT
 
-       mount_client $DIR2
+       mount_client $DIR2 || error "failed to mount $DIR2"
 
-       do_facet client mcreate $DIR/$tfile        || return 1
-       drop_ldlm_cancel "chmod 0777 $DIR2"
+       do_facet client "stat $DIR > /dev/null"  ||
+               error "failed to stat $DIR: $?"
+       drop_ldlm_cancel "chmod 0777 $DIR2" ||
+               error "failed to chmod $DIR2"
 
        umount_client $DIR2
-       do_facet client "munlink $DIR/$tfile"
 
        # let the client reconnect
        client_reconnect
        EVICT=$(do_facet client $LCTL get_param mdc.$FSNAME-MDT*.state | \
            awk -F"[ [,]" '/EVICTED]$/ { if (mx<$4) {mx=$4;} } END { print mx }')
 
-       [ ! -z "$EVICT" ] && [[ $EVICT -gt $BEFORE ]] || error "no eviction"
+       [ ! -z "$EVICT" ] && [[ $EVICT -gt $BEFORE ]] ||
+               (do_facet client $LCTL get_param mdc.$FSNAME-MDT*.state;
+                   error "no eviction: $EVICT before:$BEFORE")
 }
 run_test 19a "test expired_lock_main on mds (2867)"
 
@@ -430,19 +437,25 @@ test_19b() {
        local BEFORE=`date +%s`
        local EVICT
 
-       mount_client $DIR2
+       mount_client $DIR2 || error "failed to mount $DIR2: $?"
 
-       do_facet client $MULTIOP $DIR/$tfile Ow  || return 1
-       drop_ldlm_cancel $MULTIOP $DIR2/$tfile Ow
-       umount_client $DIR2
-       do_facet client munlink $DIR/$tfile
+       do_facet client $MULTIOP $DIR/$tfile Ow ||
+               error "failed to run multiop: $?"
+       drop_ldlm_cancel $MULTIOP $DIR2/$tfile Ow ||
+               error "failed to ldlm_cancel: $?"
+
+       umount_client $DIR2 || error "failed to unmount $DIR2: $?"
+       do_facet client munlink $DIR/$tfile ||
+               error "failed to unlink $DIR/$tfile: $?"
 
        # let the client reconnect
        client_reconnect
        EVICT=$(do_facet client $LCTL get_param osc.$FSNAME-OST*.state | \
            awk -F"[ [,]" '/EVICTED]$/ { if (mx<$4) {mx=$4;} } END { print mx }')
 
-       [ ! -z "$EVICT" ] && [[ $EVICT -gt $BEFORE ]] || error "no eviction"
+       [ ! -z "$EVICT" ] && [[ $EVICT -gt $BEFORE ]] ||
+               (do_facet client $LCTL get_param osc.$FSNAME-OST*.state;
+                   error "no eviction: $EVICT before:$BEFORE")
 }
 run_test 19b "test expired_lock_main on ost (2867)"
 
@@ -765,7 +778,7 @@ wait_client_evicted () {
 test_24b() {
        remote_ost_nodsh && skip "remote OST with nodsh" && return 0
 
-       dmesg -c
+       dmesg -c > /dev/null
        mkdir -p $DIR/$tdir
        lfs setstripe $DIR/$tdir -s 0 -i 0 -c 1
        cancel_lru_locks osc
@@ -788,7 +801,8 @@ test_24b() {
        lctl set_param fail_loc=0x0
        client_reconnect
        [ $rc1 -eq 0 -o $rc2 -eq 0 ] &&
-       error_ignore "multiop didn't fail fsync: $rc1 or close: $rc2" || true
+       error_ignore 5494 "multiop didn't fail fsync: $rc1 or close: $rc2" ||
+               true
 
        dmesg | grep "dirty page discard:" || \
                error "no discarded dirty page found!"
@@ -1251,6 +1265,16 @@ test_61()
 }
 run_test 61 "Verify to not reuse orphan objects - bug 17025"
 
+# test_62 as seen it b2_1 please do not reuse test_62
+#test_62()
+#{
+#      zconf_umount `hostname` $DIR
+#      #define OBD_FAIL_PTLRPC_DELAY_IMP_FULL   0x516
+#      lctl set_param fail_loc=0x516
+#      mount_client $DIR
+#}
+#run_test 62 "Verify connection flags race - bug LU-1716"
+
 check_cli_ir_state()
 {
         local NODE=${1:-$HOSTNAME}