Skip to content

Commit

Permalink
test: fix util/getaddrinfo for netbsd (v2)
Browse files Browse the repository at this point in the history
Fixes: c198b0c ("test: fix util/getaddrinfo for netbsd")
Fixes: libevent#1316
  • Loading branch information
azat committed Aug 14, 2022
1 parent 77a9b60 commit bb57cea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/regress_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,8 +1110,7 @@ test_evutil_getaddrinfo(void *arg)
hints.ai_family = PF_UNSPEC;
hints.ai_flags = EVUTIL_AI_NUMERICHOST;
r = evutil_getaddrinfo("www.google.com", "80", &hints, &ai);
if (r != EVUTIL_EAI_SERVICE && r != EVUTIL_EAI_NONAME)
tt_fail_msg("error is neither EAI_SERVICE nor EAI_NONAME\n");
tt_int_op(r,==,EVUTIL_EAI_NONAME);
tt_ptr_op(ai, ==, NULL);

/* Try symbolic service names wit AI_NUMERICSERV */
Expand All @@ -1120,7 +1119,8 @@ test_evutil_getaddrinfo(void *arg)
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = EVUTIL_AI_NUMERICSERV;
r = evutil_getaddrinfo("1.2.3.4", "http", &hints, &ai);
tt_int_op(r,==,EVUTIL_EAI_NONAME);
if (r != EVUTIL_EAI_SERVICE && r != EVUTIL_EAI_NONAME)
tt_fail_msg("error is neither EAI_SERVICE nor EAI_NONAME\n");

/* Try symbolic service names */
memset(&hints, 0, sizeof(hints));
Expand Down

0 comments on commit bb57cea

Please sign in to comment.