Skip to content

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

Merged
tedin7 merged 2 commits into
R0Y00:mainfrom
rasptum:startup/depth-target-debug-layer
Nov 25, 2026
Merged

tedin7 merged 2 commits into
R0Y00:mainfrom
rasptum:startup/depth-target-debug-layer

Conversation

@rasptum

@rasptum rasptum commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

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

Follow-up to R0Y00#2156's review nits.

- The bound case's debug-message check was skipped with 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 after the fence, and exits 77 (a
  capability skip CTest reports) when the layer is missing, instead of
  passing with a note. The check mode keeps every pixel, depth and
  counter check.
- run_case 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
  and the refusal line.
- The CMakeLists comment no longer says the drop control "must fail
  only its picture": it passes only when it reads back the unbound
  picture.

Refs R0Y00#1999

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of head c881a5c (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 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of head dd8cf6d (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.

@tedin7
tedin7 merged commit e27450e into R0Y00:main Nov 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants