Skip to content

Fixed the storage vendor strings test reading a stale host instance - #302

Merged
fdesbiens merged 1 commit into
eclipse-threadx:devfrom
fdesbiens:fix/storage-vendor-strings-test-removal-wait
Nov 9, 2026
Merged

fdesbiens merged 1 commit into
eclipse-threadx:devfrom
fdesbiens:fix/storage-vendor-strings-test-removal-wait

Conversation

@fdesbiens

Copy link
Copy Markdown
Contributor

After disconnecting, usbx_ux_device_class_storage_vendor_strings_test re-created the device and reconnected without waiting for the host to remove the old storage instance, so its readiness check could find that instance and the INQUIRY read the old strings. Its INQUIRY helper also built the command in the instance's shared CBW and sent it without the storage lock, while the class thread sends its media checks through the same CBW.

The test now waits for the removal, as the CDC-ACM tests do, and its INQUIRY helper holds the storage lock while it builds and sends the command. With the wait alone, the INQUIRY reached the new instance and collided with a media check, which then ran a data phase without a buffer and crashed the host simulator.

On Win64 against ThreadX dev, the test failed 10 of 10 runs before the change, with mismatched strings. With the removal wait alone it failed 10 of 10 with a segfault in _ux_hcd_sim_host_transaction_schedule. With both parts it passes 10 of 10, and 10 of 10 with the tick settings of #301. Not run on Linux.

After disconnecting, usbx_ux_device_class_storage_vendor_strings_test re-created
the device and reconnected without waiting for the host to remove the old storage
instance, so its readiness check could find that instance and the INQUIRY read the
old strings. Its INQUIRY helper also built the command in the instance's shared CBW
and sent it without the storage lock, while the class thread sends its media checks
through the same CBW.

The test now waits for the removal, as the CDC-ACM tests do, and its INQUIRY helper
holds the storage lock while it builds and sends the command. With the wait alone,
the INQUIRY reached the new instance and collided with a media check, which then
ran a data phase without a buffer and crashed the host simulator.

On Win64 against ThreadX dev, the test failed 10 of 10 runs before the change, with
mismatched strings. With the removal wait alone it failed 10 of 10 with a segfault
in _ux_hcd_sim_host_transaction_schedule. With both parts it passes 10 of 10, and
10 of 10 with the tick settings of eclipse-threadx#301. Not run on Linux.

Assisted-by: Claude Code (Opus 5.5) <noreply@anthropic.com>
@fdesbiens
fdesbiens merged commit c15fc40 into eclipse-threadx:dev Nov 9, 2026
5 checks passed
@fdesbiens
fdesbiens deleted the fix/storage-vendor-strings-test-removal-wait branch November 9, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant