OSDN Git Service

Migrate system/extra getaddrinfo test, and fix a bug in getservbyname(3).
authorDerek Xue <derek.xue@linaro.org>
Wed, 13 Aug 2014 13:19:17 +0000 (14:19 +0100)
committerElliott Hughes <enh@google.com>
Thu, 23 Oct 2014 05:23:10 +0000 (22:23 -0700)
commitba811120ae10ddca1ffc8855bf1d83e99b08bcd9
tree6719566e303ebd118b22b46965440e3fc4056767
parentcf8ea37fc91e23d37b3c5873b5e152ccae293f03
Migrate system/extra getaddrinfo test, and fix a bug in getservbyname(3).

This change is to migrate the getaddrinfo tests defined in the old file
system/extras/tests/bionic/libc/common/test_getaddrinfo.c
to the new place bionic/tests/netdb_test.cpp.

The test here is more thorough, and catches a bug in getservbyname(3)
that was breaking getaddrinfo(3)'s ability to look up services by name
without a hint that would cause it to ask for a specific protocol.

Change-Id: Ief5ebd0869496d1bc6a97861dfefa04bdf24bab1
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
libc/dns/net/getservbyname.c
tests/netdb_test.cpp