test(agc): fail the required nonzero-lead CPU publish lane with its reason on Windows #12168

Merged
dantdmdarealguy merged 1 commit from upstream-pr/12168 into main 2026-10-29 12:50:13 +00:00
dantdmdarealguy commented 2026-10-28 01:02:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by dantdmdarealguy on 2026-10-28T01:02:02Z.


What

-DANYPS5_REQUIRE_CPU_LEAD_TEST=ON registers agc_driver_sparse_dma_buf_cpu_lead, which runs agc_driver_sparse_dma_buf_import_tests --require-cpu-lead with no SKIP_RETURN_CODE. The option was added in #9521 (debfe27cde) as a lane that "fails instead of skipping when the nonzero-lead dma-buf CPU publish cannot run". On Linux every skip in that mode prints required lane: the skip above is a failure, the nonzero-lead CPU publish was not exercised and exits 1. On Windows, main (SparseDmaBufImport.cpp:28) ignores the argument, prints only skipped, udmabuf imports are Linux only and exits 77. So the lane is reported as Failed, but nothing says why.

The Windows main now uses the same SkipCode as the Linux skips. With --require-cpu-lead it prints the required-lane line and exits 1. Without it, it still skips with 77. SkipCode moves above the #ifdef _WIN32 unchanged, and the Linux code is otherwise unchanged.

The lane stays registered on Windows. If it were registered only on Linux, ON would register nothing on Windows and ctest -R cpu_lead would report no tests and exit 0. That is the silent pass the option exists to rule out.

No CMake change. #11437 (macOS guards) edits the same #ifdef _WIN32 lines (L26-28) and will conflict textually. Whichever merges second rebases; SkipCode sits outside the platform guard, so it also serves #11437's #ifndef __linux__ path.

Tested

Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0, Release, -DANYPS5_REQUIRE_CPU_LEAD_TEST=ON. ctest --test-dir build -R agc_driver_sparse_dma_buf --output-on-failure:

  • main: agc_driver_sparse_dma_buf_cpu_lead fails and prints only skipped, udmabuf imports are Linux only. Run directly, the binary exits 77.
  • This change: agc_driver_sparse_dma_buf_cpu_lead fails and prints skipped, udmabuf imports are Linux only followed by required lane: the skip above is a failure, the nonzero-lead CPU publish was not exercised. The binary exits 1.
  • agc_driver_sparse_dma_buf_import is Skipped (exit 77) on both.
  • With the option at its default OFF: agc_driver_sparse_dma_buf_import is skipped and patched_libraries passes. cpu_lead is not registered, on main and on the change.
  • Validation runs: ctest -V -R agc_driver_sparse_dma_buf on main and on the change, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1. Neither log has the missing-layer line or any VUID-. The Windows path returns before opening a device.

Arch Linux WSL2, GCC 16.1.1, Release, -DANYPS5_REQUIRE_CPU_LEAD_TEST=ON. I configured main and the change separately. The 181 CTestTestfile.cmake files and their 2575 add_test lines are identical once the build directory names are made the same. There is no /dev/udmabuf there, and ctest -V -R agc_driver_sparse_dma_buf gives identical output on both: skipped, host imports are unavailable: /dev/udmabuf is not accessible, then the required-lane line, cpu_lead Failed, the default test Skipped.

The nonzero-lead publish itself is not exercised here: that needs a Linux device that imports dma-buf memory.

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: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5080, driver 32.0.16.1742, Windows 11 Pro (the Windows path returns before opening a device); no device on Arch Linux WSL2
  • AI-assisted: yes, some AI assistance was used
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5043480068 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12168). Originally posted by [dantdmdarealguy](https://github.com/dantdmdarealguy) on 2026-10-28T01:02:02Z. --- ### What `-DANYPS5_REQUIRE_CPU_LEAD_TEST=ON` registers `agc_driver_sparse_dma_buf_cpu_lead`, which runs `agc_driver_sparse_dma_buf_import_tests --require-cpu-lead` with no `SKIP_RETURN_CODE`. The option was added in #9521 (debfe27cde) as a lane that "fails instead of skipping when the nonzero-lead dma-buf CPU publish cannot run". On Linux every skip in that mode prints `required lane: the skip above is a failure, the nonzero-lead CPU publish was not exercised` and exits 1. On Windows, `main` (`SparseDmaBufImport.cpp:28`) ignores the argument, prints only `skipped, udmabuf imports are Linux only` and exits 77. So the lane is reported as `Failed`, but nothing says why. The Windows `main` now uses the same `SkipCode` as the Linux skips. With `--require-cpu-lead` it prints the required-lane line and exits 1. Without it, it still skips with 77. `SkipCode` moves above the `#ifdef _WIN32` unchanged, and the Linux code is otherwise unchanged. The lane stays registered on Windows. If it were registered only on Linux, `ON` would register nothing on Windows and `ctest -R cpu_lead` would report no tests and exit 0. That is the silent pass the option exists to rule out. No CMake change. #11437 (macOS guards) edits the same `#ifdef _WIN32` lines (L26-28) and will conflict textually. Whichever merges second rebases; `SkipCode` sits outside the platform guard, so it also serves #11437's `#ifndef __linux__` path. ### Tested Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0, Release, `-DANYPS5_REQUIRE_CPU_LEAD_TEST=ON`. `ctest --test-dir build -R agc_driver_sparse_dma_buf --output-on-failure`: - `main`: `agc_driver_sparse_dma_buf_cpu_lead` fails and prints only `skipped, udmabuf imports are Linux only`. Run directly, the binary exits 77. - This change: `agc_driver_sparse_dma_buf_cpu_lead` fails and prints `skipped, udmabuf imports are Linux only` followed by `required lane: the skip above is a failure, the nonzero-lead CPU publish was not exercised`. The binary exits 1. - `agc_driver_sparse_dma_buf_import` is `Skipped` (exit 77) on both. - With the option at its default `OFF`: `agc_driver_sparse_dma_buf_import` is skipped and `patched_libraries` passes. `cpu_lead` is not registered, on `main` and on the change. - Validation runs: `ctest -V -R agc_driver_sparse_dma_buf` on `main` and on the change, with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`. Neither log has the missing-layer line or any `VUID-`. The Windows path returns before opening a device. Arch Linux WSL2, GCC 16.1.1, Release, `-DANYPS5_REQUIRE_CPU_LEAD_TEST=ON`. I configured `main` and the change separately. The 181 `CTestTestfile.cmake` files and their 2575 `add_test` lines are identical once the build directory names are made the same. There is no `/dev/udmabuf` there, and `ctest -V -R agc_driver_sparse_dma_buf` gives identical output on both: `skipped, host imports are unavailable: /dev/udmabuf is not accessible`, then the required-lane line, `cpu_lead` `Failed`, the default test `Skipped`. The nonzero-lead publish itself is not exercised here: that needs a Linux device that imports dma-buf memory. ### 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: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 5080, driver 32.0.16.1742, Windows 11 Pro (the Windows path returns before opening a device); no device on Arch Linux WSL2 - [x] AI-assisted: yes, some AI assistance was used
MarcZX10 commented 2026-10-28 03:37:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T03:37:24Z.

Review: CHANGES_REQUESTED


The behavior change is coherent: Windows now emits the required-lane diagnostic and returns failure only when --require-cpu-lead is set, while the default path still returns the skip code. The reported Windows and Linux controls demonstrate the intended distinction; no nonzero-lead publish itself was exercised because the available Linux host has no /dev/udmabuf. Exact-head conventions and diff checks pass, and the merge preview into current main is clean; hosted Windows passes and Linux is path-skipped.

There are two repository follow-ups before merge:

  • Open #11437 changes the same file and git merge-tree confirms a content conflict between the two heads. CONTRIBUTING.md requires the authors to coordinate merge order and record the dependency. Please agree which PR lands first and set Depends on: #11437 or none accordingly (and update #11437 if needed).
  • This branch is based on cccdaa2, 31 upstream commits behind current main; please rebase onto current main after coordinating the overlap and rerun the focused checks.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5677498069 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12168#pullrequestreview-5677498069). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T03:37:24Z. **Review:** CHANGES_REQUESTED --- The behavior change is coherent: Windows now emits the required-lane diagnostic and returns failure only when `--require-cpu-lead` is set, while the default path still returns the skip code. The reported Windows and Linux controls demonstrate the intended distinction; no nonzero-lead publish itself was exercised because the available Linux host has no `/dev/udmabuf`. Exact-head conventions and diff checks pass, and the merge preview into current `main` is clean; hosted Windows passes and Linux is path-skipped. There are two repository follow-ups before merge: - Open #11437 changes the same file and `git merge-tree` confirms a content conflict between the two heads. `CONTRIBUTING.md` requires the authors to coordinate merge order and record the dependency. Please agree which PR lands first and set `Depends on: #11437` or `none` accordingly (and update #11437 if needed). - This branch is based on `cccdaa2`, 31 upstream commits behind current `main`; please rebase onto current `main` after coordinating the overlap and rerun the focused checks.
MarcZX10 commented 2026-10-28 10:05:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T10:05:20Z.

Review: CHANGES_REQUESTED


Blocking follow-ups: (1) open #11437 conflicts in SparseDmaBufImport.cpp; the checklist says Depends on: none, and the authors have not recorded an agreed order. Please coordinate and update both PR checklists. (2) Current main is 3a40945e62; this head is 468 commits behind it (merge base cccdaa2734). Rebase after resolving the overlap and rerun the focused CPU-lead lane checks. The hosted Linux check is skipped; Windows cannot validate the Linux udmabuf execution path.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5680883842 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12168#pullrequestreview-5680883842). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T10:05:20Z. **Review:** CHANGES_REQUESTED --- Blocking follow-ups: (1) open #11437 conflicts in `SparseDmaBufImport.cpp`; the checklist says `Depends on: none`, and the authors have not recorded an agreed order. Please coordinate and update both PR checklists. (2) Current `main` is `3a40945e62`; this head is 468 commits behind it (merge base `cccdaa2734`). Rebase after resolving the overlap and rerun the focused CPU-lead lane checks. The hosted Linux check is skipped; Windows cannot validate the Linux udmabuf execution path.
MarcZX10 commented 2026-10-29 06:09:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T06:09:12Z.

Review: APPROVED


Re-checked — approved

What I checked

  • Reviewed exact head 5850210d062d6751146e4ea74d8f6dab4955f76e against fetched main 2960e9a6e7.
  • The only changed file makes the required CPU-lead lane return failure when the platform skips the udmabuf test, while retaining the ordinary skip code by default. The current-main merge preview is clean and git diff --check is clean; main has not changed this file since the branch's refresh.
  • The author and #11437's author agreed #12168 first; #11437 records Depends on: #12168, so this PR correctly keeps Depends on: none. Hosted Windows, conventions, eligibility, and report checks pass; Linux and specialized jobs were skipped.

Test evidence

The author reports the --require-cpu-lead test failing as intended on Windows and on Linux without /dev/udmabuf, and confirms the default path remains skipped. The actual nonzero-lead publish was not exercised because no Linux udmabuf device was available; this test-only change explicitly makes that absence fail in the required lane rather than reporting a false pass. I did not run the platform tests locally.

The earlier order and current-file follow-ups are resolved. No blocking issue remains.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693560708 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12168#pullrequestreview-5693560708). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T06:09:12Z. **Review:** APPROVED --- # Re-checked — approved ## What I checked - Reviewed exact head `5850210d062d6751146e4ea74d8f6dab4955f76e` against fetched `main` `2960e9a6e7`. - The only changed file makes the required CPU-lead lane return failure when the platform skips the udmabuf test, while retaining the ordinary skip code by default. The current-main merge preview is clean and `git diff --check` is clean; `main` has not changed this file since the branch's refresh. - The author and #11437's author agreed #12168 first; #11437 records `Depends on: #12168`, so this PR correctly keeps `Depends on: none`. Hosted Windows, conventions, eligibility, and report checks pass; Linux and specialized jobs were skipped. ## Test evidence The author reports the `--require-cpu-lead` test failing as intended on Windows and on Linux without `/dev/udmabuf`, and confirms the default path remains skipped. The actual nonzero-lead publish was not exercised because no Linux udmabuf device was available; this test-only change explicitly makes that absence fail in the required lane rather than reporting a false pass. I did not run the platform tests locally. The earlier order and current-file follow-ups are resolved. No blocking issue remains.
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!12168
No description provided.