https://gitlab.synchro.net/main/sbbs/-/commit/acc4d3d556c46a87e0dff7fa
Modified Files:
src/ssh/test/mock_io.c mock_io.h test_auth.c
Log Message:
ssh-auth.c coverage: fix test infra bugs, 12 new tests (86% → 95%)
Fixed two infrastructure bugs that were silently breaking many tests:
1. direct_server_test() closed both ends of c2s pipe before calling
auth_server_impl(), so the server could never read injected messages.
Fix: close only the write end (new mock_io_close_c2s_write()).
2. dclient tests where the client callback succeeded would hang because
the server thread exited without closing s2c, leaving the client
blocked on recv. Fix: close_s2c flag on dclient_server_arg.
New tests: bad_prefix_in_loop, changereq_alloc, pk_ok_alloc, pk_sig_unknown_algo, pk_verify_alloc, get_methods_malloc, get_methods_trunc_payload, get_methods_ctrl_char,
changereq_lang_overflow, get_methods_unexpected,
get_methods_msg_alloc, changereq_prompt_overflow.
Co-Authored-By: Claude Opus 4.6 (1M context) <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net