aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_address.c
diff options
context:
space:
mode:
authorYawning Angel <yawning@schwanenlied.me>2015-04-10 18:13:34 +0000
committerYawning Angel <yawning@schwanenlied.me>2015-04-10 18:13:34 +0000
commite891deb02120c3756ccfb87171e36d271c3d7077 (patch)
tree5b85032ddf689089297072400e07c286c659c025 /src/test/test_address.c
parentf9327848babe8fd3b08eabb187d32b945f7567fc (diff)
downloadtor-e891deb02120c3756ccfb87171e36d271c3d7077.tar.gz
tor-e891deb02120c3756ccfb87171e36d271c3d7077.zip
Disable the udp_socket_trick_blackbox tests that fail due to #12377
Till someone writes get_interface_address6 interface enumeration that is routing table aware, these tests will continue to fail on certain systems because the get_interface_address6() code is broken.
Diffstat (limited to 'src/test/test_address.c')
-rw-r--r--src/test/test_address.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/test/test_address.c b/src/test/test_address.c
index 317119c52f..52361624e5 100644
--- a/src/test/test_address.c
+++ b/src/test/test_address.c
@@ -585,6 +585,7 @@ test_address_udp_socket_trick_blackbox(void *arg)
(void)arg;
+#if 0
retval_reference = get_interface_address6(LOG_DEBUG,AF_INET,&addr4);
retval = get_interface_address6_via_udp_socket_hack(LOG_DEBUG,
AF_INET,
@@ -594,10 +595,6 @@ test_address_udp_socket_trick_blackbox(void *arg)
tt_assert( (retval == -1 && retval_reference == -1) ||
(tor_addr_compare(&addr4,&addr4_to_check,CMP_EXACT) == 0) );
- //[XXX: Skipping the AF_INET6 case because bug #12377 makes it fail.]
- (void)addr6_to_check;
- (void)addr6;
-#if 0
retval_reference = get_interface_address6(LOG_DEBUG,AF_INET6,&addr6);
retval = get_interface_address6_via_udp_socket_hack(LOG_DEBUG,
AF_INET6,
@@ -607,6 +604,21 @@ test_address_udp_socket_trick_blackbox(void *arg)
tt_assert( (retval == -1 && retval_reference == -1) ||
(tor_addr_compare(&addr6,&addr6_to_check,CMP_EXACT) == 0) );
+#else
+ /* Both of the blackbox test cases fail horribly if:
+ * * The host has no external addreses.
+ * * There are multiple interfaces with either AF_INET or AF_INET6.
+ * * The last address isn't the one associated with the default route.
+ *
+ * The tests SHOULD be re-enabled when #12377 is fixed correctly, but till
+ * then this fails a lot, in situations we expect failures due to knowing
+ * about the code being broken.
+ */
+
+ (void)addr4_to_check;
+ (void)addr6_to_check;
+ (void)addr6;
+ (void) retval_reference;
#endif
/* When family is neither AF_INET nor AF_INET6, we want _hack to