tests: cover ViewHeapSelection and ComputeTables state and bounds #3757
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!3757
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3755"
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 16:13 UTC · original
Ammmae0x:tests/list-compute-root-unit→main· +1231 −0 · 5 files · 1 commits · merged 2026-12-01 17:05 UTCRefs #1149.
Standalone portable C++17 unit, boundary, and 1:1 header-mutation tests for
x2w_startup::ViewHeapSelectionandx2w_startup::ComputeTablesinsrc/startup_stubs/list_compute_root.h, with zero edits to existing files (5 new files only, +1231/-0; disjointlist_compute_root_unitprefix,tests/startup_compute_root.cppandCMakeLists.txtuntouched).ViewHeapSelection::note()(9 cases): defaults;logical == desktop(and below) selects nothing vslogical == desktop + 1selecting the graphics heap only; a shader-visible note updates compute without clobbering graphics and vice versa; both sides from one note; a later note replacing the selected heaps.ComputeTables(11 cases): initialsignature() == nullptrwith empty slots0..15; valid sets at 0 and 15 and an overwrite at 7; the same signature or heap, andnullptrover an unset signature, keeping the tables; a different signature,nullptrover a set signature, or a different view heap clearing all 16 slots while keepingout_of_range_count()and the active signature;set_tableat 16 andUINT_MAXrefused and counted,table()past the range returning{0, 0}, and the refusal count surviving a signature change.Mutation controls: 6
WILL_FAIL TRUECMake header-copy controls (heap_strict_gt,compute_shader_visible,sig_change_clear,heap_change_clear,param_upper_bound,out_of_range_counter) mirrored 1:1 intests/list_compute_root_unit_meta_check.py, which compiles and runs the real C++ check withg++(orcl) and every mutant against a real C++ copy.Caught in development: the
compute_shader_visiblemutant leftshader_visibleunused, tripping-Werror=unused-parameter, so its replacement keeps it via(void)shader_visible; loosening the parameter bound (>=to>) letset_table(16)write past the 16-entry array and abort under the stack protector, which CTest does not invert forWILL_FAIL, so that bound is mutated from the valid side instead (>= max_parameters - 1, caught bytables_set_table_ends).Verification (Linux, this host,
g++ -std=c++17):Scratch CMake + CTest (standalone configure of the fragment, via symlinked
src/tests; the full configure needs DXC, unavailable on Linux):That is 20 per-case tests,
list_compute_root_unit_all, and the 6WILL_FAIL TRUEmutation controls.form_coverage_check.pypasses,docs_links_check.pypasses (208 files, 802 links),bidi_controls_check.pypasses (2827 files),git diff --checkis clean, merge-tree exits 0, and the fullpython-linuxsuite (tools/run_checks_parallel.py, from the CI workflow) passes with this check included:No mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter.
Windows Verification (
30d19cba)git merge-tree --write-tree upstream/main HEAD->3f8e3423(exit 0),git diff --check upstream/main...HEADcleanpy_compile,form_coverage_check.py,docs_links_check.py(209 files, 806 links),bidi_controls_check.py(2830 files),list_compute_root_unit_meta_check.py(cl:20 cases, 6/6 mutations killed) passeddev27/27 passed (1.10s);release27/27 passed (0.93s); directlist_compute_root_unit_check.exe(dev&release):PASS: list_compute_root_unit: 20/20 cases passed. AI-assisted.