Repository navigation
Fixed the storage vendor strings test reading a stale host instance - #302
Merged
fdesbiens merged 1 commit intoNov 9, 2026
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.