Tests: accept Wine’s zero DWM cloak value after a successful query #1471

Open
gurvancampion wants to merge 1 commit from upstream-pr/1481 into main
gurvancampion commented 2026-11-24 16:46:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gurvancampion on 2026-11-24T16:46:53Z.


GE-Proton 11-12 returns S_OK for both DWM calls but reports zero for DWMWA_CLOAKED. The test title now accepts that value only on Wine. Both window variants must still pass the style and client-size checks. Related to #175.

 CreateWindowExW / A → check window styles and 1920×1080 client area
   DwmGetWindowAttribute(DWMWA_CLOAKED)
-    Require a nonzero cloak value
+    Require S_OK
+    Require a nonzero cloak value unless ntdll exports wine_get_version

What is in it

  • tests/testtitle/src/main.rs checks the query HRESULT on every host and tests the Wine exception and native Windows requirement.

Tested

  • AMD Ryzen 7 9800X3D, Omarchy Linux, GE-Proton 11-12, rustc 1.99.0, cargo-xwin 0.24.1, debug x86_64-pc-windows-msvc. The RTX 5090 was disabled for testing (NO_GPU=1, Vulkan ICD disabled, Wine built-in DXGI with renderer=no3d).
  • cargo xwin build --workspace --target x86_64-pc-windows-msvc passed on main and the PR commit.
  • cargo xwin test -p xcl --target x86_64-pc-windows-msvc --test e2e test_title_runs_and_game_folder_is_untouched -- --nocapture printed [FAIL] user32 … W: not cloaked on main and [PASS] user32 on the PR commit. The enclosing test still failed on both revisions, with storage and graphics failures in both runs.
  • cargo xwin test -p xcl-testtitle --target x86_64-pc-windows-msvc -- --nocapture had 2 failures with main's cloak assertion and 2 passes with the fix.
  • cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4. Main 930e8b4 had 737 passed, 14 failed and 41 ignored. PR commit 827617e had 739 passed, the same 14 failed and 41 ignored. On each commit, 108 GPU skips were included in the pass count (107 no GPU, 1 no GPU with 32- or 64-lane waves).

Regression run

The synthetic test title exercised the DWM query on both revisions. Retail smoke runs are only required for runtime changes.

Not tested

  • Native Windows DWM, GPU-backed workspace tests and retail titles.

AI use

  • OpenAI Codex (gpt-6.2-sol) investigated the failure, wrote the patch and tests, ran the checks, and drafted this description. Antigravity (Gemini 4 Neon) coordinated, reviewed the diff, and verified the PR checks. The author reviewed the diff and description before opening the PR.
<!-- greyfinch-sync:ivall/xcl:issue:5476464561 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1481). Originally posted by [gurvancampion](https://github.com/gurvancampion) on 2026-11-24T16:46:53Z. --- GE-Proton 11-12 returns `S_OK` for both DWM calls but reports zero for `DWMWA_CLOAKED`. The test title now accepts that value only on Wine. Both window variants must still pass the style and client-size checks. Related to #175. ```diff CreateWindowExW / A → check window styles and 1920×1080 client area DwmGetWindowAttribute(DWMWA_CLOAKED) - Require a nonzero cloak value + Require S_OK + Require a nonzero cloak value unless ntdll exports wine_get_version ``` **What is in it** - `tests/testtitle/src/main.rs` checks the query HRESULT on every host and tests the Wine exception and native Windows requirement. **Tested** - AMD Ryzen 7 9800X3D, Omarchy Linux, GE-Proton 11-12, `rustc 1.99.0`, `cargo-xwin 0.24.1`, debug `x86_64-pc-windows-msvc`. The RTX 5090 was disabled for testing (`NO_GPU=1`, Vulkan ICD disabled, Wine built-in DXGI with `renderer=no3d`). - `cargo xwin build --workspace --target x86_64-pc-windows-msvc` passed on main and the PR commit. - `cargo xwin test -p xcl --target x86_64-pc-windows-msvc --test e2e test_title_runs_and_game_folder_is_untouched -- --nocapture` printed `[FAIL] user32 … W: not cloaked` on main and `[PASS] user32` on the PR commit. The enclosing test still failed on both revisions, with storage and graphics failures in both runs. - `cargo xwin test -p xcl-testtitle --target x86_64-pc-windows-msvc -- --nocapture` had 2 failures with main's cloak assertion and 2 passes with the fix. - `cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4`. Main `930e8b4` had 737 passed, 14 failed and 41 ignored. PR commit `827617e` had 739 passed, the same 14 failed and 41 ignored. On each commit, 108 GPU skips were included in the pass count (107 `no GPU`, 1 `no GPU with 32- or 64-lane waves`). **Regression run** The synthetic test title exercised the DWM query on both revisions. Retail smoke runs are only required for runtime changes. **Not tested** - Native Windows DWM, GPU-backed workspace tests and retail titles. **AI use** - OpenAI Codex (`gpt-6.2-sol`) investigated the failure, wrote the patch and tests, ran the checks, and drafted this description. Antigravity (`Gemini 4 Neon`) coordinated, reviewed the diff, and verified the PR checks. The author reviewed the diff and description before opening the PR.
futurepro62 commented 2026-11-24 18:08:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T17:20:11Z.


Full-suite run, since this PR has no test report yet. Tested exact head 827617e (on its base 930e8b4). Passes on both GPUs, on native Windows.

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4, run alone: 752 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • An earlier run, done while another suite was using the machine, failed only fine_timer_makes_short_sleeps_short (Sleep(1) over its limit), a timing check this PR doesn't touch. It passed when run alone.
  • The new testtitle tests ran and passed on both GPUs: cloak_query_requires_s_ok, zero_cloak_requires_wine. test_title_runs_and_game_folder_is_untouched passed too.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon): 752 passed, 0 failed, 41 ignored, nothing skipped.

Not tested

  • Wine, which is the case this PR is for. This machine is Windows only.

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7139040878 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1481#issuecomment-7139040878). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T17:20:11Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `827617e` (on its base `930e8b4`). **Passes on both GPUs, on native Windows.** **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`, run alone: **752 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - An earlier run, done while another suite was using the machine, failed only `fine_timer_makes_short_sleeps_short` (`Sleep(1)` over its limit), a timing check this PR doesn't touch. It passed when run alone. - The new testtitle tests ran and passed on both GPUs: `cloak_query_requires_s_ok`, `zero_cloak_requires_wine`. `test_title_runs_and_game_folder_is_untouched` passed too. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`): **752 passed, 0 failed, 41 ignored**, nothing skipped. **Not tested** - Wine, which is the case this PR is for. This machine is Windows only. **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-24 19:07:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:22Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141293989 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1481#issuecomment-7141293989). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:53:22Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
JJAutoCompare commented 2026-11-25 06:05:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:26:23Z.


Empirical test report (827617ef)

Verified PR #1481 at 827617ef9870aa2ad10fa21ba672cb9c1226b0b6.

Hardware / environment

  • Native Windows 11 x64, build 26200, on an AMD Family 23 Model 113 Stepping 0 CPU. The focused fixtures use no D3D12 device and ran outside the Arc test wrapper with XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1.
  • rustc 1.100.0 (0ef1bc386 2026-11-09). DXC reported dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47). Cargo used its unoptimized test profile with incremental compilation and debug info disabled.

Commands and results

  • cargo test --workspace --no-run built all workspace test executables and exited 0.
  • cargo test -p xcl-testtitle --bin xcl_testtitle cloak exited 0 with 2 passed, 0 failed, 0 ignored, 0 skipped, and 0 filtered out. Both tests::zero_cloak_requires_wine and tests::cloak_query_requires_s_ok passed.

Observed behavior

  • With simulated S_OK, the checker rejected a zero cloak value for the native Windows branch and accepted zero for the Wine branch. A nonzero cloak value passed in both branches.
  • With simulated E_NOTIMPL, E_INVALIDARG, or S_FALSE, the checker reported the returned HRESULT for both zero and nonzero cloak values on either branch. The run on Windows 11 measured the checker's handling of supplied values. The zero value reported by the PR on GE-Proton 11-12 was represented by a fixture input.

Not tested

Live Windows DWM calls, Wine behavior, the full GPU workspace suite, and game smoke runs were omitted.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1481-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153772228 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1481#issuecomment-7153772228). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:26:23Z. --- ### Empirical test report (827617ef) Verified PR #1481 at `827617ef9870aa2ad10fa21ba672cb9c1226b0b6`. **Hardware / environment** - Native Windows 11 x64, build 26200, on an AMD Family 23 Model 113 Stepping 0 CPU. The focused fixtures use no D3D12 device and ran outside the Arc test wrapper with `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. - `rustc 1.100.0 (0ef1bc386 2026-11-09)`. DXC reported `dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47)`. Cargo used its unoptimized test profile with incremental compilation and debug info disabled. **Commands and results** - `cargo test --workspace --no-run` built all workspace test executables and exited 0. - `cargo test -p xcl-testtitle --bin xcl_testtitle cloak` exited 0 with 2 passed, 0 failed, 0 ignored, 0 skipped, and 0 filtered out. Both `tests::zero_cloak_requires_wine` and `tests::cloak_query_requires_s_ok` passed. **Observed behavior** - With simulated `S_OK`, the checker rejected a zero cloak value for the native Windows branch and accepted zero for the Wine branch. A nonzero cloak value passed in both branches. - With simulated `E_NOTIMPL`, `E_INVALIDARG`, or `S_FALSE`, the checker reported the returned HRESULT for both zero and nonzero cloak values on either branch. The run on Windows 11 measured the checker's handling of supplied values. The zero value reported by the PR on GE-Proton 11-12 was represented by a fixture input. **Not tested** Live Windows DWM calls, Wine behavior, the full GPU workspace suite, and game smoke runs were omitted. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1481-focused.log` and published.
DavidM1911 commented 2026-11-26 06:06:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:27:37Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7183504207 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1481#issuecomment-7183504207). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T05:27:37Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
github-actions[bot] commented 2026-12-01 02:32:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:32:34Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7298728481 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1481#issuecomment-7298728481). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:32:34Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 05:54:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:54:22Z.


Triage (#1607) – head e365a19

#1462 fixes the same test-title failure under Wine (W: not cloaked) a different way: with #794, it requires the window to be cloaked or hidden, and to stay hidden after ShowWindow / SetWindowPos. This PR instead drops the nonzero-cloak requirement when wine_get_version is exported, so under Wine it no longer checks that the console window is concealed. It does now require S_OK from the query. The maintainer should pick one; #1462 is stricter but needs #794.

Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302263961 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1481#issuecomment-7302263961). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:54:22Z. --- **Triage (#1607)** – head e365a19 #1462 fixes the same test-title failure under Wine (`W: not cloaked`) a different way: with #794, it requires the window to be cloaked or hidden, and to stay hidden after `ShowWindow` / `SetWindowPos`. This PR instead drops the nonzero-cloak requirement when `wine_get_version` is exported, so under Wine it no longer checks that the console window is concealed. It does now require `S_OK` from the query. The maintainer should pick one; #1462 is stricter but needs #794. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1481:upstream-pr/1481'
git switch 'upstream-pr/1481'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1481'
git switch 'upstream-pr/1481'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1481'
git switch 'upstream-pr/1481'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1481'
git switch 'main'
git merge --squash 'upstream-pr/1481'
git switch 'main'
git merge --ff-only 'upstream-pr/1481'
git switch 'main'
git merge 'upstream-pr/1481'
git push origin 'main'
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
xcl-dev/xcl!1471
No description provided.