Skip to content

test: consolidate mstsgu test binary - #1743

Open
Benoît Cortier (CBenoit) wants to merge 14 commits into
masterfrom
cbenoit-consolidate-mstsgu-tests
Open

test: consolidate mstsgu test binary#1743
Benoît Cortier (CBenoit) wants to merge 14 commits into
masterfrom
cbenoit-consolidate-mstsgu-tests

Conversation

@CBenoit

@CBenoit Benoît Cortier (CBenoit) commented Aug 21, 2026

Copy link
Copy Markdown
Member

Run the centralized Mstsgu suite with Rustls and retain shared protocol and transport coverage without test-suite feature flags.

Copilot AI balanced review requested due to automatic review settings August 21, 2026 08:33

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

Consolidates MSTSGU integration tests into one binary to reduce relinking while retaining native-TLS coverage.

Changes:

  • Registers a unified integration-test harness.
  • Moves native-TLS gating to the http_auth module.
  • Updates xtask commands for the new target.

No material findings identified; protocol review was unnecessary because protocol behavior is unchanged.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
xtask/src/check.rs Targets the consolidated test binary.
crates/ironrdp-mstsgu/Cargo.toml Disables test autodiscovery and registers one harness.
crates/ironrdp-mstsgu/tests/main.rs Declares the test modules and feature gate.
crates/ironrdp-mstsgu/tests/http_auth.rs Removes the now-centralized lint allowance.
crates/ironrdp-mstsgu/tests/http_control.rs Removes the now-centralized lint allowance.
crates/ironrdp-mstsgu/tests/rpc_pdu.rs Removes the now-centralized lint allowance.
crates/ironrdp-mstsgu/tests/udp.rs Removes the now-centralized lint allowance.

@github-actions github-actions Bot added maintainer-required Maintainer review or intervention is required risk/low Self-contained change with no cross-crate behavioral effect scope/tooling Build, CI, release, or developer tooling size/M Size: up to 449 counted lines and 10 files; exceeds S in either measure labels Aug 21, 2026
@CBenoit Benoît Cortier (CBenoit) changed the title test: consolidate mstsgu test binary test(extra): centralize mstsgu integration tests Aug 21, 2026
@CBenoit
Benoît Cortier (CBenoit) force-pushed the cbenoit-consolidate-mstsgu-tests branch from ecbf2a1 to 07910d5 Compare August 21, 2026 10:49
@CBenoit
Benoît Cortier (CBenoit) force-pushed the cbenoit-consolidate-mstsgu-tests branch from 07910d5 to 6b9742a Compare August 21, 2026 20:16
@CBenoit
Benoît Cortier (CBenoit) force-pushed the cbenoit-consolidate-mstsgu-tests branch from 6b9742a to bdf4a10 Compare August 21, 2026 20:25
@CBenoit
Benoît Cortier (CBenoit) force-pushed the cbenoit-consolidate-mstsgu-tests branch from bdf4a10 to f9f7a02 Compare August 22, 2026 07:23
@github-actions github-actions Bot added risk/unknown Risk could not be determined automatically; needs maintainer-level scrutiny and removed risk/low Self-contained change with no cross-crate behavioral effect labels Aug 22, 2026
@CBenoit
Benoît Cortier (CBenoit) force-pushed the cbenoit-consolidate-mstsgu-tests branch from c8c0389 to 569972a Compare August 23, 2026 07:25
@CBenoit
Benoît Cortier (CBenoit) force-pushed the cbenoit-consolidate-mstsgu-tests branch from 569972a to 080a5a7 Compare August 26, 2026 15:09
@CBenoit
Benoît Cortier (CBenoit) force-pushed the cbenoit-consolidate-mstsgu-tests branch from 080a5a7 to d57abdc Compare August 28, 2026 15:03
@github-actions github-actions Bot added the size/L Size: up to 899 counted lines and 20 files; exceeds M in either measure label Aug 28, 2026
Use one test harness to preserve feature-gated coverage while avoiding repeated relinking.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move Mstsgu coverage to the shared extra test harness.

Keep native-TLS coverage in the same centralized binary.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Nest the Mstsgu integration modules beneath the extra test harness.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Retain upstream Mstsgu coverage in the centralized harness after rebasing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep native TLS smart-card coverage in the extra test harness.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move the Mstsgu integration coverage to the extra suite's sole test binary.

This leaves ironrdp-mstsgu with no Cargo test targets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The crate has no test targets, so this import no longer has a supporting dependency.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep Mstsgu integration coverage in the extra-suite harness so the package exposes no Cargo test target.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the updated RPCH v2 coverage in the extra-suite harness.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep RPC stub coverage in the extra-suite harness with its test-only dependency.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Load shared Mstsgu private sources once in the extra integration harness so the RPCH session coverage remains available without duplicate test modules.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@CBenoit
Benoît Cortier (CBenoit) force-pushed the cbenoit-consolidate-mstsgu-tests branch from 177eff0 to 204bfa3 Compare August 31, 2026 16:15
@github-actions github-actions Bot added size/XL Size: up to 1299 counted lines and 49 files; exceeds L in either measure and removed size/L Size: up to 899 counted lines and 20 files; exceeds M in either measure labels Aug 31, 2026
Expose opaque protocol packet constructors and accessors through the existing test-support feature so centralized tests do not compile production sources a second time.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document that the centralized harness still imports private HTTP and RPC sources for RPCH session coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run the centralized Mstsgu suite with Rustls and retain shared protocol and transport coverage without test-suite feature flags.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@CBenoit Benoît Cortier (CBenoit) changed the title test(extra): centralize mstsgu integration tests test: consolidate mstsgu test binary Sep 1, 2026
@github-actions github-actions Bot added kind/protocol Affects RDP or related protocol behavior risk/medium Behavioral change that does not substantially alter a core public API ai-reviewed/1 One automated review completed and removed risk/unknown Risk could not be determined automatically; needs maintainer-level scrutiny maintainer-required Maintainer review or intervention is required labels Sep 1, 2026

@github-actions github-actions Bot 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.

Pure test/build reorganization: mstsgu integration tests move into ironrdp-testsuite-extra, four private proto structs get test-support-gated pub visibility (mirroring the existing test_support pattern), and check.rs drops now-unneeded per-binary invocations. No Encode/Decode/wire-format logic changed. However, the reorg silently drops CI coverage for the smartcard feature's authentication-error tests (no longer exercised anywhere), and leaves one renamed test module (rpc_tsgu_stubs.rs) as an empty no-op stub.

Protocol analysis: accepted — Independently reviewed the diff: HandshakeRespPkt, TunnelReqPkt, ExtendedAuthPkt, and TunnelAuthRespPkt only gain pub visibility gated by #[cfg_attr(not(feature="test-support"), expect(unreachable_pub))], matching the pre-existing test_support.rs pattern used for other packet/config types in this crate. Field layouts, Encode/Decode bodies, and constants are untouched. The handoff's 'none' protocol relevance is correct; I found an additional test-coverage regression, but it is unrelated to wire compatibility.

# process default, which fails every TLS test in this binary.
tokio-rustls = { version = "0.26", default-features = false }
uuid = { version = "1", features = ["v4"] }
ironrdp-mstsgu = { path = "../ironrdp-mstsgu", features = ["rustls", "test-support"] }

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.

blocking / high: Before this PR, xtask/src/check.rs ran `cargo test -p ironrdp-mstsgu --test http_auth --features native-tls,smartcard --locked` (compile and run) as a dedicated CI step, which is the only place in the repo that ever enabled the `smartcard` cargo feature. This PR deletes that step and merges http_auth.rs into ironrdp-testsuite-extra's single test binary, whose only ironrdp-mstsgu dependency features are `rustls` and `test-support` (this line) — `smartcard` is not requested anywhere else in the workspace (verified via grep across all crate Cargo.toml files). The four #[cfg(feature = "smartcard")]-gated tests in http_auth.rs (smart_card_requires_username, smart_card_requires_negotiate, smart_card_rejects_malformed_negotiate_token, smart_card_recognizes_combined_negotiate_challenge) therefore never compile or run in CI going forward, silently losing coverage of the Kerberos PKINIT smart-card authentication error paths (malformed Negotiate tokens, missing username, wrong auth scheme) with no equivalent replacement and no mention in the PR description, which only says 'without test-suite feature flags.'

@@ -0,0 +1 @@

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.

non_blocking / low: The old crates/ironrdp-mstsgu/tests/rpc_tsgu_stubs.rs compiled rpc.rs against a deliberately minimal two-variant GwErrorKind (Connect, Custom) as its own separate test binary, as a smoke check that rpc.rs doesn't leak dependencies on more error variants than it directly constructs. The renamed file is now a single blank line, and its former purpose is superseded by main.rs's #[path] mod rpc;, which instead compiles rpc.rs against the full, rich GwErrorKind reused from rpch_http.rs. The empty file and its mod rpc_tsgu_stubs; declaration in mstsgu/mod.rs are vestigial — worth deleting rather than kept as a no-op placeholder that could be mistaken for still providing a check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-reviewed/1 One automated review completed kind/protocol Affects RDP or related protocol behavior risk/medium Behavioral change that does not substantially alter a core public API scope/tooling Build, CI, release, or developer tooling size/XL Size: up to 1299 counted lines and 49 files; exceeds L in either measure

Development

Successfully merging this pull request may close these issues.

3 participants