[New-bugs-announce] [issue7151] regrtest -j sometimes fails if output gets written to stderr by a test

R. David Murray report at bugs.python.org
Fri Oct 16 20:51:16 CEST 2009


New submission from R. David Murray <rdmurray at bitdance.com>:

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.

----------
assignee: pitrou
components: Tests
files: regrtestj3stderr.patch
keywords: patch, patch
messages: 94143
nosy: pitrou, r.david.murray
priority: low
severity: normal
stage: patch review
status: open
title: regrtest -j sometimes fails if output gets written to stderr by a test
type: behavior
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file15148/regrtestj3stderr.patch

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


More information about the New-bugs-announce mailing list