Skip to content

Commit

Permalink
Fix: tests: On some platforms -ECONNRESET is returned rather than -EN…
Browse files Browse the repository at this point in the history
…OTCONN after server failure
  • Loading branch information
davidvossel committed Jun 26, 2013
1 parent e604e76 commit 11b18cc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/check_ipc.c
Expand Up @@ -822,9 +822,12 @@ test_ipc_disconnect_after_created(void)
&res_header,
sizeof(struct qb_ipc_response_header), -1);
/*
* confirm we get -ENOTCONN
* confirm we get -ENOTCONN or -ECONNRESET
*/
ck_assert_int_eq(res, -ENOTCONN);
if (res != -ECONNRESET && res != -ENOTCONN) {
qb_log(LOG_ERR, "id:%d size:%d", res_header.id, res_header.size);
ck_assert_int_eq(res, -ENOTCONN);
}
ck_assert_int_eq(QB_FALSE, qb_ipcc_is_connected(conn));

qb_ipcc_disconnect(conn);
Expand Down Expand Up @@ -883,9 +886,12 @@ test_ipc_server_fail(void)
&res_header,
sizeof(struct qb_ipc_response_header), -1);
/*
* confirm we get -ENOTCONN
* confirm we get -ENOTCONN or ECONNRESET
*/
ck_assert_int_eq(res, -ENOTCONN);
if (res != -ECONNRESET && res != -ENOTCONN) {
qb_log(LOG_ERR, "id:%d size:%d", res_header.id, res_header.size);
ck_assert_int_eq(res, -ENOTCONN);
}
ck_assert_int_eq(QB_FALSE, qb_ipcc_is_connected(conn));

qb_ipcc_disconnect(conn);
Expand Down

0 comments on commit 11b18cc

Please sign in to comment.