test(agc): register the recorder's flag-scoped runs with ctest #8445

Merged
juanpimg merged 2 commits from upstream-pr/8445 into main 2026-10-22 17:39:01 +00:00
juanpimg commented 2026-10-20 12:43:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by juanpimg on 2026-10-20T12:43:41Z.


What

Registers the agc_driver_recorder_tests flag-scoped runs that no ctest entry reached, plus agc_driver_store_idle_results_tests --idle-epoch-wake.

agc_driver_recorder_tests implements --completion-labels-only, --cmask-only and --cube-only, and every ctest entry of that executable was flag-scoped, so the code behind those three modes never ran in CI: completionCountTests, afterRecordedWorkTests, directCompletionLabelTests, labelTests, lateLabelTests, largeLabelTests, cmaskPassTests and singleCubeTests were all dead. agc_driver_store_idle_results_tests --idle-epoch-wake never took the wake branch.

This is the remaining open item of issue #1532, whose last update records that the two sections it once reported as failing are resolved on main by #3103 and #3226. The no-argument full run and the two benchmark modes are left out: the full run is about forty test groups on a live device, and the benchmarks add runtime without coverage.

Tested

CachyOS Linux, kernel 7.2.9-2-cachyos, GCC 16.2.1, CMake 3.31.6, Ninja 1.12.1, Release build, BUILD_TESTING=ON.

Every mode was run directly on both devices before it was registered:

Mode NVIDIA Intel
agc_driver_recorder_tests --completion-labels-only pass, 0.21 s pass, 0.06 s
agc_driver_recorder_tests --cmask-only pass, 0.14 s pass, 0.08 s
agc_driver_recorder_tests --cube-only pass, 0.14 s pass, 0.10 s
agc_driver_store_idle_results_tests --idle-epoch-wake pass, 0.34 s pass, 0.27 s

The focused tests were then run on main and on the change from the same machine and GPU with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, using ctest --test-dir build -R "agc_recorder|agc_driver_store_idle_results" -V:

  • NVIDIA: main 7 passed, change 11 passed. VUID- errors: 0 before, 0 after.
  • Intel: main 7 passed, change 11 passed. VUID- errors: 0 before, 0 after.
  • Neither log contains "was not found but was requested by env var VK_INSTANCE_LAYERS".

The four new tests run in 0.13 s to 0.36 s under the validation layer, well inside the 30 s budget.

  • Full build: cmake --build build --parallel, no error.
  • ctest --test-dir build --output-on-failure -j4: 1699 of 1700 pass. guest_sysmodule fails identically on origin/main, so it is a pre-existing failure and not a regression.
  • python3 tools/check_conventions.py --base origin/main: all conventions checks passed.
  • python3 tools/check_test_registration.py build: 1124 test executables, none unregistered.

GPUs: NVIDIA GeForce RTX 4060 Laptop GPU, driver 615.78.08, CachyOS Linux 7.2.9-2-cachyos; Intel Iris Xe Graphics, Mesa 26.2.4 ANV, CachyOS Linux 7.2.9-2-cachyos.

No title was run: the contributor has no PS5 and no game dumps.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: #1532
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4060 Laptop GPU, driver 615.78.08, CachyOS Linux 7.2.9-2-cachyos; Intel Iris Xe Graphics, Mesa 26.2.4 ANV, CachyOS Linux 7.2.9-2-cachyos
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4935895136 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8445). Originally posted by [juanpimg](https://github.com/juanpimg) on 2026-10-20T12:43:41Z. --- ### What Registers the `agc_driver_recorder_tests` flag-scoped runs that no ctest entry reached, plus `agc_driver_store_idle_results_tests --idle-epoch-wake`. `agc_driver_recorder_tests` implements `--completion-labels-only`, `--cmask-only` and `--cube-only`, and every ctest entry of that executable was flag-scoped, so the code behind those three modes never ran in CI: `completionCountTests`, `afterRecordedWorkTests`, `directCompletionLabelTests`, `labelTests`, `lateLabelTests`, `largeLabelTests`, `cmaskPassTests` and `singleCubeTests` were all dead. `agc_driver_store_idle_results_tests --idle-epoch-wake` never took the wake branch. This is the remaining open item of issue #1532, whose last update records that the two sections it once reported as failing are resolved on `main` by #3103 and #3226. The no-argument full run and the two benchmark modes are left out: the full run is about forty test groups on a live device, and the benchmarks add runtime without coverage. ### Tested CachyOS Linux, kernel 7.2.9-2-cachyos, GCC 16.2.1, CMake 3.31.6, Ninja 1.12.1, Release build, `BUILD_TESTING=ON`. Every mode was run directly on both devices before it was registered: | Mode | NVIDIA | Intel | |---|---|---| | `agc_driver_recorder_tests --completion-labels-only` | pass, 0.21 s | pass, 0.06 s | | `agc_driver_recorder_tests --cmask-only` | pass, 0.14 s | pass, 0.08 s | | `agc_driver_recorder_tests --cube-only` | pass, 0.14 s | pass, 0.10 s | | `agc_driver_store_idle_results_tests --idle-epoch-wake` | pass, 0.34 s | pass, 0.27 s | The focused tests were then run on `main` and on the change from the same machine and GPU with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, using `ctest --test-dir build -R "agc_recorder|agc_driver_store_idle_results" -V`: - NVIDIA: `main` 7 passed, change 11 passed. `VUID-` errors: 0 before, 0 after. - Intel: `main` 7 passed, change 11 passed. `VUID-` errors: 0 before, 0 after. - Neither log contains "was not found but was requested by env var VK_INSTANCE_LAYERS". The four new tests run in 0.13 s to 0.36 s under the validation layer, well inside the 30 s budget. - Full build: `cmake --build build --parallel`, no error. - `ctest --test-dir build --output-on-failure -j4`: 1699 of 1700 pass. `guest_sysmodule` fails identically on `origin/main`, so it is a pre-existing failure and not a regression. - `python3 tools/check_conventions.py --base origin/main`: all conventions checks passed. - `python3 tools/check_test_registration.py build`: 1124 test executables, none unregistered. GPUs: NVIDIA GeForce RTX 4060 Laptop GPU, driver 615.78.08, CachyOS Linux 7.2.9-2-cachyos; Intel Iris Xe Graphics, Mesa 26.2.4 ANV, CachyOS Linux 7.2.9-2-cachyos. No title was run: the contributor has no PS5 and no game dumps. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: #1532 - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4060 Laptop GPU, driver 615.78.08, CachyOS Linux 7.2.9-2-cachyos; Intel Iris Xe Graphics, Mesa 26.2.4 ANV, CachyOS Linux 7.2.9-2-cachyos - [x] AI-assisted: yes
adriadam10 commented 2026-10-21 17:46:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T17:46:05Z.

Review: CHANGES_REQUESTED


Thanks for measuring every mode. One point to fix:

  • core/libs/prx/libSceAgcDriver/CMakeLists.txt:2038-2041: agc_driver_stencil_ref_export_unused_keep and _invert are already covered. The agcTest loop at CMakeLists.txt:2273 registers a no-argument ctest entry for every executable built from tests/execution/*.cpp, and the no-argument path of StencilRefExportUnused.cpp:241-244 runs IndependentReference(false) and IndependentReference(true), which is what --case keep and --case invert run. So DependentReference() was never the only thing missing there, and these two entries only duplicate a run. Please drop them (and their WIN32 PATH line) and correct the PR body, which says those cases never ran.

The three agc_driver_recorder_tests flag runs and agc_driver_store_idle_results_tests --idle-epoch-wake are new coverage (no no-argument run reaches those branches) and look right: flags exist, SKIP_RETURN_CODE 77, timeout and the Windows PATH are in place.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5603860444 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8445#pullrequestreview-5603860444). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-21T17:46:05Z. **Review:** CHANGES_REQUESTED --- Thanks for measuring every mode. One point to fix: - `core/libs/prx/libSceAgcDriver/CMakeLists.txt:2038-2041`: `agc_driver_stencil_ref_export_unused_keep` and `_invert` are already covered. The `agcTest` loop at `CMakeLists.txt:2273` registers a no-argument ctest entry for every executable built from `tests/execution/*.cpp`, and the no-argument path of `StencilRefExportUnused.cpp:241-244` runs `IndependentReference(false)` and `IndependentReference(true)`, which is what `--case keep` and `--case invert` run. So `DependentReference()` was never the only thing missing there, and these two entries only duplicate a run. Please drop them (and their `WIN32` `PATH` line) and correct the PR body, which says those cases never ran. The three `agc_driver_recorder_tests` flag runs and `agc_driver_store_idle_results_tests --idle-epoch-wake` are new coverage (no no-argument run reaches those branches) and look right: flags exist, `SKIP_RETURN_CODE 77`, timeout and the Windows `PATH` are in place.
juanpimg commented 2026-10-21 20:19:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by juanpimg on 2026-10-21T20:19:37Z.


You are right, and the duplication is gone.

The agcTest loop already registers a no-argument entry for every executable built from
tests/execution/*.cpp, and the no-argument path of StencilRefExportUnused.cpp runs
IndependentReference(false) and IndependentReference(true), which is what --case keep
and --case invert run. Both registrations only repeated that entry, so they and their
WIN32 PATH line are dropped.

What is left is the four runs that no no-argument entry reaches:

  • agc_driver_recorder_tests --completion-labels-only
  • agc_driver_recorder_tests --cmask-only
  • agc_driver_recorder_tests --cube-only
  • agc_driver_store_idle_results_tests --idle-epoch-wake

The PR body is corrected: it no longer claims the two stencil cases never ran, it states
that the no-argument entry already covers them, and the comparison against main was
measured again with the four registrations in place, so the counts read main 7 passed and
change 11 passed on both the NVIDIA and the Intel device, with 0 VUID- errors before and
after and no "was not found but was requested by env var VK_INSTANCE_LAYERS" in either log.

The six failing stencil cases stay out: they exit 1 on main with "a dependent reference
without native stencil export was admitted", on both devices, so registering them would put
a red job in CI. The driver is untouched. That failure is still worth a decision of its
own, and the details are in the comment I left on issue #4276.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6325660544 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8445#issuecomment-6325660544). Originally posted by [juanpimg](https://github.com/juanpimg) on 2026-10-21T20:19:37Z. --- You are right, and the duplication is gone. The `agcTest` loop already registers a no-argument entry for every executable built from `tests/execution/*.cpp`, and the no-argument path of `StencilRefExportUnused.cpp` runs `IndependentReference(false)` and `IndependentReference(true)`, which is what `--case keep` and `--case invert` run. Both registrations only repeated that entry, so they and their `WIN32` `PATH` line are dropped. What is left is the four runs that no no-argument entry reaches: - `agc_driver_recorder_tests --completion-labels-only` - `agc_driver_recorder_tests --cmask-only` - `agc_driver_recorder_tests --cube-only` - `agc_driver_store_idle_results_tests --idle-epoch-wake` The PR body is corrected: it no longer claims the two stencil cases never ran, it states that the no-argument entry already covers them, and the comparison against `main` was measured again with the four registrations in place, so the counts read `main` 7 passed and change 11 passed on both the NVIDIA and the Intel device, with 0 `VUID-` errors before and after and no "was not found but was requested by env var VK_INSTANCE_LAYERS" in either log. The six failing stencil cases stay out: they exit 1 on `main` with "a dependent reference without native stencil export was admitted", on both devices, so registering them would put a red job in CI. The driver is untouched. That failure is still worth a decision of its own, and the details are in the comment I left on issue #4276.
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
boykopovar/AnyPS5!8445
No description provided.