for hstatus in ${LNET_LOCAL_RESEND_STATUSES} \
${LNET_LOCAL_NO_RESEND_STATUSES}; do
echo "Simulate $hstatus"
- $LCTL net_drop_add -s *@tcp -d *@tcp -m GET -r 1 -e ${hstatus}
- do_lnetctl discover $($LCTL list_nids | head -n 1) &&
+ lnet_health_pre || return $?
+
+ add_health_test_drop_rules ${hstatus}
+ do_lnetctl discover ${RNIDS[0]} &&
error "Should have failed"
- $LCTL net_drop_del -a
+
+ lnet_health_post
+
+ check_no_resends || return $?
+ check_no_local_health || return $?
done
cleanup_health_test || return $?
local hstatus
for hstatus in ${LNET_LOCAL_RESEND_STATUSES}; do
- reinit_dlc || return $?
- add_net "tcp" "eth0" || return $?
- add_net "tcp1" "eth0" || return $?
-
echo "Simulate $hstatus"
- lnet_health_pre
+ lnet_health_pre || return $?
- $LCTL net_drop_add -s *@tcp -d *@tcp -m GET -r 1 -e ${hstatus}
- $LCTL net_drop_add -s *@tcp1 -d *@tcp1 -m GET -r 1 -e ${hstatus}
- do_lnetctl discover $($LCTL list_nids | head -n 1) &&
+ add_health_test_drop_rules ${hstatus}
+ do_lnetctl discover ${RNIDS[0]} &&
error "Should have failed"
- $LCTL net_drop_del -a
lnet_health_post
done
for hstatus in ${LNET_LOCAL_NO_RESEND_STATUSES}; do
- reinit_dlc || return $?
- add_net "tcp" "eth0" || return $?
- add_net "tcp1" "eth0" || return $?
-
echo "Simulate $hstatus"
lnet_health_pre || return $?
- $LCTL net_drop_add -s *@tcp -d *@tcp -m GET -r 1 -e ${hstatus}
- $LCTL net_drop_add -s *@tcp1 -d *@tcp1 -m GET -r 1 -e ${hstatus}
- do_lnetctl discover $($LCTL list_nids | head -n 1) &&
+ add_health_test_drop_rules ${hstatus}
+ do_lnetctl discover ${RNIDS[0]} &&
error "Should have failed"
- $LCTL net_drop_del -a
lnet_health_post
for hstatus in ${LNET_REMOTE_RESEND_STATUSES} \
${LNET_REMOTE_NO_RESEND_STATUSES}; do
echo "Simulate $hstatus"
- $LCTL net_drop_add -s *@tcp -d *@tcp -m GET -r 1 -e ${hstatus}
- do_lnetctl discover $($LCTL list_nids | head -n 1) &&
+ lnet_health_pre || return $?
+
+ add_health_test_drop_rules ${hstatus}
+ do_lnetctl discover ${RNIDS[0]} &&
error "Should have failed"
- $LCTL net_drop_del -a
+
+ lnet_health_post
+
+ check_no_resends || return $?
+ check_no_local_health || return $?
+ check_no_remote_health || return $?
done
cleanup_health_test || return $?
local hstatus
for hstatus in ${LNET_REMOTE_RESEND_STATUSES}; do
- reinit_dlc || return $?
- add_net "tcp" "eth0" || return $?
- add_net "tcp1" "eth0" || return $?
-
- do_lnetctl discover $($LCTL list_nids | head -n 1) ||
- error "failed to discover myself"
-
echo "Simulate $hstatus"
lnet_health_pre || return $?
- $LCTL net_drop_add -s *@tcp -d *@tcp -m GET -r 1 -e ${hstatus}
- $LCTL net_drop_add -s *@tcp1 -d *@tcp1 -m GET -r 1 -e ${hstatus}
- do_lnetctl discover $($LCTL list_nids | head -n 1) &&
+
+ add_health_test_drop_rules ${hstatus}
+
+ do_lnetctl discover ${RNIDS[0]} &&
error "Should have failed"
- $LCTL net_drop_del -a
lnet_health_post
error "Unable to reset health rc=$?"
done
for hstatus in ${LNET_REMOTE_NO_RESEND_STATUSES}; do
- reinit_dlc || return $?
- add_net "tcp" "eth0" || return $?
- add_net "tcp1" "eth0" || return $?
-
- do_lnetctl discover $($LCTL list_nids | head -n 1) ||
- error "failed to discover myself"
-
echo "Simulate $hstatus"
lnet_health_pre || return $?
- $LCTL net_drop_add -s *@tcp -d *@tcp -m GET -r 1 -e ${hstatus}
- $LCTL net_drop_add -s *@tcp1 -d *@tcp1 -m GET -r 1 -e ${hstatus}
- do_lnetctl discover $($LCTL list_nids | head -n 1) &&
+
+ add_health_test_drop_rules ${hstatus}
+
+ do_lnetctl discover ${RNIDS[0]} &&
error "Should have failed"
- $LCTL net_drop_del -a
lnet_health_post