The SbSocketResolveTest.IgnoreExtraBits test case of cobalt release 11 would be probabilistic failed(sometimes would pass) with the same platform and the same binary, from the test code in socket_resolve.cc it can see that when the filters is set to 1<<14 or 0, it will both run into line 68(hints.ai_family = AF_UNSPEC; at line 39), but for the same hostname, the first time it get 2 IP addresses(1 IPV4, 1 IPV6), for the second time, it get 5 IP addresses(1 IPV4, 4 IPV6), and then it will fail because the test case think the ip addresses number should the same, so it seemed be something wrong with test test case itself, can someone help to have look?
[ RUN ] SbSocketResolveTest.IgnoreExtraBits
[AAAAA]in SbSocketResolve at 53 in ../../third_party/starboard/shared/posix/socket_resolve.cc, filters=16384
[AAAAA]in SbSocketResolve at 67 in ../../third_party/starboard/shared/posix/socket_resolve.cc
getaddrinfo response 0
Flags: 0x20
Family: AF_INET v4
IPv4 addr 203.188.200.67
getaddrinfo response 1
Flags: 0x20
Family: AF_INET v6
IPv6 addr 2406:2000:ec:c00::1001
[AAAAA]in SbSocketResolve at 53 in ../../third_party/starboard/shared/posix/socket_resolve.cc, filters=0
[AAAAA]in SbSocketResolve at 67 in ../../third_party/starboard/shared/posix/socket_resolve.cc
getaddrinfo response 0
Flags: 0x20
Family: AF_INET v4
IPv4 addr 203.188.200.67
getaddrinfo response 1
Flags: 0x20
Family: AF_INET v6
IPv6 addr 2001:4998:c:e33::53
getaddrinfo response 2
Flags: 0x20
Family: AF_INET v6
IPv6 addr 2001:4998:44:204::100d
getaddrinfo response 3
Flags: 0x20
Family: AF_INET v6
IPv6 addr 2001:4998:44:204::a7
getaddrinfo response 4
Flags: 0x20
Family: AF_INET v6
IPv6 addr 2001:4998:c:e33::54
../../starboard/nplb/socket_resolve_test.cc:80: Failure
Value of: resolution1->address_count
Actual: 2
Expected: resolution2->address_count
Which is: 5
[ FAILED ] SbSocketResolveTest.IgnoreExtraBits (5203 ms)
[1]: https://cobalt.googlesource.com/cobalt/+/release_11/src/starboard/shared/posix/socket_resolve.cc