[New-bugs-announce] [issue7207] test_telnetlib fails on OS X 10.6

Mark Dickinson report at bugs.python.org
Mon Oct 26 10:15:12 CET 2009


New submission from Mark Dickinson <dickinsm at gmail.com>:

test_telnetlib fails consistently on OS X 10.6, for a default (64-bit) 
build of py3k.  Test output below.

It looks to me as though this is just a race condition in the test 
(possibly combined with socket-related peculiarities of OS X) rather 
than a problem with telnetlib itself.  I suspect that the 'server' 
function in test_telnetlib.py is getting to the 'serv.close()' line 
prematurely, before all the test data from the 'test_write' test have 
been written.

Jack, I notice you've worked on these tests recently.  Any ideas?



testBasic (__main__.GeneralTests) ... ok
testTimeoutDefault (__main__.GeneralTests) ... ok
testTimeoutNone (__main__.GeneralTests) ... ok
testTimeoutOpen (__main__.GeneralTests) ... ok
testTimeoutValue (__main__.GeneralTests) ... ok
test_read_all_A (__main__.ReadTests) ... ok
test_read_all_B (__main__.ReadTests) ... ok
test_read_all_C (__main__.ReadTests) ... ok
test_read_eager_A (__main__.ReadTests) ... ok
test_read_eager_B (__main__.ReadTests) ... ok
test_read_lazy_A (__main__.ReadTests) ... ok
test_read_lazy_B (__main__.ReadTests) ... ok
test_read_some_A (__main__.ReadTests) ... ok
test_read_some_B (__main__.ReadTests) ... ok
test_read_some_C (__main__.ReadTests) ... ok
test_read_until_A (__main__.ReadTests) ... ok
test_read_until_B (__main__.ReadTests) ... ok
test_read_very_eager_A (__main__.ReadTests) ... ok
test_read_very_eager_B (__main__.ReadTests) ... ok
test_read_very_lazy_A (__main__.ReadTests) ... ok
test_read_very_lazy_B (__main__.ReadTests) ... ok
test_write (__main__.WriteTests) ... ERROR
test_IAC_commands (__main__.OptionTests) ... ok
test_SB_commands (__main__.OptionTests) ... ok
test_debuglevel_reads (__main__.OptionTests) ... ok
test_debuglevel_write (__main__.OptionTests) ... ok

======================================================================
ERROR: test_write (__main__.WriteTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_telnetlib.py", line 347, in test_write
    self._test_write(d)
  File "Lib/test/test_telnetlib.py", line 332, in _test_write
    self.telnet.write(data)
  File "/Users/dickinsm/python/svn/py3k/Lib/telnetlib.py", line 280, in 
write
    self.sock.sendall(buffer)
  File "Lib/test/test_telnetlib.py", line 317, in sendall
    self.socket.sendall(data)
socket.error: [Errno 32] Broken pipe

----------------------------------------------------------------------
Ran 26 tests in 10.179s

FAILED (errors=1)
Traceback (most recent call last):
  File "Lib/test/test_telnetlib.py", line 470, in <module>
    test_main()
  File "Lib/test/test_telnetlib.py", line 467, in test_main
    support.run_unittest(GeneralTests, ReadTests, WriteTests, 
OptionTests)
  File "/Users/dickinsm/python/svn/py3k/Lib/test/support.py", line 911, 
in run_unittest
    _run_suite(suite)
  File "/Users/dickinsm/python/svn/py3k/Lib/test/support.py", line 894, 
in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_telnetlib.py", line 347, in test_write
    self._test_write(d)
  File "Lib/test/test_telnetlib.py", line 332, in _test_write
    self.telnet.write(data)
  File "/Users/dickinsm/python/svn/py3k/Lib/telnetlib.py", line 280, in 
write
    self.sock.sendall(buffer)
  File "Lib/test/test_telnetlib.py", line 317, in sendall
    self.socket.sendall(data)
socket.error: [Errno 32] Broken pipe

----------
components: Tests
messages: 94481
nosy: jackdied, mark.dickinson
severity: normal
stage: needs patch
status: open
title: test_telnetlib fails on OS X 10.6
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7207>
_______________________________________


More information about the New-bugs-announce mailing list