src/shared/config.c has only 33% coverage (66/197 lines). The two most critical functions — config_send() and config_receive() — have zero hits. These functions serialize/deserialize the configuration over the wire, so bugs here cause protocol desync or silent data corruption.
Edge cases around string fields (empty strings, long paths, null pointers)
Transfer of boolean/int fields over wire
Suggested tests
config_send() + config_receive() round-trip — create Config, serialize to buffer, deserialize, verify all fields match
Round-trip with all field combinations (compression on/off, multithreading, metadata, TLS, etc.)
Round-trip with edge-case strings (empty, very long, unicode, null characters)
Version mismatch handling
Partial/corrupted data recovery
Test that TLS cert/key paths are NOT sent over wire (security requirement)
Use a memory buffer (pipe or socketpair) as the file descriptor to avoid actual network I/O.
Labels: testing, coverage, protocol
`src/shared/config.c` has only **33% coverage** (66/197 lines). The two most critical functions — `config_send()` and `config_receive()` — have **zero hits**. These functions serialize/deserialize the configuration over the wire, so bugs here cause protocol desync or silent data corruption.
Also uncovered:
- Config validation logic
- Error handling paths (version mismatch, malformed config)
- Edge cases around string fields (empty strings, long paths, null pointers)
- Transfer of boolean/int fields over wire
## Suggested tests
1. `config_send()` + `config_receive()` round-trip — create Config, serialize to buffer, deserialize, verify all fields match
2. Round-trip with all field combinations (compression on/off, multithreading, metadata, TLS, etc.)
3. Round-trip with edge-case strings (empty, very long, unicode, null characters)
4. Version mismatch handling
5. Partial/corrupted data recovery
6. Test that TLS cert/key paths are NOT sent over wire (security requirement)
Use a memory buffer (pipe or socketpair) as the file descriptor to avoid actual network I/O.
**Labels**: testing, coverage, protocol
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.
src/shared/config.chas only 33% coverage (66/197 lines). The two most critical functions —config_send()andconfig_receive()— have zero hits. These functions serialize/deserialize the configuration over the wire, so bugs here cause protocol desync or silent data corruption.Also uncovered:
Suggested tests
config_send()+config_receive()round-trip — create Config, serialize to buffer, deserialize, verify all fields matchUse a memory buffer (pipe or socketpair) as the file descriptor to avoid actual network I/O.
Labels: testing, coverage, protocol