serial: Expand manual tests with a fix for stalled reads
This change expands the manual test suite for the Serial API and includes a potential fix for the problem of stalled reads on Windows. The issue was a race between new data being received by the port and WaitCommEvent() being called. If the data was already buffered then the EV_RXCHAR event would not be fired. The solution is to use ReadFile() and modify the configured timeouts so that it will wait for at least one character to be received before returning. Bug: 1074389 Change-Id: I4dadb5b5d5992e530a2a86161ebea87b7ae16515 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2278843 Commit-Queue: Reilly Grant <reillyg@chromium.org> Reviewed-by:Matt Reynolds <mattreynolds@chromium.org> Cr-Commit-Position: refs/heads/master@{#789749}
Showing
Please register or sign in to comment