1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

Make the `getaddrinfo' "no name" test more robust.

* test-suite/tests/net-db.test ("getaddrinfo")["no name"]: Check for
  `EAI_EAGAIN' too.
This commit is contained in:
Ludovic Courtès 2010-02-15 00:43:20 +01:00
parent 40ff484d80
commit 2fe5eb561c

View file

@ -61,7 +61,10 @@
(getaddrinfo "does-not-exist") (getaddrinfo "does-not-exist")
#f) #f)
(lambda (key errcode) (lambda (key errcode)
(and (= errcode EAI_NONAME) ;; In some cases (e.g., in a chroot without
;; /etc/{hosts,resolv.conf}), this can result in `EAI_EAGAIN'.
(and (or (= errcode EAI_NONAME)
(= errcode EAI_AGAIN))
(string? (gai-strerror errcode)))))) (string? (gai-strerror errcode))))))
(pass-if "wrong service name" (pass-if "wrong service name"