zephyr/tests/drivers/uart/uart_async_api/src
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
..
test_uart_async.c tests: drivers: uart_async_api: Be more robust to early buf release 2023-11-13 09:41:49 +01:00
test_uart_wide.c tests: drivers: uart: Adding wide data async tests 2023-08-30 10:17:17 +02:00
test_uart.h soc: xtensa,riscv: esp32xx: refactor folder structure 2023-07-25 18:12:33 +02:00