- cancel_lru_locks mdc # cleanup locks from former test cases
- rm -rf $DIR/${tdir}-1 $DIR/${tdir}-2
-
- mkdir -p $DIR/${tdir}-1
- mkdir -p $DIR/${tdir}-2
- multiop $DIR/${tdir}-1/f O_c &
- close_pid=$!
-
- #define OBD_FAIL_MDS_REINT_NET 0x107
- do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000107"
- mcreate $DIR/${tdir}-2/f &
- open_pid=$!
- sleep 1
-
- #define OBD_FAIL_MDS_CLOSE_NET_REP 0x13b
- do_facet $SINGLEMDS "lctl set_param fail_loc=0x8000013b"
- kill -USR1 $close_pid
- cancel_lru_locks mdc # force the close
- sleep 1
-
- #bz20647: make sure all pids are exists before failover
- [ -d /proc/$close_pid ] || error "close_pid doesn't exist"
- [ -d /proc/$open_pid ] || error "open_pid doesn't exists"
- replay_barrier_nodf $SINGLEMDS
- fail_nodf $SINGLEMDS
- wait $open_pid || return 1
- sleep 2
- # close should be gone
- [ -d /proc/$close_pid ] && return 2
- do_facet $SINGLEMDS "lctl set_param fail_loc=0"
-
- $CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
- $CHECKSTAT -t file $DIR/${tdir}-2/f || return 4
- rm -rf $DIR/${tdir}-*
-}
-run_test 53h "|X| open request and close reply while two MDC requests in flight"
-
-#b_cray 54 "|X| open request and close reply while two MDC requests in flight"
+ cancel_lru_locks mdc # cleanup locks from former test cases
+
+ mkdir $DIR/${tdir}-1 || error "mkdir $DIR/${tdir}-1 failed"
+ mkdir $DIR/${tdir}-2 || error "mkdir $DIR/${tdir}-2 failed"
+ multiop $DIR/${tdir}-1/f O_c &
+ close_pid=$!
+
+ #define OBD_FAIL_MDS_REINT_NET 0x107
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000107"
+ mcreate $DIR/${tdir}-2/f &
+ open_pid=$!
+ sleep 1
+
+ #define OBD_FAIL_MDS_CLOSE_NET_REP 0x13b
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0x8000013b"
+ kill -USR1 $close_pid
+ cancel_lru_locks mdc # force the close
+ sleep 1
+
+ #bz20647: make sure all pids are exists before failover
+ [ -d /proc/$close_pid ] || error "close_pid doesn't exist"
+ [ -d /proc/$open_pid ] || error "open_pid doesn't exists"
+ replay_barrier_nodf $SINGLEMDS
+ fail_nodf $SINGLEMDS
+ wait $open_pid || error "open_pid failed"
+ sleep 2
+ # close should be gone
+ [ -d /proc/$close_pid ] && error "close_pid should not exist"
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0"
+
+ $CHECKSTAT -t file $DIR/${tdir}-1/f ||
+ error "$CHECKSTAT $DIR/${tdir}-1/f attribute check failed"
+ $CHECKSTAT -t file $DIR/${tdir}-2/f ||
+ error "$CHECKSTAT $DIR/${tdir}-2/f attribute check failed"
+ rm -rf $DIR/${tdir}-*
+}
+run_test 53h "open request and close reply while two MDC requests in flight"