kerno start wires signal.NotifyContext and an http-server Shutdown, but nothing tests that a real SIGTERM drains the server, detaches bpf, and exits 0. shutdown bugs (skipped cleanup, hung goroutines, non-zero exit) only show up in production.
propose: an integration test that runs the daemon in a container, waits for /healthz to come up, sends SIGTERM, and asserts it exits 0 within the shutdown timeout with the metrics server closed and no goroutine leak in the logs. also assert a second SIGTERM or a stuck request doesn't wedge it.
depends on the harness (#143). this would also catch the os.Exit-skips-cleanup concern raised on the panic-recovery work in #95.
kerno startwiressignal.NotifyContextand an http-serverShutdown, but nothing tests that a real SIGTERM drains the server, detaches bpf, and exits 0. shutdown bugs (skipped cleanup, hung goroutines, non-zero exit) only show up in production.propose: an integration test that runs the daemon in a container, waits for
/healthzto come up, sends SIGTERM, and asserts it exits 0 within the shutdown timeout with the metrics server closed and no goroutine leak in the logs. also assert a second SIGTERM or a stuck request doesn't wedge it.depends on the harness (#143). this would also catch the os.Exit-skips-cleanup concern raised on the panic-recovery work in #95.