tests: report the depth-target debug-layer check as its own test #2176

Merged
rasptum merged 2 commits from upstream-pr/2184 into main 2026-11-25 03:44:41 +00:00
rasptum commented 2026-11-25 03:17:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-25T03:17:27Z.


Refs #1999. Follow-up to the non-blocking review notes on #2156.

Change

  • Debug-layer check. In startup_draw_depth_target, the bound case's debug-message check was skipped with only a printed note when the D3D12 debug layer is not installed. It is now its own test, startup_draw_depth_target_debug_{warp,hardware}. It requires the bound picture and no debug-layer message of any severity after the fence, and exits 77 (a capability skip that CTest reports) when the layer is missing. The check mode keeps every pixel, depth and counter check, so nothing is weakened; the missing-layer case simply becomes visible instead of passing with a note.
  • run_case comment. It now says why the unknown case is exempt from the -> drawn; check: the stand-in refuses the whole OMSetRenderTargets there, so no draw may be issued. "Nothing drawn" is checked through the read-back (clear colour, depth 1.0) and the refusal line.
  • CMake comment. It no longer says the drop control "must fail only its picture". The control passes only when it reads back the unbound picture.
  • docs/startup-runtime.md mentions the _debug test.

Verification

ctest --preset dev --no-tests=error -R '^startup_draw_depth_target_' -V
ctest --preset release --no-tests=error -R '^startup_draw_depth_target_' -V

Windows 10 19045, MSVC 19.44. WARP: Microsoft Basic Render Driver, driver 10.0.19041.5794. Hardware: NVIDIA GeForce RTX 3060, driver 32.0.15.9636. The D3D12 debug layer is installed on this machine.

  • Result: 6 of 6 passed, 0 skipped, in dev and release, on both backends:
    • startup_draw_depth_target_{warp,hardware};
    • _drop_control_{warp,hardware}: red in front, depth 1.0;
    • _debug_{warp,hardware}: "debug layer enabled, 0 debug-layer message(s) after the fence; bound picture matches".
  • Not exercised: the 77 path (no debug layer), because the layer is installed here. It is a direct return 77 on the existing debug layer: ... enabled check.

AI-assisted (Claude Code).
🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6596391811 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2184). Originally posted by [rasptum](https://github.com/rasptum) on 2026-11-25T03:17:27Z. --- Refs #1999. Follow-up to the non-blocking review notes on #2156. ### Change - **Debug-layer check.** In `startup_draw_depth_target`, the bound case's debug-message check was skipped with only a printed note when the D3D12 debug layer is not installed. It is now its own test, `startup_draw_depth_target_debug_{warp,hardware}`. It requires the bound picture and no debug-layer message of any severity after the fence, and exits 77 (a capability skip that CTest reports) when the layer is missing. The check mode keeps every pixel, depth and counter check, so nothing is weakened; the missing-layer case simply becomes visible instead of passing with a note. - **`run_case` comment.** It now says why the `unknown` case is exempt from the `-> drawn;` check: the stand-in refuses the whole `OMSetRenderTargets` there, so no draw may be issued. "Nothing drawn" is checked through the read-back (clear colour, depth 1.0) and the refusal line. - **CMake comment.** It no longer says the drop control "must fail only its picture". The control passes only when it reads back the unbound picture. - `docs/startup-runtime.md` mentions the `_debug` test. ### Verification ``` ctest --preset dev --no-tests=error -R '^startup_draw_depth_target_' -V ctest --preset release --no-tests=error -R '^startup_draw_depth_target_' -V ``` Windows 10 19045, MSVC 19.44. WARP: Microsoft Basic Render Driver, driver 10.0.19041.5794. Hardware: NVIDIA GeForce RTX 3060, driver 32.0.15.9636. The D3D12 debug layer is installed on this machine. - **Result:** 6 of 6 passed, 0 skipped, in dev and release, on both backends: - `startup_draw_depth_target_{warp,hardware}`; - `_drop_control_{warp,hardware}`: red in front, depth 1.0; - `_debug_{warp,hardware}`: "debug layer enabled, 0 debug-layer message(s) after the fence; bound picture matches". - **Not exercised:** the 77 path (no debug layer), because the layer is installed here. It is a direct `return 77` on the existing `debug layer: ... enabled` check. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-25 04:04:10 +00:00
tedin7 commented 2026-11-25 04:04:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:24:25Z.

Review: COMMENTED


Review of head c881a5c703 (tests-only: CMakeLists.txt, docs/startup-runtime.md, tests/startup_draw_depth_target_check.py).

Findings: 0 P1, 0 P2. Splitting the debug-layer assertion into its own _debug CTest that exits 77 when the layer is missing is correct: a missing layer is now reported as a skip instead of a silent pass inside the bound case. The new CMake test is added to the same SKIP_RETURN_CODE 77 / TIMEOUT 120 property list as its siblings, and the docs match the script. No overlapping open PR touches this check.

Linux, executed locally:

  • python3 -m py_compile tests/startup_draw_depth_target_check.py: ok
  • python3 tests/docs_links_check.py: pass (402 links)
  • python3 tests/bidi_controls_check.py: pass
  • git diff --check origin/main...HEAD: clean
  • Ran the checker against a local stand-in executable that emits the expected stdout/stderr: check rc 0, debug rc 0, debug without layer rc 77, debug with a debug-layer message rc 1.
  • Mutations (each reverted with git checkout -- .): dropping the not bound["debug"] condition lets the message case pass (rc 0 instead of 1); changing return 77 to return 0 turns the no-layer skip into a pass; inverting the bound-picture comparison makes the clean run fail (rc 1 instead of 0). All three change the outcome, so the new test is killed by each.

Windows: GitHub Build and test on Windows = SUCCESS. The local Win2025 WARP run (x2w_pipe.py win2025 2184, 3-slot pool) built startup_draw_depth_target.exe but twice reported "No tests were found": INTAKE_PYTHON was missing on slot 3, so the Python-driven tests were not registered. That is an infrastructure problem, not a result for this PR; the WARP _debug / _drop_control / _warp tests are therefore not locally confirmed.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6051397372 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2184#pullrequestreview-6051397372). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:24:25Z. **Review:** COMMENTED --- Review of head c881a5c703ca9cfa01aa32f55cf3cfcabe091f69 (tests-only: CMakeLists.txt, docs/startup-runtime.md, tests/startup_draw_depth_target_check.py). Findings: 0 P1, 0 P2. Splitting the debug-layer assertion into its own `_debug` CTest that exits 77 when the layer is missing is correct: a missing layer is now reported as a skip instead of a silent pass inside the `bound` case. The new CMake test is added to the same SKIP_RETURN_CODE 77 / TIMEOUT 120 property list as its siblings, and the docs match the script. No overlapping open PR touches this check. Linux, executed locally: - `python3 -m py_compile tests/startup_draw_depth_target_check.py`: ok - `python3 tests/docs_links_check.py`: pass (402 links) - `python3 tests/bidi_controls_check.py`: pass - `git diff --check origin/main...HEAD`: clean - Ran the checker against a local stand-in executable that emits the expected stdout/stderr: `check` rc 0, `debug` rc 0, `debug` without layer rc 77, `debug` with a debug-layer message rc 1. - Mutations (each reverted with `git checkout -- .`): dropping the `not bound["debug"]` condition lets the message case pass (rc 0 instead of 1); changing `return 77` to `return 0` turns the no-layer skip into a pass; inverting the bound-picture comparison makes the clean run fail (rc 1 instead of 0). All three change the outcome, so the new test is killed by each. Windows: GitHub `Build and test on Windows` = SUCCESS. The local Win2025 WARP run (`x2w_pipe.py win2025 2184`, 3-slot pool) built startup_draw_depth_target.exe but twice reported "No tests were found": INTAKE_PYTHON was missing on slot 3, so the Python-driven tests were not registered. That is an infrastructure problem, not a result for this PR; the WARP `_debug` / `_drop_control` / `_warp` tests are therefore not locally confirmed. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 04:04:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:43:52Z.

Review: COMMENTED


Review of head dd8cf6db4a (files: CMakeLists.txt, docs/startup-runtime.md, tests/startup_draw_depth_target_check.py).

Findings: 0 P1, 0 P2.

What it does: the debug-layer message check moves out of check into a new debug mode (startup_draw_depth_target_debug_{warp,hardware}). The mode exits 77 when the layer is absent, so CTest reports a skip instead of a silent pass. SKIP_RETURN_CODE 77 is set for the new test. The docs describe the split accurately. Sibling tests (check, drop_control) are unchanged in behavior.

Commands executed locally:

  • python3 tests/docs_links_check.py -> 18 files, 405 links OK
  • python3 tests/bidi_controls_check.py -> OK
  • git diff --check origin/main...HEAD -> clean
  • Mutation (harness drives main() in debug mode with canned run results): clean/no layer/with messages -> 0/77/1. Mutant removing not bound["debug"] from the return -> the with-messages case returns 0 instead of 1 (killed).
  • Win2025 WARP, dev and release /O2: ctest -R '^startup_draw_depth_target_(warp|drop_control_warp|debug_warp)$' --no-tests=error: 3/3 completed, warp and drop_control_warp Passed, debug_warp Skipped (the Windows VM has no D3D12 debug layer, so the message check did not run there; a skip, not a pass).
  • CI Build and test on Windows = SUCCESS, Linux Python checks = SUCCESS.

Note: the debug-message assertion is therefore only exercised on hosts with the debug layer installed. This is by design and now reported as a skip.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6051546652 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2184#pullrequestreview-6051546652). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:43:52Z. **Review:** COMMENTED --- Review of head dd8cf6db4a3fd0be6c71f1b8bc9eb0447331693d (files: CMakeLists.txt, docs/startup-runtime.md, tests/startup_draw_depth_target_check.py). Findings: 0 P1, 0 P2. What it does: the debug-layer message check moves out of `check` into a new `debug` mode (`startup_draw_depth_target_debug_{warp,hardware}`). The mode exits 77 when the layer is absent, so CTest reports a skip instead of a silent pass. SKIP_RETURN_CODE 77 is set for the new test. The docs describe the split accurately. Sibling tests (`check`, `drop_control`) are unchanged in behavior. Commands executed locally: - `python3 tests/docs_links_check.py` -> 18 files, 405 links OK - `python3 tests/bidi_controls_check.py` -> OK - `git diff --check origin/main...HEAD` -> clean - Mutation (harness drives `main()` in `debug` mode with canned run results): clean/no layer/with messages -> 0/77/1. Mutant removing `not bound["debug"]` from the return -> the with-messages case returns 0 instead of 1 (killed). - Win2025 WARP, dev and release /O2: `ctest -R '^startup_draw_depth_target_(warp|drop_control_warp|debug_warp)$' --no-tests=error`: 3/3 completed, `warp` and `drop_control_warp` Passed, `debug_warp` Skipped (the Windows VM has no D3D12 debug layer, so the message check did not run there; a skip, not a pass). - CI `Build and test on Windows` = SUCCESS, Linux Python checks = SUCCESS. Note: the debug-message assertion is therefore only exercised on hosts with the debug layer installed. This is by design and now reported as a skip. AI-assisted; commands listed were executed locally.
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
R0Y00/Xbox2Windows!2176
No description provided.