Files
tinyusb/test
hathach ff57edb3e5 hil: make serial write timeout fatal
pyserial's posix write() raises SerialTimeoutException after partial
progress with the byte count lost, so the retry loop re-sent from the
same offset and could duplicate bytes on the wire — surfacing as bogus
data-mismatch failures that look like device firmware bugs.
write_timeout is already a total per-call deadline, so the loop added
duplication risk without extending the budget: write once and treat a
timeout as fatal. Default bumped 2 -> 10 s to keep the old overall
bound; HIL_SERIAL_WRITE_DEADLINE removed.

The per-character CLI loops keep their existing pacing (the 2 ms sleep
between single-byte writes already spaces them on the wire); no
unbounded ser.flush()/tcdrain is added.

Review follow-up for #3643 (hil_test.py l.257/264 findings).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 23:35:35 +07:00
..
2026-06-13 23:35:35 +07:00