• src/ssh/test/test_chan.c test_conn.c test_transport.c

    From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Apr 1 16:21:57 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/524f61e9ad3e6027ba6ac57d
    Modified Files:
    src/ssh/test/test_chan.c test_conn.c test_transport.c
    Log Message:
    Add tests for full public API and function coverage

    18 new tests across 3 files covering all previously-untested
    DSSH_PUBLIC functions and the last 4 uncovered internal functions:

    test_chan.c:
    - params_set_max_window: dssh_chan_params_set_max_window unit test

    test_transport.c:
    - kex/set_ctx: dssh_kex_set_ctx + NULL/unknown/TOOLATE guards
    - gather/set, gather/toolate: dssh_transport_set_tx_gather
    - gather/roundtrip: full handshake through scatter/gather TX path
    - rxline/from_rx_handshake: handshake with NULL rxline callback,
    exercises the rxline_from_rx fallback

    test_conn.c:
    - zc/open_client: client-side dssh_chan_zc_open roundtrip
    (also exercises dssh_chan_zc_getbuf + dssh_chan_zc_send)
    - zc/cancel: dssh_chan_zc_cancel after getbuf
    - null/zc_open: NULL guards for all ZC functions
    - event/session_set_cb + toolate: dssh_session_set_event_cb
    - event/chan_set_cb: dssh_chan_set_event_cb
    - event/session_set_max + toolate: dssh_session_set_max_events
    - event/chan_set_max: dssh_chan_set_max_events
    - pty/get_pty: dssh_chan_get_pty with PTY and non-PTY channels
    - env/roundtrip: env vars through accept_parse_env/parse_env_data

    Result: 0 missed functions in all 4 core files, 75% branch coverage.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net