test(agc): let APS5_SKIP_TIMING_TESTS drop the order-signal latency bound #23886

Merged
cocoa55 merged 1 commit from upstream-pr/23886 into main 2026-11-27 05:56:56 +00:00
cocoa55 commented 2026-11-19 20:48:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by cocoa55 on 2026-11-19T20:48:12Z.


What

agc_driver_pm4_order_signal (added in f33c71d512) requires a held submission to start within 0.1 ms (median) of queue 0 waiting on its label. Under ASan the wake takes about 0.13 ms on an i5-9400F, so the test fails in sanitizer builds although the ordering is right. With APS5_SKIP_TIMING_TESTS set, as the sanitizer job sets it, the test keeps its ordering checks and skips only the latency bound. docs/dev/ENVIRONMENT.md lists the new reader.

Tested

CachyOS, GCC 16, the sanitizer job's flags (ANYPS5_ENABLE_ASAN=ON, -fsanitize=undefined), on main 23786c4e4f:

  • APS5_SKIP_TIMING_TESTS=1: 3 of 3 runs pass.
  • unset: fails as before (median 0.137 ms, largest 0.281 ms).
  • Without sanitizers the test passes with the bound on.

tools/env_reference.py --check: all names documented.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file — n/a
  • 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 — n/a
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce GTX 1660, driver 615.78.08, Linux
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5402712589 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23886). Originally posted by [cocoa55](https://github.com/cocoa55) on 2026-11-19T20:48:12Z. --- ### What `agc_driver_pm4_order_signal` (added in f33c71d512) requires a held submission to start within 0.1 ms (median) of queue 0 waiting on its label. Under ASan the wake takes about 0.13 ms on an i5-9400F, so the test fails in sanitizer builds although the ordering is right. With `APS5_SKIP_TIMING_TESTS` set, as the sanitizer job sets it, the test keeps its ordering checks and skips only the latency bound. `docs/dev/ENVIRONMENT.md` lists the new reader. ### Tested CachyOS, GCC 16, the sanitizer job's flags (`ANYPS5_ENABLE_ASAN=ON`, `-fsanitize=undefined`), on `main` `23786c4e4f`: - `APS5_SKIP_TIMING_TESTS=1`: 3 of 3 runs pass. - unset: fails as before (`median 0.137 ms, largest 0.281 ms`). - Without sanitizers the test passes with the bound on. `tools/env_reference.py --check`: all names documented. ### Checklist - [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) and the licence notice of code adapted from upstream (see AGENTS.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 — n/a - [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 — n/a - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce GTX 1660, driver 615.78.08, Linux - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-20 10:51:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T10:51:39Z.

Review: APPROVED


Reviewed — looks good

The change at head 24ee5422d8e625c433d9634b4464b34f74ec6dc0 appears sound: the environment flag bypasses only the latency assertion, leaving the test’s ordering checks in place.

What I ran

  • Read the prepared description, commits, manifest, diff, and both changed files at the pinned head.
  • No commands or tests were run.

Results

Check Result Note
Changed-code review passed Both changed files read
Tests not run No test execution in this review

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • The author-reported test runs and environment-reference check were not independently run.
  • No files were excluded from review; both files marked changed in the manifest were read. files.json was not available through the review reader.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5991466945 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23886#pullrequestreview-5991466945). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T10:51:39Z. **Review:** APPROVED --- # Reviewed — looks good The change at head `24ee5422d8e625c433d9634b4464b34f74ec6dc0` appears sound: the environment flag bypasses only the latency assertion, leaving the test’s ordering checks in place. ## What I ran - Read the prepared description, commits, manifest, diff, and both changed files at the pinned head. - No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Changed-code review | passed | Both changed files read | | Tests | not run | No test execution in this review | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified - The author-reported test runs and environment-reference check were not independently run. - No files were excluded from review; both files marked `changed` in the manifest were read. `files.json` was not available through the review reader. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-20 19:53:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T19:53:28Z.

Review: APPROVED


Reviewed — looks good

The ordering checks remain active with APS5_SKIP_TIMING_TESTS; the variable skips only the latency assertion, and the matching environment table entry documents this behavior.

What I ran

Reviewed head 4d7432bbd21b0f53230638aeb241e4b094ec2d66 using the prepared diff and the pinned repository reader. No commands or tests were run.

Results

Check Result Note
Diff and targeted source review passed Both changed files and relevant test logic read
Tests not run No test execution available

Findings

Blocking

None.

Non-blocking

None.

Not verified

Runtime behavior and the author-reported sanitizer runs were not independently verified. The complete Pm4.cpp and ENVIRONMENT.md files were not read; targeted relevant sections were read. files.json was not available through the reader. The manifest lists both changed files as reviewed and included.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5998526902 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23886#pullrequestreview-5998526902). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T19:53:28Z. **Review:** APPROVED --- # Reviewed — looks good The ordering checks remain active with `APS5_SKIP_TIMING_TESTS`; the variable skips only the latency assertion, and the matching environment table entry documents this behavior. ## What I ran Reviewed head `4d7432bbd21b0f53230638aeb241e4b094ec2d66` using the prepared diff and the pinned repository reader. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Both changed files and relevant test logic read | | Tests | not run | No test execution available | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Runtime behavior and the author-reported sanitizer runs were not independently verified. The complete `Pm4.cpp` and `ENVIRONMENT.md` files were not read; targeted relevant sections were read. `files.json` was not available through the reader. The manifest lists both changed files as reviewed and included. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-22 23:11:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T23:11:58Z.

Review: APPROVED


Reviewed — looks good

The changed code preserves the order checks and makes the latency bound conditional on APS5_SKIP_TIMING_TESTS being set to a nonempty value not starting with 0.

What I ran

Reviewed head 34f589a2aab45640f7c84655b7111d41248c167d using repo_read.py to read the prepared diff and relevant source context. No tests were run.

Results

Check Result Note
Diff and changed source passed Both changed files read
Tests not run Author-reported results only

Findings

Blocking

None.

Non-blocking

None.

Not verified

The reported sanitizer and non-sanitizer runs were not independently verified. No other repository files were read; files.json was not available through the reader, so the manifest was used to identify the changed files. The manifest lists both changed files as included and reviewed.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6015035315 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23886#pullrequestreview-6015035315). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T23:11:58Z. **Review:** APPROVED --- # Reviewed — looks good The changed code preserves the order checks and makes the latency bound conditional on `APS5_SKIP_TIMING_TESTS` being set to a nonempty value not starting with `0`. ## What I ran Reviewed head `34f589a2aab45640f7c84655b7111d41248c167d` using `repo_read.py` to read the prepared diff and relevant source context. No tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and changed source | passed | Both changed files read | | Tests | not run | Author-reported results only | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The reported sanitizer and non-sanitizer runs were not independently verified. No other repository files were read; `files.json` was not available through the reader, so the manifest was used to identify the changed files. The manifest lists both changed files as included and reviewed. ## To get this to a good state Nothing is required.
malekaifa commented 2026-11-24 20:50:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-11-24T20:50:46Z.

Review: APPROVED


Reviewed exact head ea0de5181b9c68edc415f7919ddd67873a764d86.

This is the same focused diff previously reviewed across earlier rebases. testOrderHoldWake() still executes all 32 functional/order rounds before consulting APS5_SKIP_TIMING_TESTS: it waits for queue 0 to arm, observes the held queue start, waits for driver idle, and checks done == round every time. The environment switch returns only after those correctness checks and the latency report, so it suppresses just the host-scheduling-sensitive median < 0.1 ms assertion under the same nonempty/non-0 convention already used by PreciseWait.

The ENVIRONMENT.md row accurately records the additional reader. Existing sanitizer evidence reproduces the ~0.13 ms instrumentation overhead, while nonsanitized and independent GPU runs preserve the bound/no-regression behavior. Current hosted checks were still queued at review time, so this is an exact-head source decision rather than a claim about their completion.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6047183778 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23886#pullrequestreview-6047183778). Originally posted by [malekaifa](https://github.com/malekaifa) on 2026-11-24T20:50:46Z. **Review:** APPROVED --- Reviewed exact head `ea0de5181b9c68edc415f7919ddd67873a764d86`. This is the same focused diff previously reviewed across earlier rebases. `testOrderHoldWake()` still executes all 32 functional/order rounds before consulting `APS5_SKIP_TIMING_TESTS`: it waits for queue 0 to arm, observes the held queue start, waits for driver idle, and checks `done == round` every time. The environment switch returns only after those correctness checks and the latency report, so it suppresses just the host-scheduling-sensitive median `< 0.1 ms` assertion under the same nonempty/non-`0` convention already used by `PreciseWait`. The ENVIRONMENT.md row accurately records the additional reader. Existing sanitizer evidence reproduces the ~0.13 ms instrumentation overhead, while nonsanitized and independent GPU runs preserve the bound/no-regression behavior. Current hosted checks were still queued at review time, so this is an exact-head source decision rather than a claim about their completion. AI-assisted: yes
MarcZX10 commented 2026-11-25 08:51:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T08:51:31Z.

Review: COMMENTED


Reviewed — no blocking findings

The added guard preserves the ordering checks and skips only the latency bound when APS5_SKIP_TIMING_TESTS has a nonempty value not starting with 0; I found no blocking defect in the reviewed changes.

What I ran

Reviewed head ea0de5181b9c68edc415f7919ddd67873a764d86. No commands or tests were run; the reader tool was used to inspect the prepared diff and changed lines at the pinned head.

Results

Check Result Note
Changed lines reviewed passed Both added lines inspected
Tests not run Author-reported results not independently verified

Negative control

Not run; no test environment was available through the reader.

Findings

Blocking

None.

Non-blocking

None.

Sources

The changed lines were read in core/libs/prx/libSceAgcDriver/tests/Pm4.cpp and docs/dev/ENVIRONMENT.md at the pinned head. The diff adds the environment check after the ordering assertions and before the latency-bound check; the documentation records the same behavior.

Not verified

No tests or builds were run, and the author-reported sanitizer results were not independently verified. I read the added lines in both changed files, not their full contents. The manifest lists two changed files, both included; no exclusions were reported.

To get this to a good state

Nothing is required. The optional next step is to run the reported sanitizer and non-sanitizer checks on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6054418142 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23886#pullrequestreview-6054418142). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T08:51:31Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The added guard preserves the ordering checks and skips only the latency bound when `APS5_SKIP_TIMING_TESTS` has a nonempty value not starting with `0`; I found no blocking defect in the reviewed changes. ## What I ran Reviewed head `ea0de5181b9c68edc415f7919ddd67873a764d86`. No commands or tests were run; the reader tool was used to inspect the prepared diff and changed lines at the pinned head. ## Results | Check | Result | Note | |---|---|---| | Changed lines reviewed | passed | Both added lines inspected | | Tests | not run | Author-reported results not independently verified | ## Negative control Not run; no test environment was available through the reader. ## Findings ### Blocking None. ### Non-blocking None. ## Sources The changed lines were read in `core/libs/prx/libSceAgcDriver/tests/Pm4.cpp` and `docs/dev/ENVIRONMENT.md` at the pinned head. The diff adds the environment check after the ordering assertions and before the latency-bound check; the documentation records the same behavior. ## Not verified No tests or builds were run, and the author-reported sanitizer results were not independently verified. I read the added lines in both changed files, not their full contents. The manifest lists two changed files, both included; no exclusions were reported. ## To get this to a good state Nothing is required. The optional next step is to run the reported sanitizer and non-sanitizer checks on this head.
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!23886
No description provided.