tooling: add a startup UI regression matrix #3175

Manually merged
github merged 2 commits from github-bot/gh-3173 into gh-pr/3173/base 2026-11-27 22:30:40 +00:00 AGit
Owner

@⁠lambirou on GitHub · 2026-11-27 20:23 UTC · original
lambirou:codex/ui-regression-matrix → main · +816 −0 · 4 files · 2 commits · merged 2026-11-27 22:26 UTC

Changes

Adds tools/startup/ui_regression_matrix.py, a CTest-driven pass/skip/fail matrix for the startup UI sampler, BC7, rotated-rectangle and texture-band fixtures. A skip (77) stays separate from a pass and a failure, and an empty selection is an error.

The default rows are startup_sampler_heap_wrapped, startup_xg_bc7_draw, startup_rect_gap and startup_ui_texture_bands, for _warp and _hardware.

Validation

python -B tests/startup_ui_regression_matrix_check.py
# startup_ui_regression_matrix_check: ok
python -m py_compile tools/startup/ui_regression_matrix.py tests/startup_ui_regression_matrix_check.py
git diff --check

The synthetic check covers a full mixed matrix, a 77 capability skip, a failure, an adapter-only selection, a custom filter and empty selections. No runtime, shader or existing fixture is changed, so no GPU test was run in this PR.

Limits

The tool reports the fixtures the selected build actually registers. It does not close #3133 or #3134 by itself; the exact #3133 draw is still unreproduced, and #3155 / #3143 / #3144 need their own review and merge.

Refs #3133 #3134 #3155 #3143 #3144 #870.

Review update (2026-11-27, 7c24b8f3)

pigalot's notrun finding is fixed. A notrun row is now a skip only when its CTest skipped message starts with SKIP_RETURN_CODE or SKIP_REGULAR_EXPRESSION. Missing executables, missing configurations and disabled tests are failures with the CTest message as the detail. A nonzero CTest exit with zero failed rows also returns 1.

The fake CTest now covers a missing executable (Unable to find executable, expected FAIL) and a nonzero CTest exit with every row passing (expected exit 1 with the diagnostic). startup_ui_regression_matrix_check and docs_links_check pass (103 files, 593 links). CI is running on 7c24b8f3.

**@⁠lambirou** on GitHub · 2026-11-27 20:23 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3173) `lambirou:codex/ui-regression-matrix` → `main` · +816 −0 · 4 files · 2 commits · merged 2026-11-27 22:26 UTC ## Changes Adds `tools/startup/ui_regression_matrix.py`, a CTest-driven pass/skip/fail matrix for the startup UI sampler, BC7, rotated-rectangle and texture-band fixtures. A skip (77) stays separate from a pass and a failure, and an empty selection is an error. The default rows are `startup_sampler_heap_wrapped`, `startup_xg_bc7_draw`, `startup_rect_gap` and `startup_ui_texture_bands`, for `_warp` and `_hardware`. ## Validation ```powershell python -B tests/startup_ui_regression_matrix_check.py # startup_ui_regression_matrix_check: ok python -m py_compile tools/startup/ui_regression_matrix.py tests/startup_ui_regression_matrix_check.py git diff --check ``` The synthetic check covers a full mixed matrix, a 77 capability skip, a failure, an adapter-only selection, a custom filter and empty selections. No runtime, shader or existing fixture is changed, so no GPU test was run in this PR. ## Limits The tool reports the fixtures the selected build actually registers. It does not close #3133 or #3134 by itself; the exact #3133 draw is still unreproduced, and #3155 / #3143 / #3144 need their own review and merge. Refs #3133 #3134 #3155 #3143 #3144 #870. ## Review update (2026-11-27, `7c24b8f3`) pigalot's `notrun` finding is fixed. A `notrun` row is now a skip only when its CTest skipped message starts with `SKIP_RETURN_CODE` or `SKIP_REGULAR_EXPRESSION`. Missing executables, missing configurations and disabled tests are failures with the CTest message as the detail. A nonzero CTest exit with zero failed rows also returns 1. The fake CTest now covers a missing executable (`Unable to find executable`, expected FAIL) and a nonzero CTest exit with every row passing (expected exit 1 with the diagnostic). `startup_ui_regression_matrix_check` and `docs_links_check` pass (103 files, 593 links). CI is running on `7c24b8f3`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 20:28:44 +00:00
Author
Owner

@⁠pigalot on GitHub · 2026-11-27 21:40 UTC · original · requested changes

Independently reviewed ec324f73 integrated over main 673a9f2c (tree 9b7e20fe). The merge is clean and git diff --cached --check origin/main is clean.

What I traced. selected_test_names lists with ctest --show-only=json-v1 -R <filter>, the adapter filter is applied by name suffix, and run_tests reruns exactly those names with --output-junit and reads each <testcase> through _case_status: <failure>/<error> is a fail, <skipped> or status="notrun" is a skip, status="run" is a pass, anything else is a fail. Exit codes are 0/1/3/2 as the doc says.

What I ran.

python -B tests/startup_ui_regression_matrix_check.py          # startup_ui_regression_matrix_check: ok
python -B tools/startup/ui_regression_matrix.py --build-dir out/build/dev --adapter warp
python with_gpu_lock.py python -B tools/startup/ui_regression_matrix.py --build-dir out/build/dev --adapter hardware

On a full dev build of the trial merge, warp and hardware each give 3 passed, 0 skipped, 0 failed (3 selected), exit 0: startup_ui_texture_bands, startup_sampler_heap_wrapped and startup_xg_bc7_draw. startup_rect_gap is not registered on main (it comes with #3144), so it is correctly left out. The check and tool are new, so there is no before state on main.

Finding: a test that never ran is counted as a skip. CTest writes status="notrun" with a <skipped> element for more than SKIP_RETURN_CODE. With CTest 4.3.1 and Ninja, a toy project gives:

Case JUnit Matrix row
exit 77 with SKIP_RETURN_CODE 77 notrun, <skipped message="SKIP_RETURN_CODE=77"/> SKIP (correct)
COMMAND executable not built notrun, <skipped message="Unable to find executable"/> SKIP
DISABLED TRUE status="disabled", no child FAIL, unrecognized CTest result status 'disabled'
timeout fail, <failure message="Timeout"/> FAIL (correct)

The same happens in this repository. With out/build/dev/startup_ui_texture_bands_check.exe renamed away (as after a targeted --target build that did not include it):

python -B tools/startup/ui_regression_matrix.py --build-dir out/build/dev --adapter warp
# - CTest exit code: 8
# - Result: 2 passed, 1 skipped, 0 failed (3 selected)
# | `startup_ui_texture_bands_warp` | SKIP | 0.000 s | Unable to find executable |
# exit 3

CTest itself counts that row as failed (exit 8, "Not Run" in its failed list), but the matrix reports 0 failed and exit 3. The PR and docs/experiments/startup-ui-regression-matrix.md describe a skip as a capability or environment result (77). A missing binary is neither, and a "1 skipped" row is exactly what a reader would discount as "no GPU here". With a multi-config generator and no -C, every row becomes SKIP with Missing Configuration in the same way.

Suggested direction (unconfirmed beyond the cases above): count a notrun row as a skip only when its <skipped> message starts with SKIP_RETURN_CODE (and, if you want it, CTest's SKIP_REGULAR_EXPRESSION message), and count any other notrun as a fail with its message as the detail. Add a fake-CTest row with Unable to find executable to the check as the control. Treating a nonzero CTest exit with zero counted failures as a fail would also catch cases neither of us has listed.

Mutants (each applied alone to tools/startup/ui_regression_matrix.py, check rerun, file restored from its raw bytes, git diff --quiet clean afterwards):

Mutant Result
notrun classified as pass killed
skip-only matrix exits 0 instead of 3 killed
--adapter filter dropped killed
empty-filter error removed killed
unknown status classified as pass survives
"CTest did not report: …" missing-row error removed survives

The two survivors are defensive paths the fake CTest never reaches. A fake row with an unexpected status, and a fake run that omits one selected name from the JUnit file, would pin them. These are non-blocking.

Verdict: request changes on ec324f73 for the notrun classification above. The rest of the tool behaves as described in my runs.

Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, CTest 4.3.1, Python 3.12.10, debug layer off.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on ec324f73.

This reply was AI-assisted.

**@⁠pigalot** on GitHub · 2026-11-27 21:40 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3173#pullrequestreview-6093558369) · **requested changes** Independently reviewed `ec324f73` integrated over `main` `673a9f2c` (tree `9b7e20fe`). The merge is clean and `git diff --cached --check origin/main` is clean. **What I traced.** `selected_test_names` lists with `ctest --show-only=json-v1 -R <filter>`, the adapter filter is applied by name suffix, and `run_tests` reruns exactly those names with `--output-junit` and reads each `<testcase>` through `_case_status`: `<failure>`/`<error>` is a fail, `<skipped>` or `status="notrun"` is a skip, `status="run"` is a pass, anything else is a fail. Exit codes are 0/1/3/2 as the doc says. **What I ran.** ```powershell python -B tests/startup_ui_regression_matrix_check.py # startup_ui_regression_matrix_check: ok python -B tools/startup/ui_regression_matrix.py --build-dir out/build/dev --adapter warp python with_gpu_lock.py python -B tools/startup/ui_regression_matrix.py --build-dir out/build/dev --adapter hardware ``` On a full `dev` build of the trial merge, warp and hardware each give 3 passed, 0 skipped, 0 failed (3 selected), exit 0: `startup_ui_texture_bands`, `startup_sampler_heap_wrapped` and `startup_xg_bc7_draw`. `startup_rect_gap` is not registered on `main` (it comes with #3144), so it is correctly left out. The check and tool are new, so there is no before state on `main`. **Finding: a test that never ran is counted as a skip.** CTest writes `status="notrun"` with a `<skipped>` element for more than `SKIP_RETURN_CODE`. With CTest 4.3.1 and Ninja, a toy project gives: | Case | JUnit | Matrix row | |---|---|---| | exit 77 with `SKIP_RETURN_CODE 77` | `notrun`, `<skipped message="SKIP_RETURN_CODE=77"/>` | SKIP (correct) | | `COMMAND` executable not built | `notrun`, `<skipped message="Unable to find executable"/>` | **SKIP** | | `DISABLED TRUE` | `status="disabled"`, no child | FAIL, `unrecognized CTest result status 'disabled'` | | timeout | `fail`, `<failure message="Timeout"/>` | FAIL (correct) | The same happens in this repository. With `out/build/dev/startup_ui_texture_bands_check.exe` renamed away (as after a targeted `--target` build that did not include it): ```powershell python -B tools/startup/ui_regression_matrix.py --build-dir out/build/dev --adapter warp # - CTest exit code: 8 # - Result: 2 passed, 1 skipped, 0 failed (3 selected) # | `startup_ui_texture_bands_warp` | SKIP | 0.000 s | Unable to find executable | # exit 3 ``` CTest itself counts that row as failed (exit 8, "Not Run" in its failed list), but the matrix reports 0 failed and exit 3. The PR and `docs/experiments/startup-ui-regression-matrix.md` describe a skip as a capability or environment result (77). A missing binary is neither, and a "1 skipped" row is exactly what a reader would discount as "no GPU here". With a multi-config generator and no `-C`, every row becomes SKIP with `Missing Configuration` in the same way. Suggested direction (unconfirmed beyond the cases above): count a `notrun` row as a skip only when its `<skipped>` message starts with `SKIP_RETURN_CODE` (and, if you want it, CTest's `SKIP_REGULAR_EXPRESSION` message), and count any other `notrun` as a fail with its message as the detail. Add a fake-CTest row with `Unable to find executable` to the check as the control. Treating a nonzero CTest exit with zero counted failures as a fail would also catch cases neither of us has listed. **Mutants** (each applied alone to `tools/startup/ui_regression_matrix.py`, check rerun, file restored from its raw bytes, `git diff --quiet` clean afterwards): | Mutant | Result | |---|---| | `notrun` classified as pass | killed | | skip-only matrix exits 0 instead of 3 | killed | | `--adapter` filter dropped | killed | | empty-filter error removed | killed | | unknown `status` classified as pass | survives | | "CTest did not report: …" missing-row error removed | survives | The two survivors are defensive paths the fake CTest never reaches. A fake row with an unexpected status, and a fake run that omits one selected name from the JUnit file, would pin them. These are non-blocking. **Verdict:** request changes on `ec324f73` for the `notrun` classification above. The rest of the tool behaves as described in my runs. Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, CTest 4.3.1, Python 3.12.10, debug layer off. CI: `Build and test on Windows`, `Assemble and translate gfx1013 fixtures` and `Run platform-independent Python checks on Linux` pass on `ec324f73`. This reply was AI-assisted.
Author
Owner

@⁠lambirou on GitHub · 2026-11-27 22:10 UTC · original

Review update (2026-11-27, 7c24b8f3)

pigalot's notrun finding is fixed. A notrun row is now a skip only when its CTest skipped message starts with SKIP_RETURN_CODE or SKIP_REGULAR_EXPRESSION. Missing executables, missing configurations and disabled tests are failures with the CTest message as the detail. A nonzero CTest exit with zero failed rows also returns 1.

The fake CTest now covers a missing executable (Unable to find executable, expected FAIL) and a nonzero CTest exit with every row passing (expected exit 1 with the diagnostic). startup_ui_regression_matrix_check and docs_links_check pass (103 files, 593 links). CI is running on 7c24b8f3.

**@⁠lambirou** on GitHub · 2026-11-27 22:10 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3173#issuecomment-7229092513) ## Review update (2026-11-27, `7c24b8f3`) pigalot's `notrun` finding is fixed. A `notrun` row is now a skip only when its CTest skipped message starts with `SKIP_RETURN_CODE` or `SKIP_REGULAR_EXPRESSION`. Missing executables, missing configurations and disabled tests are failures with the CTest message as the detail. A nonzero CTest exit with zero failed rows also returns 1. The fake CTest now covers a missing executable (`Unable to find executable`, expected FAIL) and a nonzero CTest exit with every row passing (expected exit 1 with the diagnostic). `startup_ui_regression_matrix_check` and `docs_links_check` pass (103 files, 593 links). CI is running on `7c24b8f3`.
CTest also writes status=notrun for a missing executable, a missing
configuration or a disabled test. Only an explicit SKIP_RETURN_CODE or
SKIP_REGULAR_EXPRESSION is a capability skip; every other notrun and a
nonzero CTest exit with no failed row are failures. Add fake-CTest controls
for the missing executable and the nonzero exit.
Author
Owner

@⁠lambirou on GitHub · 2026-11-27 22:19 UTC · original

@⁠pigalot the notrun classification and nonzero-exit controls are fixed on 7c24b8f3; the fake CTest now covers Unable to find executable. Could you re-review?

**@⁠lambirou** on GitHub · 2026-11-27 22:19 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3173#issuecomment-7229228440) @⁠pigalot the `notrun` classification and nonzero-exit controls are fixed on `7c24b8f3`; the fake CTest now covers `Unable to find executable`. Could you re-review?
github-bot changed target branch from main to gh-pr/3173/base 2026-11-27 22:30:39 +00:00
github manually merged commit 7c24b8f30e into gh-pr/3173/base 2026-11-27 22:30:40 +00:00
Author
Owner

@⁠pigalot on GitHub · 2026-11-27 22:25 UTC · original · approved these changes

Retested 7c24b8f3 integrated over main f6206217 (tree cc2ae01a). The merge is clean and git diff --cached --check origin/main is clean.

My earlier finding (notrun counted as a skip): addressed. _case_status now treats a notrun row as a skip only when its message starts with SKIP_RETURN_CODE or SKIP_REGULAR_EXPRESSION. Any other notrun is a fail, with CTest's message as the detail. A nonzero CTest exit with no failed row also exits 1. The new fake-CTest rows cover a missing executable and exit 8 with every row passing.

Real CTest, not the fake. I classified the JUnit file CTest 4.3.1 writes for a small toy project with the PR's _case_status:

Toy test JUnit Result
exit 77 with SKIP_RETURN_CODE 77 notrun, <skipped message="SKIP_RETURN_CODE=77"> skip
SKIP_REGULAR_EXPRESSION matched notrun, <skipped message="SKIP_REGULAR_EXPRESSION_MATCHED"> skip
command that does not exist notrun, <skipped message="Unable to find executable"> fail (was skip on ec324f73)
DISABLED TRUE disabled, no child fail (unrecognized CTest result status 'disabled')
timeout / exit 1 / exit 77 without the property fail fail
pass run pass

The repository repro from my last review.

python -B tests/startup_ui_regression_matrix_check.py          # startup_ui_regression_matrix_check: ok
python -B tools/startup/ui_regression_matrix.py --build-dir out/build/dev --adapter warp
python with_gpu_lock.py python -B tools/startup/ui_regression_matrix.py --build-dir out/build/dev --adapter hardware
  • With every test built, warp and hardware each give 3 passed, 0 skipped, 0 failed (3 selected) and exit 0.
  • With out/build/dev/startup_ui_texture_bands_check.exe renamed away, warp now gives CTest exit code: 8, 2 passed, 0 skipped, 1 failed, and the row startup_ui_texture_bands_warp | FAIL | 0.000 s | Unable to find executable. It exits 1. On ec324f73 the same run gave SKIP and exit 3.

Mutants (each applied alone to tools/startup/ui_regression_matrix.py, check rerun, file restored from its raw bytes, git diff --quiet clean afterwards):

Mutant Result
any other notrun counted as a skip (the ec324f73 behaviour) killed
skip marker widened to any message killed
nonzero CTest exit with no failed row ignored killed
skip-only matrix exits 0 instead of 3 killed
--adapter filter dropped killed
empty-filter error removed killed
SKIP_REGULAR_EXPRESSION marker dropped survives
unknown status classified as pass survives
"CTest did not report: …" missing-row error removed survives

Non-blocking notes.

  • Regex marker. The real-CTest table shows the SKIP_REGULAR_EXPRESSION prefix is needed: CTest writes SKIP_REGULAR_EXPRESSION_MATCHED. A fake row with that message would pin it.
  • Disabled tests. CTest 4.3.1 writes a disabled test as status="disabled", not notrun, so it reaches the unknown-status branch. The result is the fail the docs promise. But that branch is now the one that handles disabled tests, and it is still untested. A fake disabled row would cover both that branch and the "unknown status as pass" survivor.
  • Docs wording. docs/experiments/startup-ui-regression-matrix.md lists disabled tests under notrun. Saying they fail through the unrecognized-status rule would match what CTest writes.

Verdict: approve on 7c24b8f3. This supersedes my changes-requested review on ec324f73.

Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, CTest 4.3.1, Python 3.12.10, debug layer off.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on 7c24b8f3.

This reply was AI-assisted.

**@⁠pigalot** on GitHub · 2026-11-27 22:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3173#pullrequestreview-6093939841) · **approved these changes** Retested `7c24b8f3` integrated over `main` `f6206217` (tree `cc2ae01a`). The merge is clean and `git diff --cached --check origin/main` is clean. **My earlier finding (`notrun` counted as a skip): addressed.** `_case_status` now treats a `notrun` row as a skip only when its message starts with `SKIP_RETURN_CODE` or `SKIP_REGULAR_EXPRESSION`. Any other `notrun` is a fail, with CTest's message as the detail. A nonzero CTest exit with no failed row also exits 1. The new fake-CTest rows cover a missing executable and exit 8 with every row passing. **Real CTest, not the fake.** I classified the JUnit file CTest 4.3.1 writes for a small toy project with the PR's `_case_status`: | Toy test | JUnit | Result | |---|---|---| | exit 77 with `SKIP_RETURN_CODE 77` | `notrun`, `<skipped message="SKIP_RETURN_CODE=77">` | skip | | `SKIP_REGULAR_EXPRESSION` matched | `notrun`, `<skipped message="SKIP_REGULAR_EXPRESSION_MATCHED">` | skip | | command that does not exist | `notrun`, `<skipped message="Unable to find executable">` | **fail** (was skip on `ec324f73`) | | `DISABLED TRUE` | `disabled`, no child | fail (`unrecognized CTest result status 'disabled'`) | | timeout / exit 1 / exit 77 without the property | `fail` | fail | | pass | `run` | pass | **The repository repro from my last review.** ```powershell python -B tests/startup_ui_regression_matrix_check.py # startup_ui_regression_matrix_check: ok python -B tools/startup/ui_regression_matrix.py --build-dir out/build/dev --adapter warp python with_gpu_lock.py python -B tools/startup/ui_regression_matrix.py --build-dir out/build/dev --adapter hardware ``` - With every test built, warp and hardware each give `3 passed, 0 skipped, 0 failed (3 selected)` and exit 0. - With `out/build/dev/startup_ui_texture_bands_check.exe` renamed away, warp now gives `CTest exit code: 8`, `2 passed, 0 skipped, 1 failed`, and the row `startup_ui_texture_bands_warp | FAIL | 0.000 s | Unable to find executable`. It exits 1. On `ec324f73` the same run gave SKIP and exit 3. **Mutants** (each applied alone to `tools/startup/ui_regression_matrix.py`, check rerun, file restored from its raw bytes, `git diff --quiet` clean afterwards): | Mutant | Result | |---|---| | any other `notrun` counted as a skip (the `ec324f73` behaviour) | killed | | skip marker widened to any message | killed | | nonzero CTest exit with no failed row ignored | killed | | skip-only matrix exits 0 instead of 3 | killed | | `--adapter` filter dropped | killed | | empty-filter error removed | killed | | `SKIP_REGULAR_EXPRESSION` marker dropped | survives | | unknown `status` classified as pass | survives | | "CTest did not report: …" missing-row error removed | survives | **Non-blocking notes.** - **Regex marker.** The real-CTest table shows the `SKIP_REGULAR_EXPRESSION` prefix is needed: CTest writes `SKIP_REGULAR_EXPRESSION_MATCHED`. A fake row with that message would pin it. - **Disabled tests.** CTest 4.3.1 writes a disabled test as `status="disabled"`, not `notrun`, so it reaches the unknown-status branch. The result is the fail the docs promise. But that branch is now the one that handles disabled tests, and it is still untested. A fake `disabled` row would cover both that branch and the "unknown status as pass" survivor. - **Docs wording.** `docs/experiments/startup-ui-regression-matrix.md` lists disabled tests under `notrun`. Saying they fail through the unrecognized-status rule would match what CTest writes. **Verdict:** approve on `7c24b8f3`. This supersedes my changes-requested review on `ec324f73`. Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, CTest 4.3.1, Python 3.12.10, debug layer off. CI: `Build and test on Windows`, `Assemble and translate gfx1013 fixtures` and `Run platform-independent Python checks on Linux` pass on `7c24b8f3`. This reply was AI-assisted.
This discussion has been locked. Commenting is limited to contributors.
No description provided.