Message132588
| Author |
pitrou |
| Recipients |
Arfrever, Trundle, dmalcolm, lemburg, pitrou, scott.dial, vstinner |
| Date |
2011年03月30日.13:44:31 |
| SpamBayes Score |
6.9950046e-11 |
| Marked as misclassified |
No |
| Message-id |
<1301439584.3545.16.camel@localhost.localdomain> |
| In-reply-to |
<1301437787.91.0.301978972565.issue11393@psf.upfronthosting.co.za> |
| Content |
> - speed up the test: because dump_backtraces_later() has now a
> subsecond resolution, we can use sleep of 50 ms instead of 1 sec
This is too short, there may be random failures on some slow buildbots.
IMO, 0.5s is the minimum you can use.
+ def _check_dump_tracebacks_later(self, repeat, cancel, filename):
+ """
+ Call dump_tracebacks_later() two times, or three times if
repeat is True.
+ Check the output: the traceback may be written 1, 2 or 3 times
+ depending on repeat and cancel options.
+
+ Raise an error if the output doesn't match the expect format.
+ """
The docstring is outdated. It also seems the "cancel" option isn't
useful anymore, you could remove it and simplify the test.
+ process = script_helper.spawn_python('-c', code)
+ stdout, stderr = process.communicate()
Shouldn't you check the return code as well?
+ code = "\n".join(code)
Again, I think it would make the code simpler and more maintainable if
you used triple-quoted strings instead of lists/tuples.
When you launch a waiting thread in a subprocess, I think it's better to
set it in daemon mode so as to avoid blocking if the main thread raises
an exception.
You have a "#ifdef MS_WINDOWS" in check_signum() but that function is
not compiled under Windows (it is inside "#ifdef FAULTHANDLER_USER"). |
|