The three transport modules have zero code coverage from unit tests:
transport_tcp.c — 0% (111 lines, all uncovered)
transport_tls.c — 0% (94 lines, all uncovered)
transport_ssh.c — 0% (106 lines, all uncovered)
All functions are completely untested: server_create, client_connect, accept_loop, create_ssl_ctx, wrap_fd_with_ssl, client_connect_tls, parse_remote_dest, client_connect_ssh, etc.
Root cause
Test files exist (test_transport_tcp.c, test_transport_ssh.c, test_transport_tls.c) but they either:
Make transport tests self-contained by creating loopback connections (use socketpair for TCP, mock SSL for TLS, fork+exec for SSH)
Add tests for:
server_create + client_connect with loopback
set_socket_timeouts with various values
parse_remote_dest with valid/invalid SSH destinations
create_ssl_ctx with/without CA cert
wrap_fd_with_ssl basic wrapping
Run transport tests in CI even without SSH/TLS infrastructure using loopback and self-signed certs
Labels: testing, coverage, transport
The three transport modules have **zero code coverage** from unit tests:
- `transport_tcp.c` — 0% (111 lines, all uncovered)
- `transport_tls.c` — 0% (94 lines, all uncovered)
- `transport_ssh.c` — 0% (106 lines, all uncovered)
All functions are completely untested: `server_create`, `client_connect`, `accept_loop`, `create_ssl_ctx`, `wrap_fd_with_ssl`, `client_connect_tls`, `parse_remote_dest`, `client_connect_ssh`, etc.
## Root cause
Test files exist (`test_transport_tcp.c`, `test_transport_ssh.c`, `test_transport_tls.c`) but they either:
- Skip tests conditionally (e.g., require SSH binary, TLS certs)
- Only test trivial helper functions
- Are empty/dummy placeholders
## Suggested fix
1. Make transport tests self-contained by creating loopback connections (use socketpair for TCP, mock SSL for TLS, fork+exec for SSH)
2. Add tests for:
- `server_create` + `client_connect` with loopback
- `set_socket_timeouts` with various values
- `parse_remote_dest` with valid/invalid SSH destinations
- `create_ssl_ctx` with/without CA cert
- `wrap_fd_with_ssl` basic wrapping
3. Run transport tests in CI even without SSH/TLS infrastructure using loopback and self-signed certs
**Labels**: testing, coverage, transport
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The three transport modules have zero code coverage from unit tests:
transport_tcp.c— 0% (111 lines, all uncovered)transport_tls.c— 0% (94 lines, all uncovered)transport_ssh.c— 0% (106 lines, all uncovered)All functions are completely untested:
server_create,client_connect,accept_loop,create_ssl_ctx,wrap_fd_with_ssl,client_connect_tls,parse_remote_dest,client_connect_ssh, etc.Root cause
Test files exist (
test_transport_tcp.c,test_transport_ssh.c,test_transport_tls.c) but they either:Suggested fix
server_create+client_connectwith loopbackset_socket_timeoutswith various valuesparse_remote_destwith valid/invalid SSH destinationscreate_ssl_ctxwith/without CA certwrap_fd_with_sslbasic wrappingLabels: testing, coverage, transport