Commit 7200fe81 authored by Ned Deily's avatar Ned Deily

Issue #20605: Make test_socket getaddrinfo OS X segfault test more robust.

parents 17216fdf cc1a394a
...@@ -1234,9 +1234,15 @@ class GeneralModuleTests(unittest.TestCase): ...@@ -1234,9 +1234,15 @@ class GeneralModuleTests(unittest.TestCase):
# Issue #6697. # Issue #6697.
self.assertRaises(UnicodeEncodeError, socket.getaddrinfo, 'localhost', '\uD800') self.assertRaises(UnicodeEncodeError, socket.getaddrinfo, 'localhost', '\uD800')
# Issue 17269 # Issue 17269: test workaround for OS X platform bug segfault
if hasattr(socket, 'AI_NUMERICSERV'): if hasattr(socket, 'AI_NUMERICSERV'):
socket.getaddrinfo("localhost", None, 0, 0, 0, socket.AI_NUMERICSERV) try:
# The arguments here are undefined and the call may succeed
# or fail. All we care here is that it doesn't segfault.
socket.getaddrinfo("localhost", None, 0, 0, 0,
socket.AI_NUMERICSERV)
except socket.gaierror:
pass
def test_getnameinfo(self): def test_getnameinfo(self):
# only IP addresses are allowed # only IP addresses are allowed
......
...@@ -33,6 +33,11 @@ Library ...@@ -33,6 +33,11 @@ Library
- Issue #19856: shutil.move() failed to move a directory to other directory - Issue #19856: shutil.move() failed to move a directory to other directory
on Windows if source name ends with os.altsep. on Windows if source name ends with os.altsep.
Tests
-----
- Issue #20605: Make test_socket getaddrinfo OS X segfault test more robust.
What's New in Python 3.4.0 release candidate 1? What's New in Python 3.4.0 release candidate 1?
=============================================== ===============================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment