Skip to content

Commit

Permalink
tests: drivers: uart: uart_async_api: fix error on test_write_abort
Browse files Browse the repository at this point in the history
With the changes made in PR #76061, only on the F429ZI platform, in
the test_write_abort test,the number of received data (2) is not equal
to the number of sent data (1). It looks like uart_tx_abort is done very
quickly, and the callback doesn't have enough time to deal with it.
Adding a small delay solves the problem and doesn't affect results on
other platforms.

Signed-off-by: Fabrice DJIATSA <[email protected]>
  • Loading branch information
djiatsaf-st authored and henrikbrixandersen committed Jan 6, 2025
1 parent 921e281 commit c7da46a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/drivers/uart/uart_async_api/src/test_uart_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ ZTEST_USER(uart_async_write_abort, test_write_abort)
if (sent != 0) {
zassert_equal(k_sem_take(&rx_rdy, K_MSEC(100)), 0,
"RX_RDY timeout");
k_sleep(K_MSEC(30));
zassert_equal(sent, received, "Sent is not equal to received.");
}
uart_rx_disable(uart_dev);
Expand Down

0 comments on commit c7da46a

Please sign in to comment.