Skip to content

gpu: keep queue ordering tests independent of wait deadlines - #82

Open
fogydes wants to merge 1 commit into
mainfrom
codex/gpu-queue-ordering-tests
Open

fogydes wants to merge 1 commit into
mainfrom
codex/gpu-queue-ordering-tests

Conversation

@fogydes

@fogydes fogydes commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

What and why

Two queue-ordering tests assert that work stays held until another queue or a present releases it. The production four-second stuck-wait fallback can expire first on a busy machine and invalidate those assertions. Set the existing test-only wait_indefinitely flag on the three fresh queues involved.

This is five added lines in two tests. Their assertions and release paths are unchanged. Production deadlines and the dedicated isolated 50 ms fallback regression are unchanged.

Fixes: none; part of #54
Depends on: none

Area

xtp-gpu, crates/xtp-gpu/src/queue.rs tests only.

Tests

  • cargo xtask pr-check passes on my machine
  • New or changed behaviour has tests that need no game files, or I explain below why it cannot
  • Ran on a title: no

WARP, CARGO_BUILD_JOBS=4, shared target:

  • Default parallel cargo test --locked -p xtp-gpu --lib: 633 passed, 14 ignored.
  • Strict serial debug-layer run: 662 unit and 3 integration tests passed, 19 ignored. XTP_TEST_ADAPTER=warp, XTP_D3D12_DEBUG=1, XTP_REQUIRE_GPU=1; serial libtest scheduling was scoped to this run.
  • Normal-threaded six-stage workspace PR check: fmt, both warnings-denied Clippy configurations, tests, asset policy and conventions passed. Test-log totals: 1,671 passed, 69 ignored. Post-commit conventions also passed for the actual commit, PR title and this body.
  • Negative controls temporarily aged both waits beyond STUCK: both original tests failed at their held-state assertions; the patched tests passed. That temporary instrumentation is removed.
  • Independent source review found no blocker. Formatting and diff checks passed.

The initial merged-main suite failed these two tests; ten isolated runs each and three full reruns then passed before this patch. Those successes did not erase the failure. The aging controls establish deadline exposure, but do not prove the exact scheduling delay in the original run. Panic-safe cleanup after failed assertions is not added here.

Provenance

  • I wrote all of this change myself for XTP, or it only moves code already in XTP.
  • Some of it comes from elsewhere. Each source, its licence and the files concerned are listed here, and every licence is compatible with GPL-3.0-or-later:

AI assistance: Codex and regular subagents diagnosed the test deadline interaction, prepared the five-line change and negative controls, reviewed the source and ran the checks. No external implementation was copied.

Checklist

  • No game data, keys, console SDK code or headers, and nothing that circumvents DRM (asset policy)
  • No code copied from xcl or AnyPS5 (references only: read them to understand, write your own)
  • I agree to license this contribution under GPL-3.0-or-later
  • Title and every commit follow <area>: <summary>; one topic; under 400 changed lines, or the reason is above
  • Docs updated where behaviour, commands or variables changed (README, docs/): no public behaviour, command or variable changes

@fogydes
fogydes requested a review from simnJS November 26, 2026 04:37
@github-actions github-actions Bot added area/gpu touches crates/xtp-gpu size/XS under 10 changed lines labels Nov 26, 2026
@fogydes

fogydes commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

Independent review and maintainer verification record for exact head c03c77a1b76573ba1d68041bf29bb4ebecd6a17f (AI assisted):

  • A separate regular agent reviewed the final five-line diff and found no correctness blocker. Its review was source-only; execution evidence below was checked separately by the parent agent.
  • The three assignments affect only freshly created test queues. Both tests retain their existing output, held-state, release-path and cleanup assertions. Production wait deadlines and the isolated 50 ms fallback regression are unchanged.
  • Negative controls aged both waits beyond the production deadline: the old tests failed at the original held-state assertions, and the patched controls passed. Temporary aging was removed before publication. This establishes deadline exposure without claiming the exact delay in the initial failed suite.
  • Final parallel WARP library: 633 passed, 14 ignored. Strict debug-layer run: 662 unit plus 3 integration passed, 19 ignored. Full normal-threading workspace check: all six stages passed; 1,671 tests passed, 69 ignored. Post-commit conventions passed for the actual commit, title and body.
  • All current-head remote checks are now successful; the welcome job was skipped. No production behavior or hardware validation is claimed for this test-only change.

Residual limitation: cleanup after assertion panic has not been made panic-safe. Independent agent review is recorded here transparently; it is not a separate person's GitHub approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/gpu touches crates/xtp-gpu size/XS under 10 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant