forked from goodboy/tractor
a628eabb30
By re-purposing our `pexpect`-based console matching with a new `debugging/shield_hang_in_sub.py` example, this tests a few "hanging actor" conditions more formally: - that despite a hanging actor's task we can dump a `stackscope.extract()` tree on relay of `SIGUSR1`. - the actor tree will terminate despite a shielded forever-sleep by our "T-800" zombie reaper machinery activating and hard killing the underlying subprocess. Some test deats: - simulates the expect actions of a real user by manually using `os.kill()` to send both signals to the actor-tree program. - `pexpect`-matches against `log.devx()` emissions under normal `debug_mode == True` usage. - ensure we get the actual "T-800 deployed" `log.error()` msg and that the actor tree eventually terminates! Surrounding (re-org/impl/test-suite) changes: - allow disabling usage via a `maybe_enable_greenback: bool` to `open_root_actor()` but enable by def. - pretty up the actual `.devx()` content from `.devx._stackscope` including be extra pedantic about the conc-primitives for each signal event. - try to avoid double handles of `SIGUSR1` even though it seems the original (what i thought was a) problem was actually just double logging in the handler.. |_ avoid double applying the handler func via `signal.signal()`, |_ use a global to avoid double handle func calls and, |_ a `threading.RLock` around handling. - move common fixtures and helper routines from `test_debugger` to `tests/devx/conftest.py` and import them for use in both test mods. |
||
---|---|---|
.. | ||
devx | ||
conftest.py | ||
test_2way.py | ||
test_advanced_faults.py | ||
test_advanced_streaming.py | ||
test_cancellation.py | ||
test_caps_based_msging.py | ||
test_child_manages_service_nursery.py | ||
test_clustering.py | ||
test_context_stream_semantics.py | ||
test_discovery.py | ||
test_docs_examples.py | ||
test_infected_asyncio.py | ||
test_inter_peer_cancellation.py | ||
test_legacy_one_way_streaming.py | ||
test_local.py | ||
test_multi_program.py | ||
test_pldrx_limiting.py | ||
test_pubsub.py | ||
test_resource_cache.py | ||
test_rpc.py | ||
test_runtime.py | ||
test_shm.py | ||
test_spawning.py | ||
test_task_broadcasting.py | ||
test_trioisms.py |