test(rdpeusb): add client/server I/O sequence coverage#1406
Open
uchouT (uchouT) wants to merge 2 commits into
Open
test(rdpeusb): add client/server I/O sequence coverage#1406uchouT (uchouT) wants to merge 2 commits into
uchouT (uchouT) wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
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_textto returnDeviceText(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>; |
465eced to
7ca9723
Compare
Signed-off-by: uchouT <i@uchout.moe>
7ca9723 to
6b48ce4
Compare
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.
Closes #1138
query_device_textsynchronous so every valid query produces aQUERY_DEVICE_TEXT_RSP, as required by MS-RDPEUSB