Commit Graph

2 Commits (master)

Author SHA1 Message Date
Yosuke Shimizu 1a195cb1ec examples, ide, tests: classify the worker's status at the call site
- ssh_worker() in both echoservers maps a WS_FATAL_ERROR return from
  wolfSSH_worker() to WS_WANT_READ or WS_WANT_WRITE at the call site,
  off a new local err, and keeps the result in rc.
- The terminal arm tests rc in place of re-reading wolfSSH_get_error():
  rc != WS_WANT_READ in examples/echoserver, and rc != WS_WANT_READ &&
  rc != WS_WANT_WRITE in the Espressif copy, whose empty WS_WANT_WRITE
  arm is removed.
- ssh_worker() in examples/echoserver sets wantWrite from
  wolfSSH_OutputPending() before it builds writeFds.
- The comment above rc = cnt_r in both echoservers names cnt_r and
  ssh->error as the values that are reused.
- scripts/sshclient.test and scripts/fwd-bulk.test name the client's
  missing non-blocking mode in the skip message where they echoed the
  macro name, and the comments above both skips are removed.
2026-09-17 10:26:52 -07:00
John Safranek f8b72ac079 tests: move bulk data through a forward
scripts/fwd.test sends eight short lines, so nothing in the suite drives
a forwarding channel past its first window, and a forward that stalled
once the window needed crediting would go unnoticed.

- push a payload several windows long through a local direct-tcpip
  forward and compare the bytes that arrive
- end a second transfer one window plus a short tail in, where the tail
  is what portfwd still holds at end-of-input, and repeat it since the
  window credit beating that tail is a race
- give the listening nc its stdin from a fifo a sleep holds open:
  reading end-of-input makes nc close the connection, which truncates
  the transfer and looks exactly like a stall
- bail out early once the byte count stops moving, so a real stall
  reports in seconds
- dump the logs on failure, check the listening nc came up, and take
  ports clear of the ones fwd.test.expect hardcodes, so a squatted or
  shared port is not reported as a stall
2026-09-03 20:40:55 -05:00