summaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-08-06 11:35:50 -0400
committerNick Mathewson <nickm@torproject.org>2019-08-06 11:35:50 -0400
commit66437710afd9e06ef8bed21f18359db08594a313 (patch)
treeed5a83fa2afb35c5ed65115b530179408ef754b3 /src/test/test_util.c
parent88f9b123d6d929d2f783ba7823b7c289c09d83e0 (diff)
downloadtor-66437710afd9e06ef8bed21f18359db08594a313.tar.gz
tor-66437710afd9e06ef8bed21f18359db08594a313.zip
test_util: Do not check for ENETUNREACH unless it exists.
Fixes bug 31352; bug not in any released Tor.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c2
1 files changed, 2 insertions, 0 deletions
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]));