tractor/tests/discovery
Gud Boi 5b2a064ae8 Open owned network namespaces
Add `open_netns()` to create a named Linux netns through pyroute2,
pin its identity and yield an owned `BindspaceHandle`.

Deats,
- run synchronous creation and removal in Trio worker threads
- shield both privileged side effects from caller cancellation
- reuse `attach_netns()` to pin identity and manage the FD
- close the FD before removing the owned namespace
- fake privileged operations while testing ordering and cancellation

Prompt-IO: ai/prompt-io/opencode/20260825T190529Z_e1007547_prompt_io.md

(this patch was generated in some part by `opencode` using `gpt-5.6-sol` (`openai`))
2026-08-25 15:11:08 -04:00
..
__init__.py Add `test_multiaddr.py` suite for `mk_maddr()` 2026-04-14 19:54:14 -04:00
conftest.py Mv `daemon` + `test_multi_program` to `discovery/` 2026-06-17 17:39:44 -04:00
test_address_serialization.py Emit canonical tagged addresses 2026-08-20 10:42:18 -04:00
test_bindspace.py Open owned network namespaces 2026-08-25 15:11:08 -04:00
test_multi_program.py Use `aid.uid` over manual `(name, uuid)` tuples 2026-06-27 21:38:30 -04:00
test_multiaddr.py Emit canonical tagged addresses 2026-08-20 10:42:18 -04:00
test_registrar.py Harden `test_registrar` with reap fixtures, timeouts 2026-06-17 17:39:44 -04:00
test_tpt_bind_addrs.py Emit canonical tagged addresses 2026-08-20 10:42:18 -04:00
test_tunnelled_addr.py Expose tunnel namespaces on IPC endpoints 2026-08-21 23:57:24 -04:00
test_wg_inspection.py Add explicit `verify_wg_peer()` inspection 2026-08-21 23:19:17 -04:00