Handle unsupported display deferrals in the HLE test #1125

Merged
EatCodeSleep2 merged 1 commit from upstream-pr/1125 into main 2026-11-25 00:21:27 +00:00
EatCodeSleep2 commented 2026-11-24 15:58:47 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EatCodeSleep2 on 2026-11-24T15:58:47Z.


Summary

  • Let the display deferral test accept Windows returning ERROR_NOT_SUPPORTED on hosts that cannot honor a display power request.
  • Verify that this result leaves the handle null. A successful acquire still has to return a handle that the test closes.

This is the test-only approach discussed in #727. AI-assisted. Uses no game files.

Testing

cargo test --locked -p victory-hle --lib modules::display::tests::sdr_and_display_deferrals -- --exact

<!-- greyfinch-sync:Marvisak/VIctory:issue:6585941221 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1125). Originally posted by [EatCodeSleep2](https://github.com/EatCodeSleep2) on 2026-11-24T15:58:47Z. --- ## Summary - Let the display deferral test accept Windows returning `ERROR_NOT_SUPPORTED` on hosts that cannot honor a display power request. - Verify that this result leaves the handle null. A successful acquire still has to return a handle that the test closes. This is the test-only approach discussed in #727. AI-assisted. Uses no game files. ## Testing `cargo test --locked -p victory-hle --lib modules::display::tests::sdr_and_display_deferrals -- --exact`
DenRakEiw commented 2026-11-24 16:04:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T16:01:27Z.

Review: APPROVED


Tested merged cleanly onto main (ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC):

  • cargo test -p victory-hle: 94 passed, 0 failed (plus no_dll_planting: 1 passed)
  • cargo clippy -p victory-hle --all-targets: 0 warnings
  • cargo xtask policy: ok

Clean handling of unsupported display deferrals in the HLE test suite. Approving.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6042813348 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1125#pullrequestreview-6042813348). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-24T16:01:27Z. **Review:** APPROVED --- Tested merged cleanly onto `main` (`ffe310e`) on Windows 11 x64 (Rust 1.98.1 MSVC): - `cargo test -p victory-hle`: **94 passed, 0 failed** (plus `no_dll_planting`: 1 passed) - `cargo clippy -p victory-hle --all-targets`: **0 warnings** - `cargo xtask policy`: ok Clean handling of unsupported display deferrals in the HLE test suite. Approving. AI-assisted (Gemini 4 Neon).
Zipettte commented 2026-11-24 18:06:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:37Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at efe102e: cargo test -p victory-hle passes, 95 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140049855 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1125#issuecomment-7140049855). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:01:37Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at efe102e: `cargo test -p victory-hle` passes, 95 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
mercuryVM commented 2026-11-24 20:01:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T19:14:40Z.

Review: APPROVED


Tested efe102e on Windows 11, RTX 5070, MSVC: builds, cargo test --workspace --no-fail-fast 607 passed, 0 failed (on our fork main). sdr_and_display_deferrals passes here through the S_OK arm.

  • NOT_SUPPORTED is 0x80070032, i.e. HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED). That's what acquire's PowerSetRequest failure path returns through last_error(), so the new arm matches the real failure, and the handle stays null on that path.
  • Any other HRESULT still fails the test with its value printed, so this only tolerates the one documented host limitation rather than hiding regressions.

Merged into our fork's main.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6045716870 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1125#pullrequestreview-6045716870). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T19:14:40Z. **Review:** APPROVED --- Tested efe102e on Windows 11, RTX 5070, MSVC: builds, `cargo test --workspace --no-fail-fast` 607 passed, 0 failed (on our fork main). `sdr_and_display_deferrals` passes here through the `S_OK` arm. - `NOT_SUPPORTED` is `0x80070032`, i.e. `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)`. That's what `acquire`'s `PowerSetRequest` failure path returns through `last_error()`, so the new arm matches the real failure, and the handle stays null on that path. - Any other HRESULT still fails the test with its value printed, so this only tolerates the one documented host limitation rather than hiding regressions. Merged into our fork's main. AI-assisted (Claude Code).
upstream-sync closed this pull request 2026-11-25 01:05:37 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!1125
No description provided.