tests: drivers: can: api: check frames in test_send_receive_msgq()
Test that the received frames in test_send_receive_msgq() matches the frames sent. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
570c254eda
commit
3e290c636e
1 changed files with 2 additions and 0 deletions
|
@ -779,6 +779,7 @@ void test_send_receive_msgq(void)
|
||||||
for (i = 0; i < nframes; i++) {
|
for (i = 0; i < nframes; i++) {
|
||||||
err = k_msgq_get(&can_msgq, &frame, TEST_RECEIVE_TIMEOUT);
|
err = k_msgq_get(&can_msgq, &frame, TEST_RECEIVE_TIMEOUT);
|
||||||
zassert_equal(err, 0, "receive timeout");
|
zassert_equal(err, 0, "receive timeout");
|
||||||
|
assert_frame_equal(&frame, &test_std_frame_1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < nframes; i++) {
|
for (i = 0; i < nframes; i++) {
|
||||||
|
@ -788,6 +789,7 @@ void test_send_receive_msgq(void)
|
||||||
for (i = 0; i < nframes; i++) {
|
for (i = 0; i < nframes; i++) {
|
||||||
err = k_msgq_get(&can_msgq, &frame, TEST_RECEIVE_TIMEOUT);
|
err = k_msgq_get(&can_msgq, &frame, TEST_RECEIVE_TIMEOUT);
|
||||||
zassert_equal(err, 0, "receive timeout");
|
zassert_equal(err, 0, "receive timeout");
|
||||||
|
assert_frame_equal(&frame, &test_std_frame_1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
can_remove_rx_filter(can_dev, filter_id);
|
can_remove_rx_filter(can_dev, filter_id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue