Mbed-os: Echo test in CI sporadically failing

Created on 17 Apr 2018  路  5Comments  路  Source: ARMmbed/mbed-os

All 5 comments

FYI: @studavekar @0xc0170

This type of test should be functional always if the rest is (host client communication is working). I do not recall any change to the test itself (its python counterpart). Where else it could be ?

@kegilbert @cmonr this is still an issue that affects master.

From quick discussion with @studavekar this is generic failure, might be related to the load on the host. When I checked the history of the file there were 2 changes done long time ago. Few more boards recently failed this test - k82f, kw24d.

Do we need any delay after sending echo? Or using something else than getc (our tokenizer uses it currently). Alternate between tx/rx/tx/rx?

cc @kjbracey-arm

My supposition was that as you are using "raw" unbuffered serial, you are totally reliant on the device being ready and receiving - spinning in serial_getc whenever data comes in. This sort of reception is pretty dicey - normally you would need an interrupt handler for reliable reception (using UARTSerial eg by turning on platform.stdio-buffered-serial would do this).

In this case I'm guessing the time spent to parse the echo back echo_count from the host is long enough that it doesn't get back to serial_getc in time for the first byte of the first echo packet.

So I think your patch should resolve it - you're no longer ever getting two packets in a row from the PC.

Closing since PR has been brought in.

Was this page helpful?
0 / 5 - 0 ratings