ddve...@ucar.edu added the comment:

Just to see this test running to completion, I applied the following (ugly) 
patch:

--- Lib/test/test_socket.py.orig    2012-04-09 17:07:32.000000000 -0600
+++ Lib/test/test_socket.py     2013-02-03 06:56:11.778118985 -0700
@@ -14,7 +14,7 @@
 import array
 import contextlib
 from weakref import proxy
-import signal
+#import signal
 import math
 
 def try_address(host, port=0, family=socket.AF_INET):
@@ -33,6 +33,12 @@
 MSG = b'Michael Gilfix was here\n'
 SUPPORTS_IPV6 = socket.has_ipv6 and try_address('::1', family=socket.AF_INET6)
 
+signal = "not a signal"
+
 try:
     import thread


With it, the test case completed as follows, which at least confirmed that the 
only broken part is sendall_interrupted. I'll live with it for now, but I'll be 
happy to work with the maintainer of these tests to understand what are they 
trying to accomplish, how to make them fail more gracefully (I tried installing 
a signal handler without success), and how to tell what to do to users of 
systems affected by the issue.


./python Lib/test/regrtest.py -v test_socket
== CPython 2.7.3 (default, Feb 2 2013, 11:27:13) [GCC 4.7.2]
==   Linux-2.6.32-220.13.1.el6.x86_64-x86_64-with-redhat-6.2-Santiago 
little-endian
==   
/glade/scratch/ddvento/build/Python-2.7.3-westmere-gdb-without-tipc/build/test_python_16005
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, 
division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, 
no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, 
unicode=0, bytes_warning=0, hash_randomization=0)
test_socket
testCrucialConstants (test.test_socket.GeneralModuleTests) ... ok
testDefaultTimeout (test.test_socket.GeneralModuleTests) ... ok
testGetServBy (test.test_socket.GeneralModuleTests) ... ok
testGetSockOpt (test.test_socket.GeneralModuleTests) ... ok
testGetaddrinfo (test.test_socket.GeneralModuleTests) ... ok
testHostnameRes (test.test_socket.GeneralModuleTests) ... ok
testIPv4_inet_aton_fourbytes (test.test_socket.GeneralModuleTests) ... ok
testIPv4toString (test.test_socket.GeneralModuleTests) ... ok
testIPv6toString (test.test_socket.GeneralModuleTests) ... ok
testInterpreterCrash (test.test_socket.GeneralModuleTests) ... ok
testListenBacklog0 (test.test_socket.GeneralModuleTests) ... ok
testNewAttributes (test.test_socket.GeneralModuleTests) ... ok
testNtoH (test.test_socket.GeneralModuleTests) ... ok
testNtoHErrors (test.test_socket.GeneralModuleTests) ... ok
testRefCountGetNameInfo (test.test_socket.GeneralModuleTests) ... ok
testSendAfterClose (test.test_socket.GeneralModuleTests) ... ok
testSendtoErrors (test.test_socket.GeneralModuleTests) ... ok
testSetSockOpt (test.test_socket.GeneralModuleTests) ... ok
testSockName (test.test_socket.GeneralModuleTests) ... ok
testSocketError (test.test_socket.GeneralModuleTests) ... ok
testStringToIPv4 (test.test_socket.GeneralModuleTests) ... ok
testStringToIPv6 (test.test_socket.GeneralModuleTests) ... ok
test_flowinfo (test.test_socket.GeneralModuleTests) ... ok
test_getsockaddrarg (test.test_socket.GeneralModuleTests) ... ok
test_sendall_interrupted (test.test_socket.GeneralModuleTests) ... skipped 
'signal.alarm and socket.socketpair required for this test'
test_sendall_interrupted_with_timeout (test.test_socket.GeneralModuleTests) ... 
skipped 'signal.alarm and socket.socketpair required for this test'
test_sock_ioctl (test.test_socket.GeneralModuleTests) ... skipped 'Windows 
specific'
test_weakref (test.test_socket.GeneralModuleTests) ... ok
testDup (test.test_socket.BasicTCPTest) ... ok
testFromFd (test.test_socket.BasicTCPTest) ... ok
testOverFlowRecv (test.test_socket.BasicTCPTest) ... ok
testOverFlowRecvFrom (test.test_socket.BasicTCPTest) ... ok
testRecv (test.test_socket.BasicTCPTest) ... ok
testRecvFrom (test.test_socket.BasicTCPTest) ... ok
testSendAll (test.test_socket.BasicTCPTest) ... ok
testShutdown (test.test_socket.BasicTCPTest) ... ok
testClose (test.test_socket.TCPCloserTest) ... ok
testInterruptedTimeout (test.test_socket.TCPTimeoutTest) ... ok
testTCPTimeout (test.test_socket.TCPTimeoutTest) ... ok
testTimeoutZero (test.test_socket.TCPTimeoutTest) ... ok
testExceptionTree (test.test_socket.TestExceptions) ... ok
testRecvFromIntoArray (test.test_socket.BufferIOTest) ... ok
testRecvFromIntoBytearray (test.test_socket.BufferIOTest) ... ok
testRecvFromIntoMemoryview (test.test_socket.BufferIOTest) ... ok
testRecvIntoArray (test.test_socket.BufferIOTest) ... ok
testRecvIntoBytearray (test.test_socket.BufferIOTest) ... ok
testRecvIntoMemoryview (test.test_socket.BufferIOTest) ... ok
testDup (test.test_socket.BasicTCPTest2) ... ok
testFromFd (test.test_socket.BasicTCPTest2) ... ok
testOverFlowRecv (test.test_socket.BasicTCPTest2) ... ok
testOverFlowRecvFrom (test.test_socket.BasicTCPTest2) ... ok
testRecv (test.test_socket.BasicTCPTest2) ... ok
testRecvFrom (test.test_socket.BasicTCPTest2) ... ok
testSendAll (test.test_socket.BasicTCPTest2) ... ok
testShutdown (test.test_socket.BasicTCPTest2) ... ok
testRecvFrom (test.test_socket.BasicUDPTest) ... ok
testRecvFromNegative (test.test_socket.BasicUDPTest) ... ok
testSendtoAndRecv (test.test_socket.BasicUDPTest) ... ok
testTimeoutZero (test.test_socket.UDPTimeoutTest) ... ok
testUDPTimeout (test.test_socket.UDPTimeoutTest) ... ok
testAccept (test.test_socket.NonBlockingTCPTests) ... ok
testConnect (test.test_socket.NonBlockingTCPTests) ... ok
testRecv (test.test_socket.NonBlockingTCPTests) ... ok
testSetBlocking (test.test_socket.NonBlockingTCPTests) ... ok
testClosedAttr (test.test_socket.FileObjectClassTestCase) ... ok
testFullRead (test.test_socket.FileObjectClassTestCase) ... ok
testReadline (test.test_socket.FileObjectClassTestCase) ... ok
testReadlineAfterRead (test.test_socket.FileObjectClassTestCase) ... ok
testReadlineAfterReadNoNewline (test.test_socket.FileObjectClassTestCase) ... ok
testSmallRead (test.test_socket.FileObjectClassTestCase) ... ok
testUnbufferedRead (test.test_socket.FileObjectClassTestCase) ... ok
test_default (test.test_socket.FileObjectInterruptedTestCase) ... ok
test_no_buffer (test.test_socket.FileObjectInterruptedTestCase) ... ok
test_with_1k_buffer (test.test_socket.FileObjectInterruptedTestCase) ... ok
testClosedAttr (test.test_socket.UnbufferedFileObjectClassTestCase) ... ok
testFullRead (test.test_socket.UnbufferedFileObjectClassTestCase) ... ok
testReadline (test.test_socket.UnbufferedFileObjectClassTestCase) ... ok
testReadlineAfterRead (test.test_socket.UnbufferedFileObjectClassTestCase) ... 
ok
testReadlineAfterReadNoNewline 
(test.test_socket.UnbufferedFileObjectClassTestCase) ... ok
testSmallRead (test.test_socket.UnbufferedFileObjectClassTestCase) ... ok
testUnbufferedRead (test.test_socket.UnbufferedFileObjectClassTestCase) ... ok
testUnbufferedReadline (test.test_socket.UnbufferedFileObjectClassTestCase) ... 
ok
testClosedAttr (test.test_socket.LineBufferedFileObjectClassTestCase) ... ok
testFullRead (test.test_socket.LineBufferedFileObjectClassTestCase) ... ok
testReadline (test.test_socket.LineBufferedFileObjectClassTestCase) ... ok
testReadlineAfterRead (test.test_socket.LineBufferedFileObjectClassTestCase) 
... ok
testReadlineAfterReadNoNewline 
(test.test_socket.LineBufferedFileObjectClassTestCase) ... ok
testSmallRead (test.test_socket.LineBufferedFileObjectClassTestCase) ... ok
testUnbufferedRead (test.test_socket.LineBufferedFileObjectClassTestCase) ... ok
testClosedAttr (test.test_socket.SmallBufferedFileObjectClassTestCase) ... ok
testFullRead (test.test_socket.SmallBufferedFileObjectClassTestCase) ... ok
testReadline (test.test_socket.SmallBufferedFileObjectClassTestCase) ... ok
testReadlineAfterRead (test.test_socket.SmallBufferedFileObjectClassTestCase) 
... ok
testReadlineAfterReadNoNewline 
(test.test_socket.SmallBufferedFileObjectClassTestCase) ... ok
testSmallRead (test.test_socket.SmallBufferedFileObjectClassTestCase) ... ok
testUnbufferedRead (test.test_socket.SmallBufferedFileObjectClassTestCase) ... 
ok
testClose (test.test_socket.Urllib2FileobjectTest) ... ok
test_connect (test.test_socket.NetworkConnectionNoServer) ... ok
test_create_connection (test.test_socket.NetworkConnectionNoServer) ... ok
test_create_connection_timeout (test.test_socket.NetworkConnectionNoServer) ... 
ok
testFamily (test.test_socket.NetworkConnectionAttributesTest) ... ok
testSourceAddress (test.test_socket.NetworkConnectionAttributesTest) ... ok
testTimeoutDefault (test.test_socket.NetworkConnectionAttributesTest) ... ok
testTimeoutNone (test.test_socket.NetworkConnectionAttributesTest) ... ok
testTimeoutValueNamed (test.test_socket.NetworkConnectionAttributesTest) ... ok
testTimeoutValueNonamed (test.test_socket.NetworkConnectionAttributesTest) ... 
ok
testInsideTimeout (test.test_socket.NetworkConnectionBehaviourTest) ... ok
testOutsideTimeout (test.test_socket.NetworkConnectionBehaviourTest) ... ok
testRecv (test.test_socket.BasicSocketPairTest) ... ok
testSend (test.test_socket.BasicSocketPairTest) ... ok
testLinuxAbstractNamespace (test.test_socket.TestLinuxAbstractNamespace) ... ok
testMaxName (test.test_socket.TestLinuxAbstractNamespace) ... ok
testNameOverflow (test.test_socket.TestLinuxAbstractNamespace) ... ok

----------------------------------------------------------------------
Ran 113 tests in 9.957s

OK (skipped=3)
1 test OK.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17085>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to