1.9 KiB
Web admission diagnostics host tests
Run from the repository root:
python3 tests/web_diagnostics/run.py
python3 tests/web_admin_transport/server_lifecycle.py
python3 tests/admin_console_boundary/lifecycle.py
python3 tests/admin_ssh_policy/run.py
run.py compiles the entire production web_diagnostics.c (only includes are
substituted) plus all four actual server tracing wrappers, with strict C11
warnings. CC selects the compiler. No dependencies beyond Python 3 and a C
compiler; no device/network/build actions or persistent generated files.
Twelve runtime groups cover disabled capture, existing live connections, handler return/route preservation, WS classification, heap/stack field mapping, six slots and duplicate/overflow callbacks, stale TLS identity/fd reuse, capture-epoch interleavings, exact ring overwrite accounting, formatted-output secrecy with poisoned URI/header/body fields, bounded concurrent show/clear, stale upgrade completion, partial stop/restart, invalid input, and nonwrapping IDs/saturating counters. One additional source guard group checks production wiring and absence of request/logging/allocation/task/queue APIs. Fakes assert that printing, heap sampling and public HTTPD/TLS calls never run under the metadata lock.
These are deterministic injected interleavings, not a real FreeRTOS concurrency or TLS/socket simulation. The restart test models synchronous callbacks; the separate lifecycle harness executes real server orchestration with dependency fakes and verifies callback configuration, six sockets/no LRU, unchanged timeouts and all 16 existing failure/restart groups. Canonical CLI routing and SSH/browser policy have separate tests. No target heap, stack margin, admission reliability or secrecy of external SDK logging is proven by these tests.
Usage, exact SDK cleanup audit, resource accounting, and target checklist:
docs/phase8d11_implementation.md, “Authorized admission diagnostic slice”.