Commit graph

4 commits

Author SHA1 Message Date
Derek Xue
ba811120ae 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>
2014-10-22 22:23:10 -07:00
Derek Xue
4912fc7d15 bionic/tests: migrate gethostbyname bionic test from system/extra to bionic/tests
this change migrate the gethostbyname test defined in the old file
system/extras/tests/bionic/libc/common/test_gethostbyname.c
to the new place bionic/tests/netdb_test.cpp

Change-Id: I342171090f681581fb54d68ea4a09adf61f52081
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2014-10-22 14:30:01 -07:00
Elliott Hughes
d8213bb573 Update getnameinfo.c, remove dead code, and fix error reporting.
Also add a unit test for the salen size checking.

Bug: 1889275
Change-Id: I8ec4107df9e2e9a8571e8915525249c6e44b98ad
2013-02-13 13:11:11 -08:00
Elliott Hughes
d3b9d11369 Add a test that getaddrinfo works when hints are NULL.
Bug: 1827911
Change-Id: I9e1b774c44c10a8c5391bcf3baf1607f50eaf214
2013-02-13 08:22:07 -08:00