• xtrn/termtest/termtest.js

    From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Mar 15 19:01:12 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8a49c13c9d95faa6da93d003
    Modified Files:
    xtrn/termtest/termtest.js
    Log Message:
    Add input key sequence tests to termtest.js

    Regression tests for the keyboard escape sequences fixed in 8ce16dd88f.
    The test menu now offers Non-interactive, Interactive, Input, and All
    modes. Input mode prompts the user to press each special key and
    validates the received escape sequence against a table of known-valid
    sequences from SyncTERM (term.c), VT-220/XTerm (ansi_cio.c), and VT-52.

    Covers: arrows, Home/End/PgUp/PgDn/Ins/Del, Backspace, Backtab,
    F1-F12, Shift+F1-F12, Ctrl+F1-F12, and Alt+F1-F12 (minus Alt+F4).
    Unrecognized sequences are displayed in hex for debugging.

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Mar 15 20:35:47 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/c6721f78fdc2143414321d8e
    Modified Files:
    xtrn/termtest/termtest.js
    Log Message:
    Add ANSI fuzz testing mode to termtest.js

    New 'Fuzz' option in the test menu sends intentionally malformed and
    edge-case ANSI sequences to stress-test terminal emulators. Runs
    indefinitely until the user presses a key or the terminal stops
    responding to cursor position reports.

    Five weighted fuzz categories:
    - Malformed CSI (weight 40): long params, many semicolons, huge values,
    invalid intermediates, random final bytes, private-mode garbage
    - Interrupted sequences (weight 25): ESC inside CSI, CAN/SUB mid-sequence,
    multiple bare ESCs, CSI interrupted by DCS
    - String sequences (weight 20): unterminated DCS/OSC/APC/PM/SOS, oversized
    strings, nested initiators, control chars in body
    - Boundary stress (weight 10): extreme cursor positions, inverted scroll
    regions, huge erase/insert counts, rapid scrolls
    - Random byte streams (weight 5): raw random bytes, random with resets,
    alternating valid/invalid sequences

    Each test case is logged with full hex dump to the BBS log so crashes
    can be reproduced. Liveness checked via DSR/CPR with a 3-second hard
    deadline. Terminal state reset (including string terminator) after each iteration. All loops guard bbs.online and js.terminated.

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Mar 15 22:51:38 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/b374321cedfaaadba5942c67
    Modified Files:
    xtrn/termtest/termtest.js
    Log Message:
    Ignore terminal responses in fuzz loop abort check

    When the fuzzer sends sequences that elicit terminal responses (e.g.
    DSR variants like ESC[...n), the response bytes land in the input
    buffer and get picked up by the abort-check console.inkey(), causing
    the fuzzer to exit prematurely thinking the user pressed a key.

    Now if the abort check reads ESC (0x1b), it recognizes this as a
    terminal response rather than user input, drains the rest of the
    sequence with a short timeout, and continues fuzzing. Only non-ESC
    characters are treated as user abort.

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)