From: Nick Mathewson Date: Tue, 6 Aug 2019 15:35:50 +0000 (-0400) Subject: test_util: Do not check for ENETUNREACH unless it exists. X-Git-Tag: tor-0.4.2.1-alpha~91^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66437710afd9e06ef8bed21f18359db08594a313;p=thirdparty%2Ftor.git test_util: Do not check for ENETUNREACH unless it exists. Fixes bug 31352; bug not in any released Tor. --- diff --git a/src/test/test_util.c b/src/test/test_util.c index 41ecbfd388..c56d3488ba 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -5399,11 +5399,13 @@ test_util_socketpair(void *arg) tt_skip(); } #endif /* defined(__FreeBSD__) */ +#ifdef ENETUNREACH if (ersatz && socketpair_result == -ENETUNREACH) { /* We can also fail with -ENETUNREACH if we have no network stack at * all. */ tt_skip(); } +#endif tt_int_op(0, OP_EQ, socketpair_result); tt_assert(SOCKET_OK(fds[0]));