diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-02-01 09:38:31 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-02-01 09:38:31 -0500 |
commit | 7d1fe7c9e7e6113bbbaec8c340da3ad7aa60429b (patch) | |
tree | 774bf11d81200b1269bd37a76a98f3018570554b /src/test/test_address.c | |
parent | 601c82325549c00fb6d3c507c87b3224de44fa3f (diff) | |
download | tor-7d1fe7c9e7e6113bbbaec8c340da3ad7aa60429b.tar.gz tor-7d1fe7c9e7e6113bbbaec8c340da3ad7aa60429b.zip |
Try to fix address tests on FreeBSD
In jails, there is not always a localhost.
Bugfix not on any released Tor.
Diffstat (limited to 'src/test/test_address.c')
-rw-r--r-- | src/test/test_address.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/test_address.c b/src/test/test_address.c index 3e73c3e27b..4cf3a5a3a6 100644 --- a/src/test/test_address.c +++ b/src/test/test_address.c @@ -269,8 +269,10 @@ test_address_get_if_addrs_ifaddrs(void *arg) results = get_interface_addresses_ifaddrs(LOG_ERR); tt_int_op(smartlist_len(results),>=,1); +#ifndef __FreeBSD__ + /* FreeBSD doesn't have a localhost in jails sometimes. */ tt_assert(smartlist_contains_localhost_tor_addr(results)); - +#endif done: SMARTLIST_FOREACH(results, tor_addr_t *, t, tor_free(t)); smartlist_free(results); @@ -484,8 +486,10 @@ test_address_get_if_addrs_ioctl(void *arg) tt_assert(result); tt_int_op(smartlist_len(result),>=,1); +#ifndef __FreeBSD__ + /* FreeBSD doesn't have a localhost in jails sometimes. */ tt_assert(smartlist_contains_localhost_tor_addr(result)); - +#endif done: if (result) { SMARTLIST_FOREACH(result, tor_addr_t *, t, tor_free(t)); |