This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年06月03日 08:02 by skrah, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg137507 - (view) | Author: Stefan Krah (skrah) * (Python committer) | Date: 2011年06月03日 08:02 | |
The implicit timeout in regrtest.py makes it harder to write automated test scripts for 3rd party modules. First, you have to remember to set --timeout=0 for long running tests. Then, you have to remember not to use the --timeout option when compiling --without-threads. I'd much prefer that there's no timeout unless explicitly specified. For the buildbots, I think this could be done in the Makefile. |
|||
| msg137509 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2011年06月03日 09:28 | |
Le vendredi 03 juin 2011 10:02:12, vous avez écrit : > The implicit timeout in regrtest.py makes it harder to write automated > test scripts for 3rd party modules. First, you have to remember to > set --timeout=0 for long running tests. Ah? Which test is too long for the default timeout? On which kind of computer? It's difficult to choose a timeout working on any kind of computer. We use one hour because buildbots are configured with a timeout of something like 70 minutes (just a little bit longer than the regrtest timeout). > Then, you have to remember not to use the --timeout option when > compiling --without-threads. We can change regrtest to just print a warning, and not exit, if Python has no thread support and --timeout option is used. ... or we can can improve faulthandler to use SIGALARM+alarm() to implement faulthandler.dump_tracebacks_later(), which is already done in the 3rd party version of the module. Problem with SIGALRM: it interrupts the current system call which fails with EINTR (except for some system calls able to "restart"). This problem doesn't matter for regrtest because regrtest uses timeout=True and so we exit immediatly on SIGALRM. Another bigger problems: some Python tests uses SIGALRM with alarm(), and alarm() is global to the process. Well, the first solution (display a warning in regrtest, but don't exit) looks simpler :-) > I'd much prefer that there's no timeout unless explicitly specified. > For the buildbots, I think this could be done in the Makefile. I set a default timeout for buildbots, because I don't know how to change how regrtest is started on all buildbots, but you are right: it can be done in "make buildbottests". |
|||
| msg137514 - (view) | Author: Stefan Krah (skrah) * (Python committer) | Date: 2011年06月03日 10:36 | |
STINNER Victor <report@bugs.python.org> wrote: > > The implicit timeout in regrtest.py makes it harder to write automated > > test scripts for 3rd party modules. First, you have to remember to > > set --timeout=0 for long running tests. > > Ah? Which test is too long for the default timeout? On which kind of computer? I don't know about the regular tests, though I think it might be possible to exceed the timeout if you run the tests on a very slow machine under Valgrind. For cdecimal, I've integrated a facility into test_decimal.py to test all failures of Python API functions in a systematic manner. This works by wrapping all test_* methods in a function that first counts the number of API calls in a test case, then reruns the test case n times with a deliberate failure point moved ahead each time. This facility is of course not enabled by default and requires a small patch to _decimal.c. When enabled, run times easily exceed 1 hour, especially with Valgrind. The broader point is that due to the excellent refleak counting facility people might use (I hope!) regrtest.py for 3rd party modules, where we don't know the run times of the tests. > > Then, you have to remember not to use the --timeout option when > > compiling --without-threads. > > We can change regrtest to just print a warning, and not exit, if Python has no > thread support and --timeout option is used. This would already help a lot. Currently I have to do this in my test scripts: timeout="--timeout=0" if [ X"$args" = X"--without-threads" ]; then timeout="" fi > Well, the first solution (display a warning in regrtest, but don't exit) looks > simpler :-) Indeed. :) > > I'd much prefer that there's no timeout unless explicitly specified. > > For the buildbots, I think this could be done in the Makefile. > > I set a default timeout for buildbots, because I don't know how to change how > regrtest is started on all buildbots, but you are right: it can be done in > "make buildbottests". This would be my favorite solution. Of course other people might like the default timeout - it's hard to satisfy everyone. |
|||
| msg137515 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年06月03日 10:53 | |
New changeset f69a2716d433 by Victor Stinner in branch 'default': Close #12250: Disable the regrtest timeout by default http://hg.python.org/cpython/rev/f69a2716d433 |
|||
| msg140334 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2011年07月14日 13:43 | |
(I commited fixes for issue #12550 but specified issue #12250 in the changlog, I removed the related comment from python-dev from this issue) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:18 | admin | set | github: 56459 |
| 2011年07月14日 13:43:58 | vstinner | set | messages: + msg140334 |
| 2011年07月14日 13:43:04 | vstinner | set | messages: - msg140332 |
| 2011年07月14日 13:41:10 | python-dev | set | messages: + msg140332 |
| 2011年06月03日 10:53:50 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg137515 resolution: fixed stage: resolved |
| 2011年06月03日 10:36:38 | skrah | set | messages: + msg137514 |
| 2011年06月03日 09:28:27 | vstinner | set | messages: + msg137509 |
| 2011年06月03日 08:02:12 | skrah | create | |