diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-08 11:47:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-09-08 11:47:16 -0400 |
commit | 6a1454aa462c7a1ef8d84fe703d4f28e727ca1c0 (patch) | |
tree | 9ab3cb8ac3e88bccbbe124fad9237e8b64b6fb74 /src/test/test_address.c | |
parent | f9cb9d899061770c6d3b3966c08d5e8d844f395a (diff) | |
download | tor-6a1454aa462c7a1ef8d84fe703d4f28e727ca1c0.tar.gz tor-6a1454aa462c7a1ef8d84fe703d4f28e727ca1c0.zip |
Tolerate another failure mode of get_if_addres6_list in tests
Diffstat (limited to 'src/test/test_address.c')
-rw-r--r-- | src/test/test_address.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/test/test_address.c b/src/test/test_address.c index e984beab46..932dc38882 100644 --- a/src/test/test_address.c +++ b/src/test/test_address.c @@ -794,7 +794,16 @@ test_address_get_if_addrs6_list_internal(void *arg) (void)arg; + /* We might drop a log_err */ + int prev_level = setup_full_capture_of_logs(LOG_ERR); 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"); + + } + teardown_capture_of_logs(prev_level); tt_assert(results != NULL); /* Work even on systems without IPv6 interfaces */ @@ -828,7 +837,9 @@ 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("connect() failed"); + expect_log_msg_containing_either("connect() failed", + "unable to create socket"); + } teardown_capture_of_logs(prev_level); |