[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

STINNER Victor report at bugs.python.org
Fri Apr 8 14:32:46 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

With the current implementation of faulthandler.dump_tracebacks_later(), use a timeout per function means create a new thread for each function (the thread is interrupted and exits when the test is done).

Quick benchmark with test_io on Linux (lowest "real time" of 3 runs):

- time ./python Lib/test/regrtest.py -v (with timeout): 1 min 3 sec
- time ./python Lib/test/regrtest.py -v, without timeout: 1 min 3 sec
- time ./python Lib/test/test_io.py (without timeout): 1 min 3 sec

test_io have 403 tests and 8 are skipped, so it looks like the creation of ~400 threads is really fast on Linux! test_io is one of the biggest test suite I think.

----------

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


More information about the Python-bugs-list mailing list