Skip to content

test(rdpeusb): add client/server I/O sequence coverage#1406

Open
uchouT (uchouT) wants to merge 2 commits into
Devolutions:masterfrom
uchouT:test/urbdrc
Open

test(rdpeusb): add client/server I/O sequence coverage#1406
uchouT (uchouT) wants to merge 2 commits into
Devolutions:masterfrom
uchouT:test/urbdrc

Conversation

@uchouT

Copy link
Copy Markdown
Contributor

Closes #1138

  • add API-boundary tests for server capability exchange and new-device setup
  • add connected client/server tests for device text, IOCTL, internal IOCTL, cancellation, and transfer IN/OUT flows
  • cover transfer completions with and without data, including no-ack isochronous OUT transfers
  • make query_device_text synchronous so every valid query produces a QUERY_DEVICE_TEXT_RSP, as required by MS-RDPEUSB

Copilot AI review requested due to automatic review settings July 3, 2026 15:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR expands RDPEUSB test coverage to validate client/server setup and end-to-end I/O flows, and aligns the client backend API with MS-RDPEUSB by making query_device_text always produce a QUERY_DEVICE_TEXT_RSP.

Changes:

  • Added server-side sequence tests for capability exchange and new-device setup.
  • Added connected client/server round-trip tests for device text, IOCTL/internal IOCTL, cancellation, and transfer IN/OUT (including no-ack OUT).
  • Updated UrbdrcDeviceBackend::query_device_text to return DeviceText (non-optional), so valid queries always generate a response.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/ironrdp-testsuite-core/tests/rdpeusb/server.rs New server sequence tests for capability exchange and device setup.
crates/ironrdp-testsuite-core/tests/rdpeusb/mod.rs Shared rdpeusb test helpers + module wiring for new test modules.
crates/ironrdp-testsuite-core/tests/rdpeusb/io/mod.rs Connected client/server harness and backend event plumbing for I/O tests.
crates/ironrdp-testsuite-core/tests/rdpeusb/io/requests.rs New tests for query-device-text, IOCTL/internal IOCTL, and cancel behavior.
crates/ironrdp-testsuite-core/tests/rdpeusb/io/transfers.rs New tests for transfer IN/OUT completions and no-ack OUT behavior.
crates/ironrdp-testsuite-core/tests/rdpeusb/client.rs Updated test backend to match the new synchronous device-text query API.
crates/ironrdp-rdpeusb/src/client.rs Public API change: query_device_text now returns DeviceText and client always emits QUERY_DEVICE_TEXT_RSP.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 214 to +218
/// of the request to the server via QUERY_DEVICE_TEXT_RSP message and the RequestId field in
/// the message MUST match the RequestId in the QUERY_DEVICE_TEXT message.
///
/// [3.3.5.3.5]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpeusb/834f56cc-cfed-4649-8952-0b6486638c28
fn query_device_text(&mut self, channel_id: u32, text_type: u32, locale_id: u32) -> PduResult<Option<DeviceText>>;
fn query_device_text(&mut self, channel_id: u32, text_type: u32, locale_id: u32) -> PduResult<DeviceText>;
Signed-off-by: uchouT <i@uchout.moe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[ironrdp-rdpeusb] Server-side protocol state machine and extensibility traits

2 participants