Skip to content

Commit

Permalink
Allowances for localhost not resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
jellefoks committed Feb 6, 2025
1 parent 4a1e681 commit d7daab3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions starboard/android/shared/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
# This test is failing because localhost is not defined for IPv6 in
# /etc/hosts.
'SbSocketAddressTypes/SbSocketResolveTest.Localhost/filter_ipv6_type_ipv6',
'PosixSocketHints/PosixSocketResolveTest.Localhost/family_inet6_*',

# SbDirectory has problems with empty Asset dirs.
'SbDirectoryCanOpenTest.SunnyDayStaticContent',
Expand Down
5 changes: 3 additions & 2 deletions starboard/nplb/posix_compliance/posix_socket_resolve_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,9 @@ TEST_P(PosixSocketResolveTest, Localhost) {

int result = getaddrinfo(kLocalhost, 0, &hints, &ai);
#if SB_API_VERSION < 16
if (result == EAI_BADFLAGS && GetAddressFamily() == AF_INET6) {
// It's ok to return EAI_BADFLAGS for IPv6 on Starboard < 16.
if ((result == EAI_BADFLAGS || result == EAI_NODATA) &&
GetAddressFamily() == AF_INET6) {
// It's ok to return EAI_BADFLAGS or EAI_NODATA for IPv6 on Starboard < 16.
freeaddrinfo(ai);
return;
}
Expand Down

0 comments on commit d7daab3

Please sign in to comment.