mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-09-01 11:16:02 +00:00
getaddrinfo tests: Skip when DNS resolution is unavailable
* tests/test-getaddrinfo.c (simple): Skip tests for unavailable DNS. Signed-off-by: Simon Josefsson <simon@josefsson.org>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2026-06-30 Zineb Zaadoud <zineb.zaadoud@canonical.com> (tiny change)
|
||||
|
||||
getaddrinfo: Skip when DNS resolution is unavailable
|
||||
* tests/test-getaddrinfo.c (simple): Skip tests for unavailable DNS.
|
||||
|
||||
2026-06-26 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
strfmon_l: be consistent about unsigned vs size_t
|
||||
|
||||
@@ -120,6 +120,16 @@ simple (int pass, char const *host, char const *service)
|
||||
fprintf (stderr, "skipping getaddrinfo test: no network?\n");
|
||||
return 77;
|
||||
}
|
||||
|
||||
/* EAI_NONAME can be returned in sandboxed build environments where
|
||||
DNS resolution is unavailable. Treat it like EAI_AGAIN and skip. */
|
||||
if (res == EAI_NONAME)
|
||||
{
|
||||
skip++;
|
||||
fprintf (stderr, "skipping getaddrinfo test: no DNS resolver?\n");
|
||||
return 77;
|
||||
}
|
||||
|
||||
/* Solaris reports EAI_SERVICE for "http" and "https". Don't
|
||||
fail the test merely because of this. */
|
||||
if (res == EAI_SERVICE)
|
||||
|
||||
Reference in New Issue
Block a user