Skip to content

fix(usb_host_test): Fix target tests build for esp32s31#482

Merged
tore-espressif merged 2 commits into
masterfrom
fix/usb_host_enum_test_build_esp32s31
Apr 22, 2026
Merged

fix(usb_host_test): Fix target tests build for esp32s31#482
tore-espressif merged 2 commits into
masterfrom
fix/usb_host_enum_test_build_esp32s31

Conversation

@peter-marcisovsky
Copy link
Copy Markdown
Collaborator

@peter-marcisovsky peter-marcisovsky commented Apr 22, 2026

Description

USB Host target test: enum

Fixing build of usb host enum test for esp32s31. Failing in CI with following log:

CI error log
/__w/esp-usb/esp-usb/host/usb/test/target_test/enum/main/mock_dev.c: In function 'mock_dev_insert':
/__w/esp-usb/esp-usb/host/usb/test/target_test/enum/main/mock_dev.c:50:69: error: 'USB_SRP_BVALID_IN_IDX' undeclared (first use in this function)
   50 |         esp_rom_gpio_connect_in_signal(GPIO_MATRIX_CONST_ONE_INPUT, USB_SRP_BVALID_IN_IDX, false);
      |                                                                     ^~~~~~~~~~~~~~~~~~~~~
/__w/esp-usb/esp-usb/host/usb/test/target_test/enum/main/mock_dev.c:50:69: note: each undeclared identifier is reported only once for each function it appears in
/__w/esp-usb/esp-usb/host/usb/test/target_test/enum/main/mock_dev.c: In function 'mock_dev_remove':
/__w/esp-usb/esp-usb/host/usb/test/target_test/enum/main/mock_dev.c:59:70: error: 'USB_SRP_BVALID_IN_IDX' undeclared (first use in this function)
   59 |         esp_rom_gpio_connect_in_signal(GPIO_MATRIX_CONST_ZERO_INPUT, USB_SRP_BVALID_IN_IDX, false);
      |                                                                      ^~~~~~~~~~~~~~~~~~~~~
[662/674] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/test_addr.c.obj

USB Host target test: HCD

Fixing build of usb host HCD test for esp32s31. Failing in CI with following log:

CI error log
/esp/esp-usb/host/usb/test/target_test/common/hcd_common.c
/home/peter/esp/esp-usb/host/usb/test/target_test/common/hcd_common.c:12:10: fatal error: soc/usb_wrap_struct.h: No such file or directory
   12 | #include "soc/usb_wrap_struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Related


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

Note

Low Risk
Low risk: changes are limited to CI test enablement rules and a test-only include cleanup, with no impact on production USB stack behavior.

Overview
Resolves esp32s31 target-test build failures by disabling the USB host enumeration target test on esp32s31 via .build-test-rules.yml (it relies on FSLS PHY attach/detach emulation signals not present on that target).

Also fixes the USB host HCD target test build by removing the soc/usb_wrap_struct.h include from host/usb/test/target_test/common/hcd_common.c, avoiding a missing-header error on esp32s31.

Reviewed by Cursor Bugbot for commit fe0d9d3. Bugbot is set up for automated code reviews on this repo. Configure here.

@peter-marcisovsky peter-marcisovsky self-assigned this Apr 22, 2026
@peter-marcisovsky peter-marcisovsky added Component: usb_host Issue affects usb_host component BUILD_AND_TEST_ALL_APPS Build and test all apps even if no related code has changed. labels Apr 22, 2026
@peter-marcisovsky peter-marcisovsky force-pushed the fix/usb_host_enum_test_build_esp32s31 branch from 190e74b to 6c3cc39 Compare April 22, 2026 12:53
@peter-marcisovsky peter-marcisovsky changed the title fix(usb_host_test): Fix enum test build for esp32s31 fix(usb_host_test): Fix target tests build for esp32s31 Apr 22, 2026
@peter-marcisovsky peter-marcisovsky marked this pull request as ready for review April 22, 2026 13:33
@tore-espressif tore-espressif merged commit cceb50c into master Apr 22, 2026
61 checks passed
@tore-espressif tore-espressif deleted the fix/usb_host_enum_test_build_esp32s31 branch April 22, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BUILD_AND_TEST_ALL_APPS Build and test all apps even if no related code has changed. Component: usb_host Issue affects usb_host component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants