zephyr/tests/drivers/uart
Andriy Gelman 6db785404a tests: drivers: uart_async_api: Be more robust to early buf release
Commit eb44414af9 modified
test_single_read for early rx buf release.

The commit assumed that tdata.last_rx_buf points to either &tdata.rx_buf[0]
if the driver releases the first buffer or at &rx_buf[5] if the first
buffer is not released. However, where tdata.last_rx_buf points to depends
on the timeout given to uart_rx_enable(), making the test flaky.

This commit modifies the test by keeping track how many bytes have been
received in the first and second buffers.
The function tdata_check_recv_buffer() validates that the sent data
matches the received bytes which may have been split between first and
second buffer.

This fixes the uart_async_api test on the xmc45_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-11-13 09:41:49 +01:00
..
uart_async_api tests: drivers: uart_async_api: Be more robust to early buf release 2023-11-13 09:41:49 +01:00
uart_basic_api tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
uart_emul tests: serial: uart: emul: Update isr rx/tx tests 2023-11-03 11:44:12 +01:00
uart_mix_fifo_poll tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
uart_pm tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00