Whamcloud - gitweb
LU-2194 test: remove test_19b from except list
[fs/lustre-release.git] / lustre / tests / recovery-small.sh
index 13a0f3e..f7cd763 100755 (executable)
@@ -20,8 +20,8 @@ require_dsh_mds || exit 0
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="17  26a  26b    50   51     57"
 
 [ $(facet_fstype $SINGLEMDS) = "zfs" ] &&
-# bug number for skipped test:       LU-2194 LU-2547
-       ALWAYS_EXCEPT="$ALWAYS_EXCEPT 19b     24a 24b"
+# bug number for skipped test:       LU-2547
+       ALWAYS_EXCEPT="$ALWAYS_EXCEPT 24a 24b"
 
 build_test_filter
 
@@ -196,6 +196,45 @@ test_10b() {
 }
 run_test 10b "re-send BL AST"
 
+test_10d() {
+       local before=$(date +%s)
+       local evict
+
+       [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.6.90) ]] &&
+               skip "Need MDS version at least 2.6.90" && return
+
+       # sleep 1 is to make sure that BEFORE is not equal to EVICTED below
+       sleep 1
+       rm -f $TMP/$tfile
+       echo -n ", world" | dd of=$TMP/$tfile bs=1c seek=5
+
+       mount_client $MOUNT2
+
+       $LFS setstripe -i 0 -c 1 $DIR1/$tfile
+       echo -n hello > $DIR1/$tfile
+
+       stat $DIR2/$tfile >& /dev/null
+       $LCTL set_param fail_err=71
+       drop_bl_callback_once "echo -n \\\", world\\\" >> $DIR2/$tfile"
+
+       client_reconnect
+
+       cmp $DIR1/$tfile $DIR2/$tfile || error "file contents differ"
+       cmp $DIR1/$tfile $TMP/$tfile || error "wrong content found"
+
+       evict=$(do_facet client $LCTL get_param osc.$FSNAME-OST0000*.state | \
+               tr -d '\-\[\] ' | \
+         awk -F"[ [,]" '/EVICTED$/ { if (mx<$1) {mx=$1;} } END { print mx }')
+
+       [[ $evict -gt $before ]] ||
+               (do_facet client $LCTL get_param osc.$FSNAME-OST0000*.state;
+                   error "no eviction: $evict before:$before")
+
+       rm $TMP/$tfile
+       umount_client $MOUNT2
+}
+run_test 10d "test failed blocking ast"
+
 #bug 2460
 # wake up a thread waiting for completion after eviction
 test_11(){