tests: cover upload_reservation queues, recycling, snapshot pools, and totals #3780
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3780
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3778"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Ammmae0x on GitHub · 2026-12-01 19:26 UTC · original
Ammmae0x:tests/upload-reservation-unit→main· +1652 −0 · 5 files · 1 commits · merged 2026-12-02 12:12 UTCRefs #1149.
Standalone portable C++17 unit + 1:1 header-mutation tests for
upload_reservation(src/startup_stubs/upload_reservation.h), 5 new files only (+1652/-0), zero edits elsewhere;tests/upload_reservation_check.cppandCMakeLists.txtuntouched, disjoint prefixupload_reservation_unit.21 cases:
UploadQueue(stickyUINT64_MAXunsignalled bit across later signalled submits;completed()with target 0 and a null fence, targetUINT64_MAX, aUINT64_MAXfence, and<vs==vs>; signalled value and mask incl. bit 39),hold()duplicate no double-count,discard_upload_chunksclearing the mask and both pools (indices 32..39),release_upload_chunks_at_submit+resubmitted_upload_chunksintact vs recycled (incl. the 31/39 boundary),SnapshotPoolTotals(note_reservedused - recycled + rounded and high water,note_refusalskippinginvalid_sizeand stopping at 8 logged while counting all,report()),reserve_upload_chunkexact capacity and overflow-safe subtraction,reuse_upload_chunkblocking on recordings or an incomplete queue, bumping generation, and incrementingtotals->reservationsonce, andreserve_existing_upload_chunkpreferring an unused tail before recycling (then the first completed chunk).6
WILL_FAIL TRUECMake header-mutation controls, mirrored 1:1 in the meta check:unsignaled_sticky,fence_max_complete,resubmit_gen_check,refusal_log_budget,reuse_rec_guard,reuse_double_count.Linux verification (this host,
g++ -std=c++17 -O2 -Wall -Wextra -Wpedantic -Werror):PASS: upload_reservation_unit: 21 cases, 6/6 mutations killed (g++)100% tests passed, 0 tests failed out of 28(21 per-case + all + 6 mutation controls)form_coverage_check.pypasses,docs_links_check.pypasses (225 files, 874 links),bidi_controls_check.pypasses (2877 files),git diff --checkclean, merge-tree exits 0python-linuxsuite (tools/run_checks_parallel.py, from the CI workflow):all 316 checks passedWindows Verification (
65ff0403b9ee95cc9b6443e32328d93b846f7b05)AI-assisted.
@R0Y00 on GitHub · 2026-12-02 12:11 UTC · original · approved these changes
I checked the five-file test-only diff and the merge against current main. The fixture uses a synthetic fence and preserves the existing runtime and test suite. On Windows with MSVC,
python -B tests/upload_reservation_unit_meta_check.pypassed all 21 cases and caught all 6 one-line mutations, including the sticky unsignalled fence and double-counted recycling controls. The required Windows job and both Linux jobs passed.