When ucmatose aborts because of issues trying to connect
to the server, it moves to disconnecting all connections.
However, not all connections may have been established.
The result is that ucmatose will hang in disconnect_events.
Fix this by setting the number of times that we need to
disconnect to the number of times that we successfully
connect.
This problem is based on a report by Doug Ledford
<dledford@redhat.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
static void connect_error(void)
{
- test.disconnects_left--;
test.connects_left--;
}
case RDMA_CM_EVENT_ESTABLISHED:
((struct cmatest_node *) cma_id->context)->connected = 1;
test.connects_left--;
+ test.disconnects_left++;
break;
case RDMA_CM_EVENT_ADDR_ERROR:
case RDMA_CM_EVENT_ROUTE_ERROR:
}
test.connects_left = connections;
- test.disconnects_left = connections;
test.channel = rdma_create_event_channel();
if (!test.channel) {