tests: cover FrozenComputeRequests eviction, capacity bounds, and concurrency #3744
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!3744
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3742"
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 13:53 UTC · original
Ammmae0x:tests/frozen-compute-requests→main· +1056 −0 · 5 files · 3 commits · merged 2026-12-01 17:07 UTCRefs #1149
Portable C++17 unit, boundary, concurrency, and mutation tests for
src/frozen_compute_requests.h(x2w::FrozenComputeRequests), with zero edits to existing files (5 new files only).tests/frozen_compute_requests_check.cpp: 20 cases pinningenabled()budgets, the exact byte budget (a request charging exactlymax_bytesfits, one byte over is refused without evicting), FIFO entry eviction and single/multi-entry byte eviction, duplicate-key early return before eviction (under entry and byte pressure) versus re-insert aftertake(), caller-mutation isolation andstats()accounting (hits, misses, evicted, bytes, entries),take()restoring byte headroom,wave32detection from state block A byte 18 (set, clear, bit variants, short blocks), and multi-threaded contention (distinct keys, same-key puts, same-key takes). Charges are measured viastats().bytes, never assumed, so the exact-fit cases hold on any standard library.tests/cmake/frozen_compute_requests.cmake: per-case tests plusfrozen_compute_requests_alland 6WILL_FAIL TRUEcontrols against real copied headers (enabled-bytes, byte-guard, duplicate, evicted-counter, wave32-assign, take-bytes).tests/frozen_compute_requests_meta_check.py: contract audit plus native g++ run (all cases together and singly, 1:1 real mutated header copies, zero model-only mutants).tests/checks/python-linux/frozen_compute_requests.txtanddocs/experiments/frozen-compute-requests.md.Linux checks (this host, g++ 13): meta check
PASS: frozen compute requests: 20 cases, 6/6 mutations killed (g++); form/docs/bidi pass (208 files/802 links, 2826 files); parallel runner 90/90; scratch CMake + CTest 27/27;git diff --checkclean. One flag is downgraded, and only that one: the unmodifiedsrc/shader_compute_request.cpptriggers-Wmissing-field-initializerson g++ 13, so the native compile adds-Wno-error=missing-field-initializers. No mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter.AI-assisted.
Windows Verification (
d91bbf8b)git merge-tree --write-tree upstream/main HEAD->17345441(exit 0),git diff --checkcleanpy_compile,form_coverage_check.py,docs_links_check.py(209 files, 806 links),bidi_controls_check.py(2829 files) passeddev27/27 passed (1.07s);release27/27 passed (0.90s);frozen_compute_requests_check:PASS: frozen_compute_requests: 20/20 cases passed. AI-assisted.@Leyukaka on GitHub · 2026-12-01 14:20 UTC · original · reviewed
Please derive the byte_eviction_multi budget from reachable fixture charges. with_charged assumes increasing the code length can produce every integer charge. MSVC rounds char string capacities using a mask of 15. The six copied strings in this fixture then charge 202 bytes for the base request and can only produce charges congruent to 10 modulo 16. The target of 404 is unreachable, so this test throws before it checks eviction.
One option is to measure a larger fixture, set the budget to its measured charge, and require that two small entries fit before inserting it. That still checks that insertion evicts both entries and leaves the expected byte count.