Conversation
aescolar
left a comment
There was a problem hiding this comment.
Just like the other PR this one is also based very far behind in main. So it would need to be rebased.
Anyhow, could you elaborate on the problem this is trying to solve?
When set, --uartX_pty_wait_for_readers will wait for all available bytes to be read from the slave PTY before exiting. This prevents truncating the UART output. Signed-off-by: Scott Shawcroft <scott@tannewt.org>
24de78c to
c292784
Compare
It's based on the version Zephyr 4.3.0 seems to be using. I've rebased it. With the CircuitPython bsim tests we've got two serial output streams:
To bound the time we need to run the tests, I added a flag to CircuitPython to exit the sim via posix_exit() once it has run code.py after a set number of times. This change is meant to ensure that pyserial reads all of the UART output before the process is exited and invalidates the PTY. Without it, the tests were quite flaky because they missed the last bit of output from the PTY. Using printks I could see all of the output queued. One test is actually still a little flaky for the same reason. I'm not sure why. |
|
Thanks for the answer @tannewt , I will look at the issue and PR. |
When set, --uartX_pty_wait_for_readers will wait for all available bytes to be read from the slave PTY before exiting. This prevents truncating the UART output.