darner-gpu: a queue-test wait that is never told fails instead of spinning #586

Open
qnjk wants to merge 1 commit from qnjk/Darner:queue-test-bounded-wait into Main
Contributor

Contributor role (optional)

  • Fluxer ID:

What it changes

  • The problem on main: the_title_goes_on_and_is_told_in_order waited on the line with a bare while ... { yield_now() } in two places — for the submission a fence stands behind, and for the wait it pushes behind that fence once it is set (crates/darner-gpu/src/queue/behind.rs, around :1595 and :1620). A condition that never came did not fail the test: it spun for ever. cargo test has no per-test timeout, so one line that stopped telling the test hung the whole workspace gate with no output saying why — which is what a test report of a hang should never be.

  • This change puts both waits through one within helper: five seconds, then a failure naming what was waited for and what the line is. Tests-only: the production queue is untouched.

How it was tested

  • Tested revision: 1b376c6 (one commit on c8258f9).
  • Commands and results:
    • cargo test --locked -p darner-gpu --lib -- queue:: — 27 passed, 0 failed.
    • The change is a test-time bound, so the fail-before is the opposite direction: a wait that is not told now fails after five seconds with the name of what it waited for, instead of spinning. The helper is used by both waits, so neither can regress into a bare spin silently.
    • cargo clippy --locked -p darner-gpu --all-targets -- -D warnings passes.
  • Changes a default: no — tests only.
  • A/B result: not applicable — tests-only change, no speed claim.
  • Gates run on that revision:
    • Gate 1, cargo clippy --workspace --all-targets --locked -- -D warnings: passes.
    • Gate 2, cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passes.
    • Gate 3, cargo test --workspace --locked: this change makes the gate diagnosable, not green — darner-gpu still has the pre-existing order-dependent failures and the #224 deadlock, which is why the whole-workspace run is not green on this machine.
  • Gameplay, when relevant: not applicable — tests-only.
  • Shader wave sizes tested, when relevant: not applicable.
  • Hardware dependence: none. The bound is five seconds on any machine; the timing-sensitive part is what the test already asserts.
  • Coverage gaps: the two waits are bounded, but other tests in the crate may still spin; this change only covers the one that hung.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
    • Not applicable: tests-only change, stated at the top.
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md. (cargo xtask policy: 576 files ok.)
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #530, #561 and #93 change crates/darner-gpu/src/queue/behind.rs too; this change only touches the test module. No open or closed issue mentions a hanging queue test by name.
  • Replaces or overlaps: none found
## Contributor role (optional) - Fluxer ID: ## What it changes - The problem on main: `the_title_goes_on_and_is_told_in_order` waited on the line with a bare `while ... { yield_now() }` in two places — for the submission a fence stands behind, and for the wait it pushes behind that fence once it is set (`crates/darner-gpu/src/queue/behind.rs`, around `:1595` and `:1620`). A condition that never came did not fail the test: it spun for ever. `cargo test` has no per-test timeout, so one line that stopped telling the test hung the **whole workspace gate** with no output saying why — which is what a test report of a hang should never be. - This change puts both waits through one `within` helper: five seconds, then a failure naming what was waited for and what the line is. Tests-only: the production queue is untouched. ## How it was tested - Tested revision: `1b376c6` (one commit on `c8258f9`). - Commands and results: - `cargo test --locked -p darner-gpu --lib -- queue::` — 27 passed, 0 failed. - The change is a test-time bound, so the fail-before is the opposite direction: a wait that is not told now fails after five seconds with the name of what it waited for, instead of spinning. The helper is used by both waits, so neither can regress into a bare spin silently. - `cargo clippy --locked -p darner-gpu --all-targets -- -D warnings` passes. - Changes a default: no — tests only. - A/B result: not applicable — tests-only change, no speed claim. - Gates run on that revision: - Gate 1, `cargo clippy --workspace --all-targets --locked -- -D warnings`: passes. - Gate 2, `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: passes. - Gate 3, `cargo test --workspace --locked`: this change makes the gate *diagnosable*, not green — `darner-gpu` still has the pre-existing order-dependent failures and the #224 deadlock, which is why the whole-workspace run is not green on this machine. - Gameplay, when relevant: not applicable — tests-only. - Shader wave sizes tested, when relevant: not applicable. - Hardware dependence: none. The bound is five seconds on any machine; the timing-sensitive part is what the test already asserts. - Coverage gaps: the two waits are bounded, but other tests in the crate may still spin; this change only covers the one that hung. ## Checklist - [x] I ran this change in the game, or say below why it can't be (docs, tests only). - Not applicable: tests-only change, stated at the top. - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. (`cargo xtask policy`: 576 files ok.) - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #530, #561 and #93 change `crates/darner-gpu/src/queue/behind.rs` too; this change only touches the test module. No open or closed issue mentions a hanging queue test by name. - Replaces or overlaps: none found
`the_title_goes_on_and_is_told_in_order` waited on the line with a bare
`while ... { yield_now() }` in two places: for the submission a fence stands
behind, and for the wait it pushes behind that fence once it is set. A
condition that never came did not fail the test: it spun for ever, and
`cargo test` has no per-test timeout, so one line that stopped telling the
test hung the whole workspace gate with no output to say why. Both waits now
go through `within`, which gives the line five seconds and then fails naming
what was waited for.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
TrustNo1 changed title from [pr-tests] darner-gpu: a queue-test wait that is never told fails instead of spinning to darner-gpu: a queue-test wait that is never told fails instead of spinning 2026-12-06 03:26:50 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'queue-test-bounded-wait:qnjk-queue-test-bounded-wait'
git switch 'qnjk-queue-test-bounded-wait'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'Main'
git merge --no-ff 'qnjk-queue-test-bounded-wait'
git switch 'qnjk-queue-test-bounded-wait'
git rebase 'Main'
git switch 'Main'
git merge --ff-only 'qnjk-queue-test-bounded-wait'
git switch 'qnjk-queue-test-bounded-wait'
git rebase 'Main'
git switch 'Main'
git merge --no-ff 'qnjk-queue-test-bounded-wait'
git switch 'Main'
git merge --squash 'qnjk-queue-test-bounded-wait'
git switch 'Main'
git merge --ff-only 'qnjk-queue-test-bounded-wait'
git switch 'Main'
git merge 'qnjk-queue-test-bounded-wait'
git push origin 'Main'
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!586
No description provided.