msg126908 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-23 23:21 |
The attached patch adds resource monitoring to test.regrtest to detect which tests are changing the trace function w/o putting back to what it was previously. The tests listed below are thus all being naughty. This is a meta-issue to help track which tests need to be changed to stop this behavior.
test_doctest
test_exceptions
test_io
test_pdb
test_pickle
test_pickletools
test_richcmp
test_runpy
test_scope
test_sys_settrace
test_zipimport_support
|
msg126966 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 00:08 |
Cinder on IRC found that test_exception's RuntimeError test triggers a trace_trampoline() line of code which resets the trace function as an exception gets triggered in the trace function itself.
test_doctest is being messy and setting pdb's trace function w/o putting back what it wrote over.
|
msg126967 - (view) |
Author: Kristian Vlaardingerbroek (Kristian.Vlaardingerbroek) |
Date: 2011-01-25 00:12 |
test_pickle and test_pickletools both call test_bad_getattr in pickletester.py:1005
This results in a RuntimeError which leads to the same result as test_exceptions
|
msg126969 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 00:31 |
test_pdb uses pdb.set_trace() w/o putting the original trace function back.
|
msg126970 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 00:37 |
test_scope blindly resets the trace function to None.
|
msg126971 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 00:38 |
And here is a revelation: test_sys_settrace clobbers the trace function blindly.
|
msg126972 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 00:41 |
test_zipimport_support fails because test_doctest fails; it re-runs the tests from a zipfile.
|
msg126973 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 00:44 |
test_io is causing coverage.py to complain thanks to the TextIOWrapperTests, and the regrtest check is complaining about SignalsTests. Don't know why specifically for either.
|
msg126974 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 00:51 |
test_runpy fails because of a recursion depth test (test_main_recursion_error).
|
msg126975 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 00:52 |
test_richcmp is failing because of a recursion test (test_recursion)
|
msg126976 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 01:09 |
For test_io.*SignalsTests, its all the tests calling check_interrupted_write(). For TestIOWrapperTests its test_threads_write() (although only coverage.py is complaining, not regrtest).
|
msg126977 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 01:16 |
OK, now that all the modules have been analyzed, let's see what is what.
The modules not playing nicely with others by blindly reseting the trace module:
test_doctest
test_pdb
test_scope
test_sys_settrace
test_zipimport_support (because of test_doctest)
And the tests failing because of recursion depth:
test_exceptions
test_pickle
test_pickletools
test_richcmp
test_runpy
And test_io is just special thanks to signals and threading.
Here is my thinking on how to solve this. The tests that are not playing nicely with sys.settrace() should (a) be decorated with test.support.cpython_only, and (b) use addCleanup() to properly put the trace function back.
For the recursion depth tests, either the cause (which is probably trace_trampoline()) needs to be analyzed to decide if some other semantics are needed or need something to unset the trace function and then put it back, but only if sys.gettrace() exists (e.g., don't block on non-CPython VMs).
|
msg126980 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 01:57 |
Here is a patch that fixes test_scope.
|
msg126981 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 01:59 |
Here is a partial patch for test_sys_settrace. It fails on test_19_no_jump_without_trace_function for some reason I don't understand. It also doesn't protect against it being CPython-only as that is a function decorator and basically the whole module needs to be skipped.
|
msg127048 - (view) |
Author: Kristian Vlaardingerbroek (Kristian.Vlaardingerbroek) |
Date: 2011-01-25 20:28 |
test_trace can be added to this list, each call to runfunc does a sys.settrace()
121: self.tracer.runfunc(traced_func_loop, 2, 3)
133: self.tracer.runfunc(traced_func_importing, 2, 5)
145: self.tracer.runfunc(traced_func_calling_generator)
160: self.tracer.runfunc(traced_caller_list_comprehension)
183: tracer.runfunc(method, 20)
225: self.tracer.runfunc(traced_func_simple_caller, 1)
234: self.tracer.runfunc(traced_func_importing_caller, 1)
248: self.tracer.runfunc(obj.inst_method_calling, 1)
266: self.tracer.runfunc(traced_func_importing_caller, 1)
|
msg127051 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 21:09 |
Thanks for the diagnosis, Kristian. Attached is a patch for test_trace which fixes its over-zealous setting of the trace function (doesn't address the failures, though).
|
msg127052 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 21:14 |
Here is a patch for test_pdb; the context manager made this dirt-simple to fix.
|
msg127057 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 21:39 |
Patch for doctest/test_doctest (yes, both files were wiping out the trace function.
|
msg127058 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-25 21:39 |
And with this patch for test_zipimport_support to work thanks to the test_doctest changes, all of the test suites blasting the trace function *should* be fixed.
|
msg127077 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-26 00:35 |
I have a patch that I am testing right now which deals which fixes all the test suites.
|
msg127081 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-26 02:12 |
OK, here is a single patch (from `hg outgoing --patch`) that fixes all the tests by introducing the test.support.no_tracing decorator.
|
msg127084 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-26 02:27 |
OK, here is an updated patch that fixes the introduced failure in test_sys_settrace. This should be ready to go for Python 3.3 once the tree opens up (unless someone reviews it and finds a problem).
|
msg127235 - (view) |
Author: Kristian Vlaardingerbroek (Kristian.Vlaardingerbroek) |
Date: 2011-01-27 22:44 |
Cleaned up patch file. Removed non-related diffs and redundant updates.
refcount_test decorator is still in there.
|
msg127333 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-28 20:04 |
Attached is a fixed copy of Kristian's patch; error in test_trace where self.settrace was being called.
|
msg127548 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-01-30 20:26 |
Sorry about that. New patch attached.
|
msg128182 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-02-08 18:48 |
Updated patch that applies cleanly.
|
msg128985 - (view) |
Author: Brett Cannon (brett.cannon) * |
Date: 2011-02-21 19:31 |
r88467 has it for 3.3.
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:11 | admin | set | github: 55199 |
2011-02-21 19:31:27 | brett.cannon | set | status: open -> closed
messages:
+ msg128985 resolution: accepted -> fixed stage: patch review -> resolved |
2011-02-08 18:48:16 | brett.cannon | set | files:
- issue_10990.diff |
2011-02-08 18:48:06 | brett.cannon | set | files:
+ issue10990.diff
messages:
+ msg128182 |
2011-01-30 20:26:39 | brett.cannon | set | files:
+ issue_10990.diff
messages:
+ msg127548 |
2011-01-30 20:26:09 | brett.cannon | set | files:
- issue10990.diff |
2011-01-28 20:04:44 | brett.cannon | set | files:
- trace_fxn_protected.diff |
2011-01-28 20:04:38 | brett.cannon | set | files:
- issue10990.diff |
2011-01-28 20:04:31 | brett.cannon | set | files:
+ issue10990.diff
messages:
+ msg127333 |
2011-01-27 22:44:52 | Kristian.Vlaardingerbroek | set | files:
+ issue10990.diff
messages:
+ msg127235 |
2011-01-26 02:27:27 | brett.cannon | set | files:
+ trace_fxn_protected.diff versions:
- Python 3.2 messages:
+ msg127084
resolution: accepted stage: patch review |
2011-01-26 02:23:52 | brett.cannon | set | files:
- trace_fxn_protected.diff |
2011-01-26 02:13:04 | brett.cannon | set | files:
- test_zipimport_support.diff |
2011-01-26 02:13:01 | brett.cannon | set | files:
- test_doctest.diff |
2011-01-26 02:12:58 | brett.cannon | set | files:
- test_gdb.diff |
2011-01-26 02:12:55 | brett.cannon | set | files:
- test_trace.diff |
2011-01-26 02:12:52 | brett.cannon | set | files:
- test_sys_settrace.diff |
2011-01-26 02:12:48 | brett.cannon | set | files:
- test_scope.diff |
2011-01-26 02:12:43 | brett.cannon | set | files:
- sys_gettrace_monitor.diff |
2011-01-26 02:12:31 | brett.cannon | set | files:
+ trace_fxn_protected.diff
messages:
+ msg127081 |
2011-01-26 00:35:36 | brett.cannon | set | assignee: brett.cannon messages:
+ msg127077 |
2011-01-25 21:39:51 | brett.cannon | set | files:
+ test_zipimport_support.diff
messages:
+ msg127058 |
2011-01-25 21:39:02 | brett.cannon | set | files:
+ test_doctest.diff
messages:
+ msg127057 |
2011-01-25 21:14:42 | brett.cannon | set | files:
+ test_gdb.diff
messages:
+ msg127052 |
2011-01-25 21:09:08 | brett.cannon | set | files:
+ test_trace.diff
messages:
+ msg127051 |
2011-01-25 20:28:49 | Kristian.Vlaardingerbroek | set | messages:
+ msg127048 |
2011-01-25 01:59:59 | brett.cannon | set | files:
+ test_sys_settrace.diff
messages:
+ msg126981 |
2011-01-25 01:57:39 | brett.cannon | set | files:
+ test_scope.diff
messages:
+ msg126980 |
2011-01-25 01:16:10 | brett.cannon | set | messages:
+ msg126977 stage: needs patch -> (no value) |
2011-01-25 01:09:16 | brett.cannon | set | messages:
+ msg126976 |
2011-01-25 00:52:53 | brett.cannon | set | messages:
+ msg126975 |
2011-01-25 00:51:39 | brett.cannon | set | messages:
+ msg126974 |
2011-01-25 00:44:14 | brett.cannon | set | messages:
+ msg126973 |
2011-01-25 00:41:14 | brett.cannon | set | messages:
+ msg126972 |
2011-01-25 00:38:34 | brett.cannon | set | messages:
+ msg126971 |
2011-01-25 00:37:27 | brett.cannon | set | messages:
+ msg126970 |
2011-01-25 00:31:43 | brett.cannon | set | messages:
+ msg126969 |
2011-01-25 00:12:21 | Kristian.Vlaardingerbroek | set | messages:
+ msg126967 |
2011-01-25 00:08:15 | brett.cannon | set | messages:
+ msg126966 |
2011-01-24 10:28:37 | Kristian.Vlaardingerbroek | set | nosy:
+ Kristian.Vlaardingerbroek
|
2011-01-23 23:21:15 | brett.cannon | create | |