Loading changes/bug20634 0 → 100644 +3 −0 Original line number Diff line number Diff line o Minor bugfixes (unit tests): - Stop spurious failures in the local interface address discovery unit tests. Fixes bug 20634; bugfix on 0.2.8.1-alpha; patch by Neel Chauhan. src/test/log_test_helpers.h +16 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,21 @@ void mock_dump_saved_logs(void); mock_saved_log_has_message_containing(str2), \ "expected log to contain " # str1 " or " # str2); #define expect_log_msg_containing_either3(str1, str2, str3) \ assert_log_predicate(mock_saved_log_has_message_containing(str1) || \ mock_saved_log_has_message_containing(str2) || \ mock_saved_log_has_message_containing(str3), \ "expected log to contain " # str1 " or " # str2 \ " or " # str3); #define expect_log_msg_containing_either4(str1, str2, str3, str4) \ assert_log_predicate(mock_saved_log_has_message_containing(str1) || \ mock_saved_log_has_message_containing(str2) || \ mock_saved_log_has_message_containing(str3) || \ mock_saved_log_has_message_containing(str4), \ "expected log to contain " # str1 " or " # str2 \ " or " # str3 " or " # str4); #define expect_single_log_msg(str) \ do { \ \ Loading src/test/test_address.c +14 −4 Original line number Diff line number Diff line Loading @@ -808,8 +808,13 @@ test_address_get_if_addrs6_list_internal(void *arg) results = get_interface_address6_list(LOG_ERR, AF_INET6, 1); tt_int_op(smartlist_len(mock_saved_logs()), OP_LE, 1); if (smartlist_len(mock_saved_logs()) == 1) { expect_log_msg_containing_either("connect() failed", "unable to create socket"); expect_log_msg_containing_either4("connect() failed", "unable to create socket", "Address that we determined via UDP " "socket magic is unsuitable for public " "comms.", "getsockname() to determine interface " "failed"); } teardown_capture_of_logs(); Loading Loading @@ -846,8 +851,13 @@ test_address_get_if_addrs6_list_no_internal(void *arg) results = get_interface_address6_list(LOG_ERR, AF_INET6, 0); tt_int_op(smartlist_len(mock_saved_logs()), OP_LE, 1); if (smartlist_len(mock_saved_logs()) == 1) { expect_log_msg_containing_either("connect() failed", "unable to create socket"); expect_log_msg_containing_either4("connect() failed", "unable to create socket", "Address that we determined via UDP " "socket magic is unsuitable for public " "comms.", "getsockname() to determine interface " "failed"); } teardown_capture_of_logs(); Loading Loading
changes/bug20634 0 → 100644 +3 −0 Original line number Diff line number Diff line o Minor bugfixes (unit tests): - Stop spurious failures in the local interface address discovery unit tests. Fixes bug 20634; bugfix on 0.2.8.1-alpha; patch by Neel Chauhan.
src/test/log_test_helpers.h +16 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,21 @@ void mock_dump_saved_logs(void); mock_saved_log_has_message_containing(str2), \ "expected log to contain " # str1 " or " # str2); #define expect_log_msg_containing_either3(str1, str2, str3) \ assert_log_predicate(mock_saved_log_has_message_containing(str1) || \ mock_saved_log_has_message_containing(str2) || \ mock_saved_log_has_message_containing(str3), \ "expected log to contain " # str1 " or " # str2 \ " or " # str3); #define expect_log_msg_containing_either4(str1, str2, str3, str4) \ assert_log_predicate(mock_saved_log_has_message_containing(str1) || \ mock_saved_log_has_message_containing(str2) || \ mock_saved_log_has_message_containing(str3) || \ mock_saved_log_has_message_containing(str4), \ "expected log to contain " # str1 " or " # str2 \ " or " # str3 " or " # str4); #define expect_single_log_msg(str) \ do { \ \ Loading
src/test/test_address.c +14 −4 Original line number Diff line number Diff line Loading @@ -808,8 +808,13 @@ test_address_get_if_addrs6_list_internal(void *arg) results = get_interface_address6_list(LOG_ERR, AF_INET6, 1); tt_int_op(smartlist_len(mock_saved_logs()), OP_LE, 1); if (smartlist_len(mock_saved_logs()) == 1) { expect_log_msg_containing_either("connect() failed", "unable to create socket"); expect_log_msg_containing_either4("connect() failed", "unable to create socket", "Address that we determined via UDP " "socket magic is unsuitable for public " "comms.", "getsockname() to determine interface " "failed"); } teardown_capture_of_logs(); Loading Loading @@ -846,8 +851,13 @@ test_address_get_if_addrs6_list_no_internal(void *arg) results = get_interface_address6_list(LOG_ERR, AF_INET6, 0); tt_int_op(smartlist_len(mock_saved_logs()), OP_LE, 1); if (smartlist_len(mock_saved_logs()) == 1) { expect_log_msg_containing_either("connect() failed", "unable to create socket"); expect_log_msg_containing_either4("connect() failed", "unable to create socket", "Address that we determined via UDP " "socket magic is unsuitable for public " "comms.", "getsockname() to determine interface " "failed"); } teardown_capture_of_logs(); Loading