rlib/test/test_rsocket.py::test_getaddrinfo_pydotorg
def test_getaddrinfo_pydotorg():
result = [0]
> getaddrinfo_pydotorg(0, result)
rlib/test/test_rsocket.py:434:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
rlib/test/test_rsocket.py:419: in getaddrinfo_pydotorg
lst = getaddrinfo('python.org', None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
host = 'python.org', port_or_service = None, family = 0, socktype = 0, proto = 0
flags = 0, address_to_fill = None
def getaddrinfo(host, port_or_service,
family=AF_UNSPEC, socktype=0, proto=0, flags=0,
address_to_fill=None):
# port_or_service is a string, not an int (but try str(port_number)).
assert port_or_service is None or isinstance(port_or_service, str)
if _c._MACOSX and flags & AI_NUMERICSERV and \
(port_or_service is None or port_or_service == '0'):
port_or_service = '00'
hints = lltype.malloc(_c.addrinfo, flavor='raw', zero=True)
rffi.setintfield(hints, 'c_ai_family', family)
rffi.setintfield(hints, 'c_ai_socktype', socktype)
rffi.setintfield(hints, 'c_ai_protocol', proto)
rffi.setintfield(hints, 'c_ai_flags', flags)
# XXX need to lock around getaddrinfo() calls?
p_res = lltype.malloc(rffi.CArray(_c.addrinfo_ptr), 1, flavor='raw')
error = intmask(_c.getaddrinfo(host, port_or_service, hints, p_res))
res = p_res[0]
lltype.free(p_res, flavor='raw')
lltype.free(hints, flavor='raw')
if error:
> raise GAIError(error)
E GAIError: nodename nor servname provided, or not known
rlib/rsocket.py:1689: GAIError
builder: rpython-macos-x86-64 build #791*
test: rlib/test/test_rsocket.py::test_getaddrinfo_pydotorg