netsleuth/tests
Andrew Pimenov 21b71a4056 icmp_win: bound trace_hops_win to a total timeout budget and stop it blocking process exit
subprocess_seconds was being applied per hop instead of as a total trace
budget, so a path with several non-responding hops could block for up to
max_hops * subprocess_seconds. The blocking call also ran on a
ThreadPoolExecutor worker via asyncio.to_thread, which concurrent.futures
joins at process exit - so an orphaned hop stuck past its timeout kept the
whole CLI alive long after diagnose() had already written its report.

Divide the budget across hops (capped at 4s per hop) with an early exit
once the total deadline passes, and dispatch the call on a raw daemon
thread instead so it can never hold the process open even in the worst
case.
2026-08-09 03:33:12 +03:00
..
fixtures compare: diff identity, latency, speed and findings between two reports 2026-08-09 03:24:03 +03:00
conftest.py project scaffold: uv packaging, config.yaml, package skeleton 2026-08-08 21:12:41 +03:00
test_bgp.py bgp: assemble BgpIntel from every source with per-source failures tolerated 2026-08-09 02:16:59 +03:00
test_compare.py compare: diff identity, latency, speed and findings between two reports 2026-08-09 03:24:03 +03:00
test_config.py config: pydantic-settings loader with env > .env > yaml precedence 2026-08-08 21:38:12 +03:00
test_dns_leak.py dns_leak: per-adapter asn mismatch and ecs leak detection 2026-08-09 02:32:13 +03:00
test_dnsbl_decode.py reputation: decode dnsbl 127.255.255.x error range as unavailable 2026-08-09 02:20:30 +03:00
test_exporter.py exporter: explicit placeholders so a failed section never reads as a healthy one 2026-08-09 02:46:53 +03:00
test_icmp_win_parse.py icmp_win: decode ICMP_ECHO_REPLY buffers for both pointer widths 2026-08-09 02:26:09 +03:00
test_icmp_win_trace.py icmp_win: bound trace_hops_win to a total timeout budget and stop it blocking process exit 2026-08-09 03:33:12 +03:00
test_interpret.py interpret: bufferbloat grading and overall verdict scoring 2026-08-08 22:10:26 +03:00
test_ip_geo_normalize.py ip_geo: field-wise merge, dual-stack comparison, provider fan-out 2026-08-09 02:14:03 +03:00
test_models.py models: domain shapes for geo, bgp, reputation, probes, speed 2026-08-08 21:33:09 +03:00
test_netinfo.py netinfo: local interface, gateway, mtu and per-adapter resolvers 2026-08-08 21:56:45 +03:00
test_orchestration.py orchestration: run_module envelope and exception classification 2026-08-08 21:53:05 +03:00
test_prober_stats.py latency: ping summarization and unprivileged backend fan-out 2026-08-09 02:25:04 +03:00
test_reputation.py reputation: internetdb, captcha risk and reputation assembly 2026-08-09 02:21:57 +03:00
test_speed_math.py speed: bufferbloat probe running concurrently with saturation 2026-08-09 02:39:24 +03:00
test_stats.py stats: rtt loss, mdev and jitter with timeout-safe edge cases 2026-08-08 22:00:00 +03:00
test_traceparse.py traceparse: os dispatcher and trace completion detection 2026-08-08 22:04:34 +03:00
test_traceroute_cascade.py icmp_win: bound trace_hops_win to a total timeout budget and stop it blocking process exit 2026-08-09 03:33:12 +03:00