Files
ngit-grasp/src
DanConwayDev 86325a3ecb fix(test-listener): inspect listening TCP sockets on Darwin
Darwin exposes the SO_ACCEPTCONN constant but rejects that getsockopt query with ENOPROTOOPT. Every inherited fixture listener therefore failed adoption before integration tests could start.

On Apple targets inspect TCP_CONNECTION_INFO and require the TCPS_LISTEN state instead. Retain SO_ACCEPTCONN elsewhere and the loopback check on all targets. Inspection must neither accept a queued connection nor call listen again, so listener ownership and backlog remain intact. This does not broaden the private test protocol or change production listener startup.

Add regressions rejecting UDP and connected stream descriptors and preserving a connection queued before adoption. Validation: three focused Linux tests pass using cached dependencies, rustfmt and diff checks pass; XNU implementation and headers confirm the Apple query and state value. Darwin execution remains pending.

Assisted-by: Codex (GPT-6)
2026-09-19 20:06:37 +00:00
..