Skip to content

type-c-service: Port service/debug accessory test from stable to main - #944

Merged
tullom merged 1 commit into
OpenDevicePartnership:mainfrom
tullom:type-c/service-integration-test-port-to-main
Aug 14, 2026
Merged

type-c-service: Port service/debug accessory test from stable to main#944
tullom merged 1 commit into
OpenDevicePartnership:mainfrom
tullom:type-c/service-integration-test-port-to-main

Conversation

@tullom

@tullom tullom commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

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 the DebugAccessory broadcast, the power policy ProviderConnected/ProviderDisconnected that the source contract also produces, and the psu_state transitions.
  • test_non_debug_attach: a plain Attached connection broadcasts nothing.
  • test_debug_accessory_no_renotify: an unchanged connection state broadcasts nothing.

Resolves #922

Assisted-by: GitHub Copilot:claude-opus-5

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 tullom self-assigned this Aug 14, 2026
@tullom
tullom requested a review from a team as a code owner August 14, 2026 20:06
@tullom tullom added the enhancement New feature or request label Aug 14, 2026
@tullom
tullom requested review from asasine and gjpmsft and a lite review from Copilot August 14, 2026 20:06
@tullom tullom changed the title type-c-service: Port service/debug accessory test type-c-service: Port service/debug accessory test from stable to main Aug 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DebugAccessory broadcast, power policy provider connect/disconnect events, and PSU state transitions.
  • Added an integration test ensuring a non-debug Attached connection 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.

@tullom
tullom merged commit a54093c into OpenDevicePartnership:main Aug 14, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port service integration test to main from v1 branch

4 participants