Open multiplemonomials opened 2 years ago
Ok, if I understand it correctly... Current function endpoint_abort for STM32F7 is exactly same as endpoint_remove and that is probably the reason why the test is not working, but the root cause probably is, there is not any HAL_PCD_EP_abort function for that.
However ST already released new version of STM32F7 HAL drivers where requested function already is - Release note v1.17.0
Exactly same situation seems to be also for all STM32 families where the USB is implemented. So the solution seems to be update HAL drivers for affected families.
What do you think @multiplemonomials?
BR, Jan
Nice find! Make a PR and we can test it.
I tried it locally, but unfortunately it seems still not working. I will continue with investigating. EDIT: I do not understand to USB very well so it seems to be out of my possibilities.
2/72 Test #2: mbed-usb-device-basic ..........................***Failed 17.36 sec
[1/1] Flashing mbed-usb-device-basic with STM32CubeProg...
-------------------------------------------------------------------
STM32CubeProgrammer v2.11.0
-------------------------------------------------------------------
ST-LINK SN : 002000243156501320323443
ST-LINK FW : V3J10M3
Board : NUCLEO-H743ZI
Voltage : 3.30V
SWD freq : 24000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x450
Revision ID : Rev V
Device name : STM32H7xx
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7
BL Version : 0x90
Memory Programming ...
Opening and parsing file: mbed-usb-device-basic.elf
Warning: File corrupted. Two or more segments defines the same memory zone
File : mbed-usb-device-basic.elf
Size : 75.42 KB
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
Download in Progress:
██████████████████████████████████████████████████ 100%
File download complete
Time elapsed during download operation: 00:00:01.251
MCU Reset
Software reset is performed
Executing: mbedhtrun --skip-flashing -p COM27 -e C:/Users/USER/MbedCE/MbedCE_Testerino/mbed-os/drivers/usb/tests/TESTS/usb_device/basic/../../host_tests -m NUCLEO_H743ZI2 --baud-rate=115200
[1676317313.70][HTST][INF] host test executor ver. 1.8.14
[1676317313.71][HTST][INF] copy image onto target... SKIPPED!
[1676317313.71][HTST][INF] starting host test process...
[1676317315.98][CONN][INF] starting connection process...
[1676317315.98][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling
[1676317315.98][CONN][INF] initializing serial port listener...
[1676317315.98][SERI][INF] using specified port 'COM27'
[1676317315.98][HTST][INF] setting timeout to: 60 sec
[1676317315.98][SERI][INF] serial(port=COM27, baudrate=115200, read_timeout=0.01, write_timeout=5)
[1676317315.98][SERI][INF] reset device using 'default' plugin...
[1676317316.24][SERI][INF] waiting 1.00 sec after reset
[1676317317.24][SERI][INF] wait for it...
[1676317317.24][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed
[1676317317.24][CONN][INF] sending up to 2 __sync packets (specified with --sync=2)
[1676317317.24][CONN][INF] sending preamble 'd38e994c-223f-4794-943c-ea8669e8f112'
[1676317317.25][SERI][TXD] {{__sync;d38e994c-223f-4794-943c-ea8669e8f112}}
[1676317317.26][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed
[1676317317.26][CONN][INF] found SYNC in stream: {{__sync;d38e994c-223f-4794-943c-ea8669e8f112}} it is #0 sent, queued...
[1676317317.26][HTST][INF] sync KV found, uuid=d38e994c-223f-4794-943c-ea8669e8f112, timestamp=1676317317.260016
[1676317317.28][CONN][RXD] >>> Running 13 test cases...
[1676317317.28][CONN][INF] found KV pair in stream: {{__version;1.3.0}}, queued...
[1676317317.28][CONN][INF] found KV pair in stream: {{__timeout;180}}, queued...
[1676317317.28][CONN][INF] found KV pair in stream: {{__host_test_name;pyusb_basic}}, queued...
[1676317317.28][CONN][INF] found KV pair in stream: {{__testcase_count;13}}, queued...
[1676317317.28][CONN][INF] found KV pair in stream: {{__testcase_name;usb control basic test}}, queued...
[1676317317.28][HTST][INF] DUT greentea-client version: 1.3.0
[1676317317.28][HTST][INF] setting timeout to: 180 sec
[1676317317.28][HTST][INF] host test class: '<class 'pyusb_basic.PyusbBasicTest'>'
[1676317317.28][HTST][INF] host test setup() call...
[1676317317.28][HTST][INF] CALLBACKs updated
[1676317317.28][HTST][INF] host test detected: pyusb_basic
[1676317317.29][CONN][INF] found KV pair in stream: {{__testcase_name;usb control stall test}}, queued...
[1676317317.29][CONN][INF] found KV pair in stream: {{__testcase_name;usb control sizes test}}, queued...
[1676317317.29][CONN][INF] found KV pair in stream: {{__testcase_name;usb control stress test}}, queued...
[1676317317.29][CONN][INF] found KV pair in stream: {{__testcase_name;usb device reset test}}, queued...
[1676317317.31][CONN][INF] found KV pair in stream: {{__testcase_name;usb soft reconnection test}}, queued...
[1676317317.31][CONN][INF] found KV pair in stream: {{__testcase_name;usb repeated construction destruction test}}, queued...
[1676317317.31][CONN][INF] found KV pair in stream: {{__testcase_name;endpoint test data correctness}}, queued...
[1676317317.31][CONN][INF] found KV pair in stream: {{__testcase_name;endpoint test halt}}, queued...
[1676317317.32][CONN][INF] found KV pair in stream: {{__testcase_name;endpoint test parallel transfers}}, queued...
[1676317317.32][CONN][INF] found KV pair in stream: {{__testcase_name;endpoint test parallel transfers ctrl}}, queued...
[1676317317.32][CONN][INF] found KV pair in stream: {{__testcase_name;endpoint test abort}}, queued...
[1676317317.34][CONN][RXD]
[1676317317.34][CONN][RXD] >>> Running case #1: 'usb control basic test'...
[1676317317.34][CONN][INF] found KV pair in stream: {{__testcase_name;endpoint test data toggle reset}}, queued...
[1676317317.34][CONN][INF] found KV pair in stream: {{__testcase_start;usb control basic test}}, queued...
[1676317317.71][CONN][INF] found KV pair in stream: {{control_basic_test;0123456789 3368 517}}, queued...
[1676317317.79][SERI][TXD] {{pass;0}}
[1676317317.81][CONN][INF] found KV pair in stream: {{__testcase_finish;usb control basic test;1;0}}, queued...
[1676317317.82][CONN][RXD] >>> 'usb control basic test': 1 passed, 0 failed
[1676317317.82][CONN][RXD] <greentea test suite>:0::PASS
[1676317317.82][CONN][RXD]
[1676317317.82][CONN][RXD] >>> Running case #2: 'usb control stall test'...
[1676317317.82][CONN][INF] found KV pair in stream: {{__testcase_start;usb control stall test}}, queued...
[1676317318.25][CONN][INF] found KV pair in stream: {{control_stall_test;0123456789}}, queued...
[1676317318.27][SERI][TXD] {{pass;0}}
[1676317318.29][CONN][INF] found KV pair in stream: {{__testcase_finish;usb control stall test;1;0}}, queued...
[1676317318.30][CONN][RXD] >>> 'usb control stall test': 1 passed, 0 failed
[1676317318.30][CONN][RXD] <greentea test suite>:0::PASS
[1676317318.30][CONN][RXD]
[1676317318.30][CONN][RXD] >>> Running case #3: 'usb control sizes test'...
[1676317318.30][CONN][INF] found KV pair in stream: {{__testcase_start;usb control sizes test}}, queued...
[1676317318.72][CONN][INF] found KV pair in stream: {{control_sizes_test;0123456789}}, queued...
[1676317318.76][SERI][TXD] {{pass;0}}
[1676317318.79][CONN][RXD] >>> 'usb control sizes test': 1 passed, 0 failed
[1676317318.79][CONN][RXD] <greentea test suite>:0::PASS
[1676317318.79][CONN][RXD]
[1676317318.79][CONN][RXD] >>> Running case #4: 'usb control stress test'...
[1676317318.79][CONN][INF] found KV pair in stream: {{__testcase_finish;usb control sizes test;1;0}}, queued...
[1676317318.80][CONN][INF] found KV pair in stream: {{__testcase_start;usb control stress test}}, queued...
[1676317319.15][CONN][INF] found KV pair in stream: {{control_stress_test;0123456789}}, queued...
[1676317319.22][SERI][TXD] {{pass;0}}
[1676317319.24][CONN][INF] found KV pair in stream: {{__testcase_finish;usb control stress test;1;0}}, queued...
[1676317319.25][CONN][RXD] >>> 'usb control stress test': 1 passed, 0 failed
[1676317319.25][CONN][RXD] <greentea test suite>:0::PASS
[1676317319.25][CONN][RXD]
[1676317319.25][CONN][RXD] >>> Running case #5: 'usb device reset test'...
[1676317319.25][CONN][INF] found KV pair in stream: {{__testcase_start;usb device reset test}}, queued...
[1676317319.27][CONN][INF] found KV pair in stream: {{reset_support;0}}, queued...
<<< get_set_configuration_test >>>
device deconfigured - OK
configuration 1 set - OK
configuration 2 set - OK
<<< get_set_interface_test >>>
cfg(1) inteface 0.0 set - OK
cfg(1) inteface 0.1 set - OK
cfg(1) inteface 1.0 set - OK
cfg(1) inteface 1.1 set - OK
cfg(2) inteface 0.0 set - OK
cfg(2) inteface 0.1 set - OK
cfg(2) inteface 1.0 set - OK
cfg(2) inteface 1.1 set - OK
<<< get_status_test >>>
cfg(1) interface 0.0 status - OK
cfg(1) intf(0.0) endpoint 129 status - OK
cfg(1) intf(0.0) endpoint 1 status - OK
cfg(1) interface 0.1 status - OK
cfg(1) intf(0.1) endpoint 129 status - OK
cfg(1) intf(0.1) endpoint 1 status - OK
cfg(1) interface 1.0 status - OK
cfg(1) intf(1.0) endpoint 130 status - OK
cfg(1) intf(1.0) endpoint 2 status - OK
cfg(1) interface 1.1 status - OK
cfg(1) intf(1.1) endpoint 130 status - OK
cfg(1) intf(1.1) endpoint 2 status - OK
cfg(2) interface 0.0 status - OK
cfg(2) intf(0.0) endpoint 130 status - OK
cfg(2) intf(0.0) endpoint 2 status - OK
cfg(2) interface 0.1 status - OK
cfg(2) intf(0.1) endpoint 130 status - OK
cfg(2) intf(0.1) endpoint 2 status - OK
cfg(2) interface 1.0 status - OK
cfg(2) intf(1.0) endpoint 129 status - OK
cfg(2) intf(1.0) endpoint 1 status - OK
cfg(2) interface 1.1 status - OK
cfg(2) intf(1.1) endpoint 129 status - OK
cfg(2) intf(1.1) endpoint 1 status - OK
<<< set_clear_feature_test >>>
cfg(1) intf(0.0) ep 129 halted - OK
cfg(1) intf(0.0) ep 129 unhalted - OK
cfg(1) intf(0.0) ep 1 halted - OK
cfg(1) intf(0.0) ep 1 unhalted - OK
cfg(1) intf(0.1) ep 129 halted - OK
cfg(1) intf(0.1) ep 129 unhalted - OK
cfg(1) intf(0.1) ep 1 halted - OK
cfg(1) intf(0.1) ep 1 unhalted - OK
cfg(1) intf(1.0) ep 130 halted - OK
cfg(1) intf(1.0) ep 130 unhalted - OK
cfg(1) intf(1.0) ep 2 halted - OK
cfg(1) intf(1.0) ep 2 unhalted - OK
cfg(1) intf(1.1) ep 130 halted - OK
cfg(1) intf(1.1) ep 130 unhalted - OK
cfg(1) intf(1.1) ep 2 halted - OK
cfg(1) intf(1.1) ep 2 unhalted - OK
cfg(2) intf(0.0) ep 130 halted - OK
cfg(2) intf(0.0) ep 130 unhalted - OK
cfg(2) intf(0.0) ep 2 halted - OK
cfg(2) intf(0.0) ep 2 unhalted - OK
cfg(2) intf(0.1) ep 130 halted - OK
cfg(2) intf(0.1) ep 130 unhalted - OK
cfg(2) intf(0.1) ep 2 halted - OK
cfg(2) intf(0.1) ep 2 unhalted - OK
cfg(2) intf(1.0) ep 129 halted - OK
cfg(2) intf(1.0) ep 129 unhalted - OK
cfg(2) intf(1.0) ep 1 halted - OK
cfg(2) intf(1.0) ep 1 unhalted - OK
cfg(2) intf(1.1) ep 129 halted - OK
cfg(2) intf(1.1) ep 129 unhalted - OK
cfg(2) intf(1.1) ep 1 halted - OK
cfg(2) intf(1.1) ep 1 unhalted - OK
<<< get_descriptor_test >>>
interface descriptor is not directly accessible - OK
endpoint descriptor is not directly accessible - OK
<<< set_descriptor_test >>>
SET_DESCRIPTOR is unsupported - OK
<<< control_stall_test >>>
Invalid request stalled - OK
Invalid request stalled - OK
Invalid request stalled - OK
Invalid request stalled - OK
Requesting string 6 failed - OK
Requesting string 7 failed - OK
[1676317319.27][HTST][INF] Reset supported: true
[1676317319.29][SERI][TXD] {{placeholder;true}}
[1676317319.69][CONN][INF] found KV pair in stream: {{device_reset_test;0123456789}}, queued...
[1676317319.90][SERI][TXD] {{pass;0}}
[1676317319.91][CONN][INF] found KV pair in stream: {{device_reset_test;0123456789}}, queued...
[1676317320.33][SERI][TXD] {{pass;0}}
[1676317320.35][CONN][INF] found KV pair in stream: {{device_reset_test;0123456789}}, queued...
[1676317320.88][SERI][TXD] {{pass;0}}
[1676317320.89][CONN][INF] found KV pair in stream: {{device_reset_test;0123456789}}, queued...
[1676317321.24][SERI][TXD] {{pass;0}}
[1676317321.25][CONN][INF] found KV pair in stream: {{__testcase_finish;usb device reset test;1;0}}, queued...
[1676317321.27][CONN][RXD] >>> 'usb device reset test': 1 passed, 0 failed
[1676317321.27][CONN][RXD] <greentea test suite>:0::PASS
[1676317321.27][CONN][RXD]
[1676317321.27][CONN][RXD] >>> Running case #6: 'usb soft reconnection test'...
[1676317321.28][CONN][INF] found KV pair in stream: {{__testcase_start;usb soft reconnection test}}, queued...
[1676317321.67][CONN][INF] found KV pair in stream: {{device_soft_reconnection_test;0123456789}}, queued...
[1676317321.69][SERI][TXD] {{pass;0}}
[1676317321.72][CONN][INF] found KV pair in stream: {{device_soft_reconnection_test;0123456789}}, queued...
[1676317322.06][SERI][TXD] {{pass;0}}
[1676317322.09][CONN][INF] found KV pair in stream: {{device_soft_reconnection_test;0123456789}}, queued...
[1676317322.43][SERI][TXD] {{pass;0}}
[1676317322.46][CONN][INF] found KV pair in stream: {{device_soft_reconnection_test;0123456789}}, queued...
[1676317322.81][SERI][TXD] {{pass;0}}
[1676317322.89][CONN][INF] found KV pair in stream: {{device_soft_reconnection_test;0123456789}}, queued...
[1676317323.23][SERI][TXD] {{pass;0}}
[1676317323.25][CONN][INF] found KV pair in stream: {{__testcase_finish;usb soft reconnection test;1;0}}, queued...
[1676317323.26][CONN][RXD] >>> 'usb soft reconnection test': 1 passed, 0 failed
[1676317323.26][CONN][RXD] <greentea test suite>:0::PASS
[1676317323.26][CONN][RXD]
[1676317323.26][CONN][RXD] >>> Running case #7: 'usb repeated construction destruction test'...
[1676317323.28][CONN][INF] found KV pair in stream: {{__testcase_start;usb repeated construction destruction test}}, queued...
[1676317324.82][CONN][INF] found KV pair in stream: {{repeated_construction_destruction_test;0123456789}}, queued...
[1676317324.84][SERI][TXD] {{pass;0}}
[1676317325.25][CONN][INF] found KV pair in stream: {{repeated_construction_destruction_test;0123456789}}, queued...
[1676317325.26][SERI][TXD] {{pass;0}}
[1676317325.68][CONN][INF] found KV pair in stream: {{repeated_construction_destruction_test;0123456789}}, queued...
[1676317325.69][SERI][TXD] {{pass;0}}
[1676317325.73][CONN][RXD] >>> 'usb repeated construction destruction test': 1 passed, 0 failed
[1676317325.73][CONN][RXD] <greentea test suite>:0::PASS
[1676317325.73][CONN][RXD]
[1676317325.73][CONN][RXD] >>> Running case #8: 'endpoint test data correctness'...
[1676317325.73][CONN][INF] found KV pair in stream: {{__testcase_finish;usb repeated construction destruction test;1;0}}, queued...
[1676317325.74][CONN][INF] found KV pair in stream: {{__testcase_start;endpoint test data correctness}}, queued...
[1676317326.10][CONN][INF] found KV pair in stream: {{ep_test_data_correctness;0123456789}}, queued...
[1676317326.37][SERI][TXD] {{pass;0}}
[1676317326.40][CONN][RXD] >>> 'endpoint test data correctness': 1 passed, 0 failed
[1676317326.40][CONN][RXD] <greentea test suite>:0::PASS
[1676317326.40][CONN][RXD]
[1676317326.40][CONN][RXD] >>> Running case #9: 'endpoint test halt'...
[1676317326.40][CONN][INF] found KV pair in stream: {{__testcase_finish;endpoint test data correctness;1;0}}, queued...
[1676317326.40][CONN][INF] found KV pair in stream: {{__testcase_start;endpoint test halt}}, queued...
[1676317326.81][CONN][INF] found KV pair in stream: {{ep_test_halt;0123456789}}, queued...
interface 0, alt 0 -- skipping the default AlternateSetting
interface 0, alt 1 -- running tests
interface 0, alt 2 -- running tests
interface 0, alt 3 -- running tests
interface 0, alt 4 -- running tests
interface 0, alt 0 -- skipping the default AlternateSetting
interface 0, alt 1 -- running tests
[1676317327.16][HTST][INF] TEST FAILED: [C:\Users\USER\MbedCE\MbedCE_Testerino\mbed-os\drivers\usb\tests\TESTS\host_tests\pyusb_basic.py]:1014, Unexpected error (USBError(None, b'libusb0-dll:err [_usb_reap_async] reaping request failed, win error: Za\xf8\xedzen\xed p\xf8ipojen\xe9 k syst\xe9mu nefunguje.\r\n\n')).
[1676317327.17][SERI][TXD] {{fail;0}}
[1676317327.19][CONN][RXD] <greentea test suite>:275::FAIL: Expected 'pass' Was 'fail'
[1676317327.19][CONN][INF] found KV pair in stream: {{__testcase_finish;endpoint test halt;0;1}}, queued...
[1676317327.20][CONN][RXD] >>> 'endpoint test halt': 0 passed, 1 failed with reason 'Assertion Failed'
[1676317327.20][CONN][RXD]
[1676317327.20][CONN][RXD]
[1676317327.20][CONN][RXD] >>> Test cases: 8 passed, 1 failed with reason 'Assertion Failed'
[1676317327.20][CONN][RXD] >>> TESTS FAILED!
[1676317327.20][CONN][RXD]
[1676317327.20][CONN][RXD] -----------------------
[1676317327.20][CONN][RXD] 0 Tests 1 Failures 0 Ignored
[1676317327.20][CONN][RXD] FAIL
[1676317327.22][CONN][INF] found KV pair in stream: {{__testcase_summary;8;1}}, queued...
[1676317327.22][CONN][INF] found KV pair in stream: {{end;failure}}, queued...
[1676317327.22][CONN][INF] found KV pair in stream: {{__exit;0}}, queued...
[1676317327.22][HTST][INF] __exit(0)
[1676317327.22][HTST][INF] __notify_complete(False)
[1676317327.22][HTST][INF] __exit_event_queue received
[1676317327.22][HTST][INF] test suite run finished after 9.94 sec...
[1676317327.23][CONN][INF] received special event '__host_test_finished' value='True', finishing
[1676317327.35][HTST][INF] CONN exited with code: 0
[1676317327.35][HTST][INF] Some events in queue
[1676317327.35][HTST][INF] stopped consuming events
[1676317327.35][HTST][INF] host test result() call skipped, received: False
[1676317327.35][HTST][INF] calling blocking teardown()
[1676317327.35][HTST][INF] teardown() finished
[1676317327.36][HTST][INF] {{result;failure}}
CMake Error at mbed-run-greentea-mbed-usb-device-basic.cmake:20 (execute_process):
execute_process failed command indexes:
1: "Child return code: 1"
BR, Jan
This causes the usb device basic test to fail in CI. See old (unfixed) Mbed issue here: https://github.com/ARMmbed/mbed-os/issues/13215