Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 248081 - dev-lang/python fails testsuite when run in background via --jobs
Summary: dev-lang/python fails testsuite when run in background via --jobs
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-11-21 23:29 UTC by Ryan Hill (RETIRED)
Modified: 2009-08-01 08:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2008-11-21 23:29:44 UTC
not sure what we can do about it, but wanted to get it on record.  maybe we can skip this test?


267 tests OK.
1 test failed:
    test_file
38 tests skipped:
    test_aepack test_al test_applesingle test_bsddb185 test_bsddb3
    test_cd test_cl test_codecmaps_cn test_codecmaps_hk
    test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
    test_dl test_gl test_imageop test_imgfile test_linuxaudiodev
    test_macfs test_macostools test_nis test_normalization
    test_ossaudiodev test_pep277 test_plistlib test_rgbimg
    test_scriptpackages test_socket_ssl test_socketserver test_sqlite
    test_startfile test_sunaudiodev test_timeout test_urllib2net
    test_urllibnet test_winreg test_winsound test_zipfile64
1 skip unexpected on linux2:
    test_urllib2net
Re-running failed tests in verbose mode
Re-running test 'test_file' in verbose mode
testAttributes (test.test_file.AutoFileTests) ... ok
testErrors (test.test_file.AutoFileTests) ... ok
testMethods (test.test_file.AutoFileTests) ... ok
testReadinto (test.test_file.AutoFileTests) ... ok
testRepr (test.test_file.AutoFileTests) ... ok
testWeakRefs (test.test_file.AutoFileTests) ... ok
testWritelinesIntegers (test.test_file.AutoFileTests) ... ok
testWritelinesIntegersUserList (test.test_file.AutoFileTests) ... ok
testWritelinesNonString (test.test_file.AutoFileTests) ... ok
testWritelinesUserList (test.test_file.AutoFileTests) ... ok
testBadModeArgument (test.test_file.OtherFileTests) ... ok
testIteration (test.test_file.OtherFileTests) ... ok
testModeStrings (test.test_file.OtherFileTests) ... ok
testSetBufferSize (test.test_file.OtherFileTests) ... ok
testStdin (test.test_file.OtherFileTests) ... FAIL
testTruncateOnWindows (test.test_file.OtherFileTests) ... ok
testUnicodeOpen (test.test_file.OtherFileTests) ... ok
test_close_open (test.test_file.FileThreadingTests) ... 17323 0.0000 ok
test_close_open_flush (test.test_file.FileThreadingTests) ... Q 9705 4.2143 ok
test_close_open_isatty (test.test_file.FileThreadingTests) ... Q 8138 4.8415 ok
test_close_open_iter (test.test_file.FileThreadingTests) ... Q 6221 22.7134 ok
test_close_open_print (test.test_file.FileThreadingTests) ... Q 2992 2.2727 ok
test_close_open_read (test.test_file.FileThreadingTests) ... Q 10195 5.5910 ok
test_close_open_readinto (test.test_file.FileThreadingTests) ... Q 7047 12.6295 ok
test_close_open_readline (test.test_file.FileThreadingTests) ... Q 10762 53.7354 ok
test_close_open_readlines (test.test_file.FileThreadingTests) ... Q 6362 25.9352 ok
test_close_open_seek (test.test_file.FileThreadingTests) ... Q 6876 25.7272 ok
test_close_open_tell (test.test_file.FileThreadingTests) ... Q 15508 66.3593 ok
test_close_open_truncate (test.test_file.FileThreadingTests) ... Q 8508 72.7080 ok
test_close_open_write (test.test_file.FileThreadingTests) ... Q 8547 4.2822 ok
test_close_open_writelines (test.test_file.FileThreadingTests) ... 10461 0.0000 ok

======================================================================
FAIL: testStdin (test.test_file.OtherFileTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-2.5.2-r8/work/Python-2.5.2/Lib/test/test_file.py", line 142, in testStdin
    self.assertRaises(IOError, sys.stdin.seek, -1)
AssertionError: IOError not raised

----------------------------------------------------------------------
Ran 31 tests in 3.726s

FAILED (failures=1)
test test_file failed -- Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-2.5.2-r8/work/Python-2.5.2/Lib/test/test_file.py", line 142, in testStdin
    self.assertRaises(IOError, sys.stdin.seek, -1)
AssertionError: IOError not raised

make: *** [test] Error 1
 *
 * ERROR: dev-lang/python-2.5.2-r8 failed.
Comment 1 Zac Medico gentoo-dev 2008-11-21 23:39:25 UTC
I guess the test assumes that stdin is a tty. It seems like it should check that sys.stding.isatty() returns True before making that assumption.
Comment 2 René Rhéaume (a.k.a. repzilon, rener) 2009-03-07 14:21:48 UTC
I have the same failure with test_file.py even though I do not use --jobs yet.
Comment 3 Zac Medico gentoo-dev 2009-03-07 22:22:08 UTC
(In reply to comment #2)
> I have the same failure with test_file.py even though I do not use --jobs yet.

--quiet can also trigger it.
Comment 4 Zac Medico gentoo-dev 2009-03-26 05:15:45 UTC
As a workaround, I've patched python-2.5.2-r7 and up to redirect stdin from /dev/tty when running tests.
Comment 5 Zac Medico gentoo-dev 2009-07-31 16:07:12 UTC
The code from bug #278895 is triggering '/dev/tty: No such device or address' errors now, so we're going to have to patch the test to use a  'if sys.stdin.isatty()' conditional.
Comment 6 Zac Medico gentoo-dev 2009-08-01 08:19:43 UTC
(In reply to comment #5)
> The code from bug #278895 is triggering '/dev/tty: No such device or address'
> errors now, so we're going to have to patch the test to use a  'if
> sys.stdin.isatty()' conditional.

This is fixed in the python-2.6.2-r1 ebuild now.