Skip to content

Commit d051b60

Browse files
committed
[docs,qemu] Document QEMU logging
Add a short section on the QEMU tessting documentation that describes how the QEMU UART console output and log output are muxed into stdout without line buffering, to avoid confusion about interleaving of characters from both inputs. Signed-off-by: Alex Jones <[email protected]>
1 parent a87b003 commit d051b60

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

third_party/qemu/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,10 @@ For example, to manually add some traces for the USB device and alert updates wh
5353
```
5454
./bazelisk.sh test //path_to_qemu_test:my_test --test_arg=--qemu-args="--trace ot_usbdev* --trace ot*update_alert*"
5555
```
56+
57+
### Logging
58+
59+
When executing a test in a QEMU execution environment, the default behavior is that the QEMU log output stream is combined with the regular UART console output stream.
60+
When both interfaces are simultaneously written, it is possible that output may be disrupted by the characters interleaved from both streams.
61+
This can be particularly noticeable when tracing, where the QEMU log is often written much faster than regular console output.
62+
These outputs are not currently buffered by line breaks before combining the streams, meaning that it is possible for one line of console output to be split across multiple QEMU log lines.

0 commit comments

Comments
 (0)