Skip to content
Permalink
Browse files

Revert "tests: drivers: uart: Fix async write abort test"

This reverts commit d09b91f.  I was incorrect in my interpretation
of the async API: the number of bytes received is relative
to the previous event, so it does "reset" between calls.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
  • Loading branch information...
Sizurka authored and nashif committed May 13, 2019
1 parent 2099658 commit 02d6ea0feb9493165fc12acd8d91543244de0b2f
Showing with 1 addition and 5 deletions.
  1. +1 −5 tests/drivers/uart/uart_async_api/src/test_uart_async.c
@@ -292,18 +292,14 @@ void test_write_abort(void)
uart_tx(uart_dev, tx_buf, 5, 100);
zassert_equal(k_sem_take(&tx_done, 100), 0, "TX_DONE timeout");
zassert_equal(k_sem_take(&rx_rdy, 100), 0, "RX_RDY timeout");
zassert_equal(received, 5, "Incorrect number of bytes received.");
zassert_equal(memcmp(tx_buf, rx_buf, 5), 0, "Buffers not equal");

uart_tx(uart_dev, tx_buf, 95, 100);
uart_tx_abort(uart_dev);
zassert_equal(k_sem_take(&tx_aborted, 100), 0, "TX_ABORTED timeout");
if (sent != 0) {
zassert_equal(k_sem_take(&rx_rdy, 100), 0, "RX_RDY timeout");
zassert_equal(sent, received - 5,
"Sent is not equal to received.");
zassert_equal(memcmp(tx_buf, rx_buf, received), 0,
"Buffers not equal");
zassert_equal(sent, received, "Sent is not equal to received.");
}
uart_rx_disable(uart_dev);
zassert_equal(k_sem_take(&rx_buf_released, 100),

0 comments on commit 02d6ea0

Please sign in to comment.
You can’t perform that action at this time.