https://gitlab.synchro.net/main/sbbs/-/commit/23dfeca99d7c104ccbc3af28
Modified Files:
src/ssh/test/mock_io.c mock_io.h test_conn.c
Log Message:
Rewrite mock I/O to socketpair(); add 19 conn edge case tests
Replace circular buffer + condvar mock I/O with Unix socketpair().
Blocking read/write with natural close-unblocks-peer behavior
eliminates timed waits and condvar signaling complexity.
Fix conn_cleanup to close pipes before dssh_session_stop() Ä with
socketpair I/O, condvar broadcasts cannot unblock a blocking read();
only closing the peer fd does. Fixes hangs in test_session_stop and test_session_start_twice.
New test coverage (88 conn tests, up from 69):
- Session poll WRITE readiness and timeout=0 for all event types
- Session write/write_ext after EOF, window=0, max_packet clamping
- Raw channel write after close, write TOOLONG
- Raw channel poll WRITE and timeout=0
- dssh_channel_accept_raw path
- Reject with long description (truncation)
- Signal interleave clamping (stdout and stderr readable limits)
- dssh_session_read_signal when no signal pending
- Accept with negative timeout (blocking, unblocked by terminate)
- Demux parse errors: short payload, truncated CHANNEL_OPEN,
truncated CHANNEL_REQUEST
ssh-conn.c branch coverage: 64.71% 72.79% (544 branches)
Co-Authored-By: Claude Opus 4.6 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net