• src/ssh/test/CMakeLists.txt test_algo_key.c test_alloc.c test_conn.c t

    From Deucе@VERT to Git commit to main/sbbs/master on Fri Mar 27 20:57:48 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/e5f2201704c844eb92f03213
    Modified Files:
    src/ssh/test/CMakeLists.txt test_algo_key.c test_alloc.c test_conn.c test_selftest.c
    Log Message:
    Speed up test suite 2x: cancellable watchdog, RSA key caching, CTest consolidation

    Four optimizations reduce full CTest wall time from ~25s to ~12.5s at -j16:

    1. Cancellable watchdog in test_alloc.c: the conn_iterate test's watchdog
    thread slept 3s unconditionally on every iteration (7 iterations = 21s).
    Replace with condvar-based wait that cancels immediately when conn
    threads finish. alloc/conn_iterate: 21s -> 0.02s.

    2. RSA key caching in test_algo_key.c: 30 tests that just need a key
    present now load from DSSH_TEST_RSA_KEY (set by CTest) instead of
    generating a fresh 2048-bit RSA key each time. Tests that specifically
    test key generation keep calling generate_key directly.
    dssh_unit_algo_key: 20s -> 8s.

    3. CTest consolidation: transport, conn, selftest, and thread_error tests
    now run all tests per executable in one process (dssh_add_variant_tests
    macro) instead of one CTest entry per test function. Reduces CTest
    entries from ~4487 to ~1551 and eliminates fork/exec scheduling
    overhead. Auth tests stay individual for sntrup parallelism.

    4. Sleep reduction in test_conn.c and test_selftest.c: demux-processing
    sleeps reduced from 100-200ms to 10-20ms (demux processes packets in
    microseconds). Race-widener and I/O error detection sleeps kept at
    original values. Saves ~2s per in-process conn run.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net