classification
Title: regrtest -j sometimes fails if output gets written to stderr by a test
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: r.david.murray Nosy List: ezio.melotti, nobody, pitrou, r.david.murray
Priority: low Keywords: patch

Created on 2009-10-16 18:51 by r.david.murray, last changed 2009-10-19 16:40 by r.david.murray. This issue is now closed.

Files
File name Uploaded Description Edit
regrtestj3stderr.patch r.david.murray, 2009-10-18 17:12
Messages (3)
msg94143 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-10-16 18:51
In certain circumstances output written to stderr during a test comes
after the json result string the -j code is expecting to see at the end
of the returned subprocess output.  This causes that regrtest worker
thread to fail.  This problem is more acute on py3k; perhaps the new io
library is more likely to delay output of stderr.

Attached is a patch that avoids the problem by capturing stderr
separately.  This means that all stderr output will be after all regular
output, which changes the output of the test suite slightly (eg: in a
debug build all the refcount messages come after the output from
test_subprocess).  This seems like a small enough issue that it isn't
worth the code complexity required to code around it, especially since
the ordering of the interleaving of the two streams isn't guaranteed
even without -j.
msg94216 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-10-18 17:12
Updated patch that moves the print of the test name into the output that
gets put into the queue so that all output from a test stays together.
msg94243 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-10-19 16:40
Committed to trunk in r75503, and py3k in r75513.
History
Date User Action Args
2009-10-19 16:40:54r.david.murraysetstatus: open -> closed
messages: + msg94243

assignee: r.david.murray
keywords: patch, patch
resolution: fixed
stage: patch review -> resolved
2009-10-18 21:24:52benjamin.petersonsetkeywords: patch, patch
assignee: nobody -> (no value)
2009-10-18 17:23:00r.david.murraysetfiles: - regrtestj3stderr.patch
2009-10-18 17:12:36r.david.murraysetfiles: + regrtestj3stderr.patch

nosy: + ezio.melotti, nobody
messages: + msg94216

assignee: pitrou -> nobody
keywords: patch, patch
2009-10-18 17:07:51r.david.murraylinkissue7127 superseder
2009-10-16 18:51:15r.david.murraycreate