diff -r 3a57eafd8401 Lib/test/test_socket.py --- a/Lib/test/test_socket.py Tue May 24 09:15:14 2016 +0300 +++ b/Lib/test/test_socket.py Wed May 25 11:41:17 2016 +0200 @@ -1236,8 +1236,12 @@ if support.IPV6_ENABLED: socket.getaddrinfo('::1', 80) # port can be a string service name such as "http", a numeric - # port number or None - socket.getaddrinfo(HOST, "http") + # port number or None. Android API 21 fails when port is "http" or + # when the type is not set and port is a string. + if support.is_android: + socket.getaddrinfo(HOST, "echo", type=socket.SOCK_DGRAM) + else: + socket.getaddrinfo(HOST, "http") socket.getaddrinfo(HOST, 80) socket.getaddrinfo(HOST, None) # test family and socktype filters