1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
Commit graph

8 commits

Author SHA1 Message Date
Ludovic Courtès
1ba05158eb tests: Have `getaddrinfo' test work for Darwin 8.
* doc/ref/posix.texi (Network Databases): Update description of
  `EAI_NODATA' to mention that Darwin provides it.

* libguile/net_db.c (scm_getaddrinfo): Likewise.

* test-suite/tests/net-db.test ("getaddrinfo")["wrong service name"]:
  Accept `EAI_NODATA' too.  Reported by David Fang <fang@csl.cornell.edu>,
  see <http://bugs.gnu.org/10684>.
2012-02-03 10:30:52 +01:00
Ludovic Courtès
66d8613108 Change getaddrinfo' test to handle the GNU-specific EAI_NODATA'.
* doc/ref/posix.texi (Network Databases): Mention `EAI_NODATA'.

* libguile/net_db.c (scm_getaddrinfo): Likewise for the docstring.

* test-suite/tests/net-db.test ("getaddrinfo")["no name"]: Handle
  `EAI_NODATA'.
2011-01-05 22:17:26 +01:00
Andy Wingo
fb61f4b826 net-db.test tweak
* test-suite/tests/net-db.test: Throw 'unresolved if we have a crap DNS
  that is returning results for all addresses.
2010-08-28 12:02:12 -07:00
Ludovic Courtès
2b386ab09f Skip "wrong service name" `getaddrinfo' test on Darwin 9.2.
* test-suite/tests/net-db.test ("getaddrinfo")["wrong service name"]:
  Skip test on Darwin 9.2.
2010-02-16 20:57:13 +01:00
Ludovic Courtès
3ea159afc5 Add `getaddrinfo' test.
* test-suite/tests/net-db.test ("getaddrinfo")["port 80 with family and
  socket type"]: New test.
2010-02-15 18:43:20 +01:00
Ludovic Courtès
25bc75c431 Fix `getaddrinfo' tests.
Thanks to Ken Raeburn.

* test-suite/tests/net-db.test ("getaddrinfo")["port 80"]: Fix bogus
  check of `addrinfo:flags' (POSIX says that the "contents of the
  ai_flags field of the returned structures are undefined.").
  ("wrong service name"): Accept `EAI_NONAME' as a valid error code.
2010-02-15 16:10:01 +01:00
Ludovic Courtès
2fe5eb561c Make the `getaddrinfo' "no name" test more robust.
* test-suite/tests/net-db.test ("getaddrinfo")["no name"]: Check for
  `EAI_EAGAIN' too.
2010-02-15 00:43:20 +01:00
Ludovic Courtès
55ae00ea73 Add `getaddrinfo' and related procedures.
* libguile/net_db.c (sym_getaddrinfo_error, sym_ai_passive,
  sym_ai_canonname, sym_ai_numerichost, sym_ai_numericserv,
  sym_ai_v4mapped, sym_ai_all, sym_ai_addrconfig, sym_eai_badflags,
  sym_eai_noname, sym_eai_again, sym_eai_fail, sym_eai_family,
  sym_eai_socktype, sym_eai_service, sym_eai_memory, sym_eai_system,
  sym_eai_overflow, sym_eai_nodata, sym_eai_addrfamily,
  sym_eai_inprogress, sym_eai_canceled, sym_eai_notcanceled,
  sym_eai_alldone, sym_eai_intr, sym_eai_idn_encode): New variables.
  (scm_from_addrinfo, scm_getaddrinfo, scm_gai_strerror): New functions.

* libguile/net_db.h (scm_getaddrinfo, scm_gai_strerror): New functions.

* module/ice-9/networking.scm (addrinfo:flags, addrinfo:fam,
  addrinfo:socktype, addrinfo:protocol, addrinfo:addr,
  addrinfo:canonname): New procedures.

* test-suite/tests/net-db.test: New file.

* test-suite/Makefile.am (SCM_TESTS): Add `tests/net-db.test'.

* doc/ref/posix.texi (Network Databases)[getaddrinfo]: New subsection.
  [The Host Database]: Suggest using `getaddrinfo'.
2010-02-14 20:56:47 +01:00