classification
Title: test_socket.py fails
Type: compile error Stage:
Components: Tests Versions: Python 3.0, Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Tinctorius, christian.heimes, donmez, facundobatista
Priority: normal Keywords:

Created on 2007-12-13 10:17 by donmez, last changed 2008-10-05 14:19 by Tinctorius. This issue is now closed.

Messages (7)
msg58528 - (view) Author: Ismail Donmez (donmez) * Date: 2007-12-13 10:17
Checkout Python 2.5 from release25-maint branch, revision 59479,

[~/python-2.5]> LD_LIBRARY_PATH=/home/cartman/python-2.5: ./python
./Lib/test/test_socket.py
testCrucialConstants (__main__.GeneralModuleTests) ... ok
testDefaultTimeout (__main__.GeneralModuleTests) ... ok
testGetServBy (__main__.GeneralModuleTests) ... ERROR
testGetSockOpt (__main__.GeneralModuleTests) ... ok
testHostnameRes (__main__.GeneralModuleTests) ... ok
testIPv4toString (__main__.GeneralModuleTests) ... ok
testIPv6toString (__main__.GeneralModuleTests) ... ok
testInterpreterCrash (__main__.GeneralModuleTests) ... ok
testNewAttributes (__main__.GeneralModuleTests) ... ok
testNtoH (__main__.GeneralModuleTests) ... ok
testRefCountGetNameInfo (__main__.GeneralModuleTests) ... ok
testSendAfterClose (__main__.GeneralModuleTests) ... ok
testSetSockOpt (__main__.GeneralModuleTests) ... ok
testSockName (__main__.GeneralModuleTests) ... ok
testSocketError (__main__.GeneralModuleTests) ... ok
testStringToIPv4 (__main__.GeneralModuleTests) ... ok
testStringToIPv6 (__main__.GeneralModuleTests) ... ok
test_weakref (__main__.GeneralModuleTests) ... ok
testFromFd (__main__.BasicTCPTest) ... ok
testOverFlowRecv (__main__.BasicTCPTest) ... ok
testOverFlowRecvFrom (__main__.BasicTCPTest) ... ok
testRecv (__main__.BasicTCPTest) ... ok
testRecvFrom (__main__.BasicTCPTest) ... ok
testSendAll (__main__.BasicTCPTest) ... ok
testShutdown (__main__.BasicTCPTest) ... ok
testClose (__main__.TCPCloserTest) ... ok
testInterruptedTimeout (__main__.TCPTimeoutTest) ... ok
testTCPTimeout (__main__.TCPTimeoutTest) ... ok
testTimeoutZero (__main__.TCPTimeoutTest) ... ok
testExceptionTree (__main__.TestExceptions) ... ok
testRecvFromInto (__main__.BufferIOTest) ... ok
testRecvInto (__main__.BufferIOTest) ... ok
testRecvFrom (__main__.BasicUDPTest) ... ok
testRecvFromNegative (__main__.BasicUDPTest) ... ok
testSendtoAndRecv (__main__.BasicUDPTest) ... ok
testTimeoutZero (__main__.UDPTimeoutTest) ... ok
testUDPTimeout (__main__.UDPTimeoutTest) ... ok
testAccept (__main__.NonBlockingTCPTests) ... ok
testConnect (__main__.NonBlockingTCPTests) ... ok
testRecv (__main__.NonBlockingTCPTests) ... ok
testSetBlocking (__main__.NonBlockingTCPTests) ... ok
testClosedAttr (__main__.FileObjectClassTestCase) ... ok
testFullRead (__main__.FileObjectClassTestCase) ... ok
testReadline (__main__.FileObjectClassTestCase) ... ok
testSmallRead (__main__.FileObjectClassTestCase) ... ok
testUnbufferedRead (__main__.FileObjectClassTestCase) ... ok
testClosedAttr (__main__.UnbufferedFileObjectClassTestCase) ... ok
testFullRead (__main__.UnbufferedFileObjectClassTestCase) ... ok
testReadline (__main__.UnbufferedFileObjectClassTestCase) ... ok
testSmallRead (__main__.UnbufferedFileObjectClassTestCase) ... ok
testUnbufferedRead (__main__.UnbufferedFileObjectClassTestCase) ... ok
testUnbufferedReadline (__main__.UnbufferedFileObjectClassTestCase) ... ok
testClosedAttr (__main__.LineBufferedFileObjectClassTestCase) ... ok
testFullRead (__main__.LineBufferedFileObjectClassTestCase) ... ok
testReadline (__main__.LineBufferedFileObjectClassTestCase) ... ok
testSmallRead (__main__.LineBufferedFileObjectClassTestCase) ... ok
testUnbufferedRead (__main__.LineBufferedFileObjectClassTestCase) ... ok
testClosedAttr (__main__.SmallBufferedFileObjectClassTestCase) ... ok
testFullRead (__main__.SmallBufferedFileObjectClassTestCase) ... ok
testReadline (__main__.SmallBufferedFileObjectClassTestCase) ... ok
testSmallRead (__main__.SmallBufferedFileObjectClassTestCase) ... ok
testUnbufferedRead (__main__.SmallBufferedFileObjectClassTestCase) ... ok
testClose (__main__.Urllib2FileobjectTest) ... ok
testRecv (__main__.BasicSocketPairTest) ... ok
testSend (__main__.BasicSocketPairTest) ... ok
testLinuxAbstractNamespace (__main__.TestLinuxAbstractNamespace) ... ok
testMaxName (__main__.TestLinuxAbstractNamespace) ... ok
testNameOverflow (__main__.TestLinuxAbstractNamespace) ... ok

======================================================================
ERROR: testGetServBy (__main__.GeneralModuleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Lib/test/test_socket.py", line 344, in testGetServBy
    eq(socket.getservbyport(port2), service)
error: port/proto not found

----------------------------------------------------------------------
Ran 68 tests in 5.558s

FAILED (errors=1)
Traceback (most recent call last):
  File "./Lib/test/test_socket.py", line 995, in <module>
    test_main()
  File "./Lib/test/test_socket.py", line 991, in test_main
    test_support.run_unittest(*tests)
  File "/home/cartman/python-2.5/Lib/test/test_support.py", line 441, in
run_unittest
    run_suite(suite, testclass)
  File "/home/cartman/python-2.5/Lib/test/test_support.py", line 426, in
run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "./Lib/test/test_socket.py", line 344, in testGetServBy
    eq(socket.getservbyport(port2), service)
error: port/proto not found
msg58530 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2007-12-13 13:00
What happens if you do NOT change the library path in front of it?
msg58532 - (view) Author: Ismail Donmez (donmez) * Date: 2007-12-13 13:03
Then it won't run as expected (I got python 2.4 installed system wise) :

./python: error while loading shared libraries: libpython2.5.so.1.0:
cannot open shared object file: No such file or directory
msg58640 - (view) Author: Ismail Donmez (donmez) * Date: 2007-12-14 22:41
Any other thing I can do to debug this?
msg58649 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-12-15 01:38
Yes, can you tell us the content of port2 and service?
msg58655 - (view) Author: Ismail Donmez (donmez) * Date: 2007-12-15 04:38
This was a glibc regression on my side, it can be closed as invalid. Thanks!
msg74345 - (view) Author: Stijn van Drongelen (Tinctorius) Date: 2008-10-05 14:19
Reproducable with Python3.0rc1 on Debian lenny, only when nscd is running.

Not a Python bug.
History
Date User Action Args
2008-10-05 14:19:16Tinctoriussetnosy: + Tinctorius
messages: + msg74345
versions: + Python 3.0
2007-12-15 05:08:10christian.heimessetstatus: open -> closed
resolution: not a bug
2007-12-15 04:38:05donmezsetmessages: + msg58655
2007-12-15 01:38:46christian.heimessetnosy: + christian.heimes
messages: + msg58649
2007-12-14 22:41:51donmezsetmessages: + msg58640
2007-12-13 13:03:09donmezsetmessages: + msg58532
2007-12-13 13:00:48facundobatistasetnosy: + facundobatista
messages: + msg58530
2007-12-13 10:17:13donmezcreate