tests: cover IndirectCrossListCopy coalescing, sweeps, and resets #3746

Manually merged
github merged 2 commits from github-bot/gh-3744 into main 2026-12-01 17:11:21 +00:00 AGit
Owner

@⁠Ammmae0x on GitHub · 2026-12-01 14:05 UTC · original
Ammmae0x:tests/indirect-cross-list-unit → main · +1298 −0 · 5 files · 2 commits · merged 2026-12-01 17:07 UTC

Refs #1149

Portable C++17 unit, boundary, concurrency, and mutation tests for src/startup_stubs/indirect_cross_list_copy.h (x2w_startup::IndirectCrossListCopy), with zero edits to existing files (5 new files only).

  • tests/indirect_cross_list_unit_check.cpp: 30 cases pinning record() ignoring a zero resource, zero bytes and overflowing ranges, the exact-fit record at the top of the address space, and coalescing of adjacent, overlapping, contained, reverse-order, separated and bridging intervals; reset() dropping only one list's pending ranges; submit() merging a list's pending ranges and leaving other lists pending; recording_covers() sweeping pending and committed ranges together; covers() reading only the committed set; forget_resource() erasing a resource from both stores, a reused key starting clean, and an older recording not repopulating the committed set; the indirect_cross_list_enabled truth table; and multi-threaded contention across all six operations.
  • tests/cmake/indirect_cross_list_unit.cmake: per-case tests plus indirect_cross_list_unit_all and 6 WILL_FAIL TRUE controls against real copied headers (zero-resource record, adjacent insert, merged-minimum begin, reset-clears-all, submit-no-merge, covers-exact-end).
  • tests/indirect_cross_list_unit_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/indirect_cross_list_unit.txt and docs/experiments/indirect-cross-list-unit.md.

Linux checks (this host, g++ 13): meta check PASS: indirect_cross_list_unit: 30 cases, 6/6 mutations killed (g++); form/docs/bidi pass (208 files/802 links, 2827 files); scratch CMake + CTest 37/37; git diff --check clean; merge-tree exits 0; zero personal paths. No mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter.

AI-assisted.

Windows Verification (be22089a)

  • git merge-tree --write-tree upstream/main HEAD -> 5439b840 (exit 0), git diff --check clean
  • Python checks: py_compile, form_coverage_check.py, docs_links_check.py (209 files, 806 links), bidi_controls_check.py (2830 files) passed
  • Commands:
cmake --build --preset dev --target indirect_cross_list_unit_check indirect_cross_list_unit_record_zero_resource_mut indirect_cross_list_unit_insert_adjacent_mut indirect_cross_list_unit_insert_min_begin_mut indirect_cross_list_unit_reset_clears_all_mut indirect_cross_list_unit_submit_no_merge_mut indirect_cross_list_unit_covers_exact_end_mut
ctest --preset dev --no-tests=error -R "^indirect_cross_list_unit" --output-on-failure
cmake --build --preset release --target indirect_cross_list_unit_check indirect_cross_list_unit_record_zero_resource_mut indirect_cross_list_unit_insert_adjacent_mut indirect_cross_list_unit_insert_min_begin_mut indirect_cross_list_unit_reset_clears_all_mut indirect_cross_list_unit_submit_no_merge_mut indirect_cross_list_unit_covers_exact_end_mut
ctest --preset release --no-tests=error -R "^indirect_cross_list_unit" --output-on-failure
  • Results: dev 37/37 passed (1.11s); release 37/37 passed (1.17s); indirect_cross_list_unit_check: PASS: indirect_cross_list_unit: 30/30 cases passed. AI-assisted.
**@⁠Ammmae0x** on GitHub · 2026-12-01 14:05 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3744) `Ammmae0x:tests/indirect-cross-list-unit` → `main` · +1298 −0 · 5 files · 2 commits · merged 2026-12-01 17:07 UTC Refs #1149 Portable C++17 unit, boundary, concurrency, and mutation tests for `src/startup_stubs/indirect_cross_list_copy.h` (`x2w_startup::IndirectCrossListCopy`), with zero edits to existing files (5 new files only). - `tests/indirect_cross_list_unit_check.cpp`: 30 cases pinning `record()` ignoring a zero resource, zero bytes and overflowing ranges, the exact-fit record at the top of the address space, and coalescing of adjacent, overlapping, contained, reverse-order, separated and bridging intervals; `reset()` dropping only one list's pending ranges; `submit()` merging a list's pending ranges and leaving other lists pending; `recording_covers()` sweeping pending and committed ranges together; `covers()` reading only the committed set; `forget_resource()` erasing a resource from both stores, a reused key starting clean, and an older recording not repopulating the committed set; the `indirect_cross_list_enabled` truth table; and multi-threaded contention across all six operations. - `tests/cmake/indirect_cross_list_unit.cmake`: per-case tests plus `indirect_cross_list_unit_all` and 6 `WILL_FAIL TRUE` controls against real copied headers (zero-resource record, adjacent insert, merged-minimum begin, reset-clears-all, submit-no-merge, covers-exact-end). - `tests/indirect_cross_list_unit_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/indirect_cross_list_unit.txt` and `docs/experiments/indirect-cross-list-unit.md`. Linux checks (this host, g++ 13): meta check `PASS: indirect_cross_list_unit: 30 cases, 6/6 mutations killed (g++)`; form/docs/bidi pass (208 files/802 links, 2827 files); scratch CMake + CTest 37/37; `git diff --check` clean; merge-tree exits 0; zero personal paths. No mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter. AI-assisted. <!-- WIN-VERIFY: passed | sha=be22089ad635783988d96fd5d3755bf836842260 | targets=indirect_cross_list_unit_check indirect_cross_list_unit_record_zero_resource_mut indirect_cross_list_unit_insert_adjacent_mut indirect_cross_list_unit_insert_min_begin_mut indirect_cross_list_unit_reset_clears_all_mut indirect_cross_list_unit_submit_no_merge_mut indirect_cross_list_unit_covers_exact_end_mut | ctest=^indirect_cross_list_unit | release=true --> ### Windows Verification (`be22089a`) - `git merge-tree --write-tree upstream/main HEAD` -> `5439b840` (exit 0), `git diff --check` clean - Python checks: `py_compile`, `form_coverage_check.py`, `docs_links_check.py` (209 files, 806 links), `bidi_controls_check.py` (2830 files) passed - Commands: ```text cmake --build --preset dev --target indirect_cross_list_unit_check indirect_cross_list_unit_record_zero_resource_mut indirect_cross_list_unit_insert_adjacent_mut indirect_cross_list_unit_insert_min_begin_mut indirect_cross_list_unit_reset_clears_all_mut indirect_cross_list_unit_submit_no_merge_mut indirect_cross_list_unit_covers_exact_end_mut ctest --preset dev --no-tests=error -R "^indirect_cross_list_unit" --output-on-failure cmake --build --preset release --target indirect_cross_list_unit_check indirect_cross_list_unit_record_zero_resource_mut indirect_cross_list_unit_insert_adjacent_mut indirect_cross_list_unit_insert_min_begin_mut indirect_cross_list_unit_reset_clears_all_mut indirect_cross_list_unit_submit_no_merge_mut indirect_cross_list_unit_covers_exact_end_mut ctest --preset release --no-tests=error -R "^indirect_cross_list_unit" --output-on-failure ``` - Results: `dev` 37/37 passed (1.11s); `release` 37/37 passed (1.17s); `indirect_cross_list_unit_check`: `PASS: indirect_cross_list_unit: 30/30 cases passed`. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 14:06:45 +00:00
Make kThreads/kIters static constexpr so the std::thread lambda in
case_concurrency_contention() does not implicitly reference a
block-scope constexpr without capture (accepted by GCC, rejected by
MSVC C++17 as error C3493). No other lambda in the check references
an uncaptured local.
github manually merged commit 503a0594df into main 2026-12-01 17:11:21 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.