Mk `test_crash_handler_cms` suite go green
Turns out there were some subtle internal bugs discovered by the just added `tests/devx/test_tooling::test_crash_handler_cms` suite. So this fixes, - a mis-ordering around `rt_repl_fixture :=` in the logic of `DebugStatus.maybe_enter_repl_fixture()`. - `.devx.debug._post_mortem._post_mortem()` ensuring we now **always** call `DebugStatus.release()`, and thus unwind the exist-stack managing the `repl_fixture` exit/teardown, **even in the case** where `yield False` is delivered from the user-fixture-fn (meaning `dnter_repl=False`) thus triggering an early `return` (as is done in the new test suite).main
parent
9ff448faa3
commit
f5056cdd02
|
@ -148,7 +148,9 @@ def _post_mortem(
|
||||||
repl_fixture=repl_fixture,
|
repl_fixture=repl_fixture,
|
||||||
boxed_maybe_exc=boxed_maybe_exc,
|
boxed_maybe_exc=boxed_maybe_exc,
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
if not enter_repl:
|
if not enter_repl:
|
||||||
|
# XXX, trigger `.release()` below immediately!
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
actor: Actor = current_actor()
|
actor: Actor = current_actor()
|
||||||
|
@ -194,7 +196,7 @@ def _post_mortem(
|
||||||
# frame=None,
|
# frame=None,
|
||||||
traceback=tb,
|
traceback=tb,
|
||||||
)
|
)
|
||||||
|
finally:
|
||||||
# XXX NOTE XXX: this is abs required to avoid hangs!
|
# XXX NOTE XXX: this is abs required to avoid hangs!
|
||||||
#
|
#
|
||||||
# Since we presume the post-mortem was enaged to
|
# Since we presume the post-mortem was enaged to
|
||||||
|
|
|
@ -846,9 +846,9 @@ class DebugStatus:
|
||||||
|
|
||||||
'''
|
'''
|
||||||
if not (
|
if not (
|
||||||
repl_fixture
|
|
||||||
or
|
|
||||||
(rt_repl_fixture := _state._runtime_vars.get('repl_fixture'))
|
(rt_repl_fixture := _state._runtime_vars.get('repl_fixture'))
|
||||||
|
or
|
||||||
|
repl_fixture
|
||||||
):
|
):
|
||||||
return True # YES always enter
|
return True # YES always enter
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue