On Sat, Mar 08, 2014 at 10:15:52PM +0200, Alon Bar-Lev wrote: > When running tests under network sandbox, there is no connectivity to > the DNS, in this case function returns system error and ECONNREFUSED > this should result in skipping test.
Interesting. Have you seen the thread started at http://lists.gnu.org/archive/html/bug-gnulib/2013-04/msg00040.html and continued at http://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00088.html ? > --- a/tests/test-getaddrinfo.c > +++ b/tests/test-getaddrinfo.c > @@ -85,7 +85,7 @@ simple (char const *host, char const *service) > /* EAI_AGAIN is returned if no network is available. Don't fail > the test merely because someone is down the country on their > in-law's farm. */ > - if (res == EAI_AGAIN) > + if (res == EAI_AGAIN || (res == EAI_SYSTEM && err == ECONNREFUSED)) > { > skip++; > fprintf (stderr, "skipping getaddrinfo test: no network?\n"); -- ldv
pgpO5fuSPo_tj.pgp
Description: PGP signature