type-c-service: Port service/debug accessory test from stable to main - #944
Merged
tullom merged 1 commit intoAug 14, 2026
Conversation
Port the type-C service.rs integration test from stable-v0.1.y to main Added two extra negative cases covering the guard in process_port_status_event: a plain Attached connection must not report a debug accessory, and an unchanged connection state must not report one twice. Assisted-by: GitHub Copilot:claude-opus-5
tullom
requested review from
asasine and
gjpmsft
and
a lite review from Copilot
August 14, 2026 20:06
tullom
requested review from
RobertZ2011,
felipebalbi,
jerrysxie,
kurtjd and
williampMSFT
August 14, 2026 20:07
Contributor
There was a problem hiding this comment.
Pull request overview
Ports the Type-C service debug accessory integration test suite from stable-v0.1.y to main, exercising the controller-interrupt-driven path (EventReceiver::wait_event()) to validate end-to-end service broadcasts and power policy interactions.
Changes:
- Added an integration test that asserts debug accessory connect/disconnect produces the expected Type-C service
DebugAccessorybroadcast, power policy provider connect/disconnect events, and PSU state transitions. - Added an integration test ensuring a non-debug
Attachedconnection produces no Type-C or power policy service broadcasts. - Added an integration test ensuring debug accessory state is not re-broadcast when the connection state is unchanged.
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
RobertZ2011
approved these changes
Aug 14, 2026
kurtjd
approved these changes
Aug 14, 2026
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.
Port the type-C service.rs integration test from stable-v0.1.y to main
All three drive the port from a controller interrupt with
EventReceiver::wait_event().Three tests in total are added:
test_debug_accessory_source: the port: connect/disconnect asserts theDebugAccessorybroadcast, the power policyProviderConnected/ProviderDisconnectedthat the source contract also produces, and thepsu_statetransitions.test_non_debug_attach: a plainAttachedconnection broadcasts nothing.test_debug_accessory_no_renotify: an unchanged connection state broadcasts nothing.Resolves #922
Assisted-by: GitHub Copilot:claude-opus-5