zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.85k stars 6.61k forks source link

tests:subsys_canbus_isotp: mimxrt1060 meet recv timeout #31741

Closed hakehuang closed 3 years ago

hakehuang commented 3 years ago

Describe the bug after apply the PR https://github.com/zephyrproject-rtos/zephyr/pull/31730 , we meet data derived issue in isotp

To Reproduce Steps to reproduce the behavior: set up zephyr build and code from https://docs.zephyrproject.org/latest/getting_started/index.html

  1. west init .
  2. west update
  3. cd zephyr
  4. source ./zephyr-env.sh
  5. cd tests/subsys/canbus/isotp/conformance
  6. west build -b mimxrt1060_evk -- -G'Unix Makefiles'
  7. connect mimxrt1060_evk board with usb serial to host pc
  8. west flash --runner=pyocd

Expected behavior Test PASS

Impact ISOTP can stack supporting

Logs and console output

Running test suite isotp_conformance
===================================================================
START - test_send_sf
 PASS - test_send_sf
===================================================================
START - test_receive_sf
I: SF DL does not match. Ignore
I: SF DL does not match. Ignore
 PASS - test_receive_sf
===================================================================
START - test_send_sf_ext
 PASS - test_send_sf_ext
===================================================================
START - test_receive_sf_ext
I: SF DL does not match. Ignore
W: Unhandled error/status (status 0x00000001, result = 0x00000001
 PASS - test_receive_sf_ext
===================================================================
START - test_send_data
 PASS - test_send_data
===================================================================
START - test_send_data_blocks
 PASS - test_send_data_blocks
===================================================================
START - test_receive_data
 PASS - test_receive_data
===================================================================
START - test_receive_data_blocks
 PASS - test_receive_data_blocks
===================================================================
START - test_send_timeouts
E: Reception of next FC has timed out
E: Reception of next FC has timed out
E: Reception of next FC has timed out
 PASS - test_send_timeouts
===================================================================
START - test_receive_timeouts
E: Timeout while waiting for CF
 PASS - test_receive_timeouts
===================================================================
START - test_stmin
 PASS - test_stmin
===================================================================
START - test_receiver_fc_errors
E: Sequence number missmatch
W: Unhandled error/status (status 0x00000001, result = 0x00000002
 PASS - test_receiver_fc_errors
===================================================================
START - test_sender_fc_errors
W: Unhandled error/status (status 0x00000001, result = 0x00000002

    Assertion failed at WEST_TOPDIR/zephyr/tests/subsys/canbus/isotp/conformance/src/main.c:833: test_sender_fc_errors: (ret not equal to 0)
Send complete callback not called
 FAIL - test_sender_fc_errors
===================================================================
Test suite isotp_conformance failed.

Environment (please complete the following information):

hakehuang commented 3 years ago

result for isotp_implement


*** Booting Zephyr OS build v2.5.0-rc1-109-gaee9e6364e3f  ***
Running test suite isotp
===================================================================
START - test_bind_unbind
 PASS - test_bind_unbind
===================================================================
START - test_send_receive_net_sf
 PASS - test_send_receive_net_sf
===================================================================
START - test_send_receive_net_blocks
 PASS - test_send_receive_net_blocks
===================================================================
START - test_send_receive_net_single_blocks
 PASS - test_send_receive_net_single_blocks
===================================================================
START - test_send_receive_sf
 PASS - test_send_receive_sf
===================================================================
START - test_send_receive_blocks
 PASS - test_send_receive_blocks
===================================================================
START - test_send_receive_single_block
 PASS - test_send_receive_single_block
===================================================================
START - test_buffer_allocation
 PASS - test_buffer_allocation
===================================================================
START - test_buffer_allocation_wait
 PASS - test_buffer_allocation_wait
===================================================================
Test suite isotp succeeded
===================================================================
PROJECT EXECUTION SUCCESSFUL