tests: reuse startup_command_list_slot_names fixture for the mutation controls #3872

Manually merged
github merged 3 commits from github-bot/gh-3870 into gh-pr/3870/base 2026-12-02 17:04:51 +00:00 AGit
Owner

@⁠Ammmae0x on GitHub · 2026-12-02 15:47 UTC · original
Ammmae0x:tests/command-list-slot-names-unit → main · +648 −1 · 5 files · 3 commits · merged 2026-12-02 16:45 UTC

Addresses @⁠R0Y00's CHANGES_REQUESTED review (PRR_kwDOV10-fc8AAAABbtXGcA).

The duplicate command_list_slot_names_unit suite is removed, and tests/startup_command_list_slot_names.cpp carries the mutation controls instead, so there is one expected mapping for future slot changes.

What changed

  • Removed all 5 duplicate command_list_slot_names_unit files: docs/experiments/command-list-slot-names-unit.md, tests/checks/python-linux/command_list_slot_names_unit.txt, tests/cmake/command_list_slot_names_unit.cmake, tests/command_list_slot_names_unit_check.cpp, tests/command_list_slot_names_unit_meta_check.py.
  • Reused tests/startup_command_list_slot_names.cpp: its include changed from ../src/startup_stubs/command_list_slot_names.h to startup_stubs/command_list_slot_names.h, so a mutated copy placed earlier on the include path replaces the real header (verified: the fixture fails to compile without src on the include path), plus #include <limits>.
  • Added the assertions the duplicate suite had and the fixture lacked: all ten slot constants (desktop_method_count == 51, first_desktop_method == 9, console_shift == 4, resource_barrier_slot == 26, first_shifted_slot == 32, last_shifted_slot == 55, first_desktop_marker_slot == 56, last_desktop_marker_slot == 58, execute_indirect_slot == 61, reset_slot == 139), the desktop_names boundary entries ([0] Close, [17] ResourceBarrier, [19] SetDescriptorHeaps, [42] DiscardResource, [43] BeginQuery, [47] SetMarker, [50] ExecuteIndirect), the integer limits (name(-2), INT_MIN and INT_MAX return nullptr), and the explicit unnamed range (every slot 62..138, plus 140, 141, 1000 return nullptr).
  • Added tests/cmake/startup_command_list_slot_names.cmake (CMakeLists.txt untouched, per tests/cmake/README.md): it adds target_include_directories(startup_command_list_slot_names PRIVATE src) to the existing target and registers all 6 WILL_FAIL TRUE header-mutation controls, each compiling the fixture .cpp directly against its configure-time mutated header copy with BEFORE PRIVATE <mut> src and cxx_std_17, failing configure with FATAL_ERROR if any anchor is lost.
  • Added tests/startup_command_list_slot_names_meta_check.py (audits the fragment/header/fixture/doc contract, runs the fixture natively unmutated + against all 6 mutations, and pins the 5 duplicate files as removed), tests/checks/python-linux/startup_command_list_slot_names.txt, and docs/experiments/startup-command-list-slot-names.md.
  • No edits to CMakeLists.txt or src/. Merged origin/main 6e3a181b cleanly (merge commit 154da4ef); branch diff vs origin/main is 5 files, +648/-1.

Refs #1149.

Linux verification (this host, g++ -std=c++17)

  • tests/startup_command_list_slot_names_meta_check.py: PASS: startup_command_list_slot_names: 6/6 mutations killed (g++)
  • Scratch CMake + CTest: 7/7 passed (startup_command_list_slot_names + all 6 WILL_FAIL TRUE controls)
  • tests/form_coverage_check.py: passed
  • tests/docs_links_check.py: passed (249 files, 946 links)
  • tests/bidi_controls_check.py: passed (2983 files, no bidirectional controls)
  • git diff --check origin/main...HEAD: clean; git merge-tree --write-tree origin/main HEAD: exits 0 (tree 45eebaa979928db64eed4d43a8a3715aa2bce512)
  • Full Python Linux suite: NOT run to completion locally. It was stopped partway (129 groups, no failures in the portion that ran); GitHub Actions runs the full workflow on this push.

Windows Verification (15012298)

  • Clean git merge-tree --write-tree upstream/main HEAD and git diff --check.
  • MSVC dev: cmake --preset dev, built 7 targets (startup_command_list_slot_names + 6 _mut targets), ctest --preset dev --no-tests=error -R '^startup_command_list_slot_names' --output-on-failure passed 7/7 (0.77s); direct startup_command_list_slot_names.exe printed command list slot name checks passed.
  • MSVC release: cmake --preset release, built 7 targets, ctest --preset release --no-tests=error -R '^startup_command_list_slot_names' --output-on-failure passed 7/7 (0.83s).
  • Native cl meta check: python -B tests/startup_command_list_slot_names_meta_check.py printed PASS: startup_command_list_slot_names: 6/6 mutations killed (cl).
  • Repo static checks on Windows: tests/docs_links_check.py (250 files, 951 links) and tests/bidi_controls_check.py (2985 files) passed.

AI-assisted.

**@⁠Ammmae0x** on GitHub · 2026-12-02 15:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3870) `Ammmae0x:tests/command-list-slot-names-unit` → `main` · +648 −1 · 5 files · 3 commits · merged 2026-12-02 16:45 UTC Addresses @⁠R0Y00's CHANGES_REQUESTED review (PRR_kwDOV10-fc8AAAABbtXGcA). The duplicate `command_list_slot_names_unit` suite is removed, and `tests/startup_command_list_slot_names.cpp` carries the mutation controls instead, so there is one expected mapping for future slot changes. ## What changed - Removed all 5 duplicate `command_list_slot_names_unit` files: `docs/experiments/command-list-slot-names-unit.md`, `tests/checks/python-linux/command_list_slot_names_unit.txt`, `tests/cmake/command_list_slot_names_unit.cmake`, `tests/command_list_slot_names_unit_check.cpp`, `tests/command_list_slot_names_unit_meta_check.py`. - Reused `tests/startup_command_list_slot_names.cpp`: its include changed from `../src/startup_stubs/command_list_slot_names.h` to `startup_stubs/command_list_slot_names.h`, so a mutated copy placed earlier on the include path replaces the real header (verified: the fixture fails to compile without `src` on the include path), plus `#include <limits>`. - Added the assertions the duplicate suite had and the fixture lacked: all ten slot constants (`desktop_method_count == 51`, `first_desktop_method == 9`, `console_shift == 4`, `resource_barrier_slot == 26`, `first_shifted_slot == 32`, `last_shifted_slot == 55`, `first_desktop_marker_slot == 56`, `last_desktop_marker_slot == 58`, `execute_indirect_slot == 61`, `reset_slot == 139`), the `desktop_names` boundary entries (`[0]` Close, `[17]` ResourceBarrier, `[19]` SetDescriptorHeaps, `[42]` DiscardResource, `[43]` BeginQuery, `[47]` SetMarker, `[50]` ExecuteIndirect), the integer limits (`name(-2)`, `INT_MIN` and `INT_MAX` return `nullptr`), and the explicit unnamed range (every slot 62..138, plus 140, 141, 1000 return `nullptr`). - Added `tests/cmake/startup_command_list_slot_names.cmake` (`CMakeLists.txt` untouched, per `tests/cmake/README.md`): it adds `target_include_directories(startup_command_list_slot_names PRIVATE src)` to the existing target and registers all 6 `WILL_FAIL TRUE` header-mutation controls, each compiling the fixture `.cpp` directly against its configure-time mutated header copy with `BEFORE PRIVATE <mut> src` and `cxx_std_17`, failing configure with `FATAL_ERROR` if any anchor is lost. - Added `tests/startup_command_list_slot_names_meta_check.py` (audits the fragment/header/fixture/doc contract, runs the fixture natively unmutated + against all 6 mutations, and pins the 5 duplicate files as removed), `tests/checks/python-linux/startup_command_list_slot_names.txt`, and `docs/experiments/startup-command-list-slot-names.md`. - No edits to `CMakeLists.txt` or `src/`. Merged `origin/main` `6e3a181b` cleanly (merge commit `154da4ef`); branch diff vs `origin/main` is 5 files, +648/-1. Refs #1149. ## Linux verification (this host, g++ -std=c++17) - `tests/startup_command_list_slot_names_meta_check.py`: `PASS: startup_command_list_slot_names: 6/6 mutations killed (g++)` - Scratch CMake + CTest: 7/7 passed (`startup_command_list_slot_names` + all 6 `WILL_FAIL TRUE` controls) - `tests/form_coverage_check.py`: passed - `tests/docs_links_check.py`: passed (249 files, 946 links) - `tests/bidi_controls_check.py`: passed (2983 files, no bidirectional controls) - `git diff --check origin/main...HEAD`: clean; `git merge-tree --write-tree origin/main HEAD`: exits 0 (tree `45eebaa979928db64eed4d43a8a3715aa2bce512`) - Full Python Linux suite: NOT run to completion locally. It was stopped partway (129 groups, no failures in the portion that ran); GitHub Actions runs the full workflow on this push. ## Windows Verification (`15012298`) - Clean `git merge-tree --write-tree upstream/main HEAD` and `git diff --check`. - MSVC `dev`: `cmake --preset dev`, built 7 targets (`startup_command_list_slot_names` + 6 `_mut` targets), `ctest --preset dev --no-tests=error -R '^startup_command_list_slot_names' --output-on-failure` passed `7/7` (`0.77s`); direct `startup_command_list_slot_names.exe` printed `command list slot name checks passed`. - MSVC `release`: `cmake --preset release`, built 7 targets, `ctest --preset release --no-tests=error -R '^startup_command_list_slot_names' --output-on-failure` passed `7/7` (`0.83s`). - Native `cl` meta check: `python -B tests/startup_command_list_slot_names_meta_check.py` printed `PASS: startup_command_list_slot_names: 6/6 mutations killed (cl)`. - Repo static checks on Windows: `tests/docs_links_check.py` (250 files, 951 links) and `tests/bidi_controls_check.py` (2985 files) passed. AI-assisted. <!-- WIN-VERIFY: passed | sha=150122981344ab58c9eb5188b33a2d4ef6c95c17 | ctest=^startup_command_list_slot_names | dev=7/7 | release=7/7 | cl_meta=6of6 -->
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 15:50:22 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 16:02 UTC · original · requested changes

Independent Windows/MSVC Debug ctest --preset dev --no-tests=error -R '^command_list_slot_names_unit' --output-on-failure passed 19/19. tests/startup_command_list_slot_names.cpp already checks the named slots 0–58, 61 and 139 and the relevant shifted boundaries. Its explicit assertions at slots 0, 31, 32, 55, 57, 58, 61 and 139 would catch the six mutations in this PR. Please reuse that fixture for the mutation runner and add the new constant and integer-limit assertions there. That keeps one expected mapping for future slot changes.

**@⁠R0Y00** on GitHub · 2026-12-02 16:02 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3870#pullrequestreview-6154471024) · **requested changes** Independent Windows/MSVC Debug `ctest --preset dev --no-tests=error -R '^command_list_slot_names_unit' --output-on-failure` passed 19/19. `tests/startup_command_list_slot_names.cpp` already checks the named slots 0–58, 61 and 139 and the relevant shifted boundaries. Its explicit assertions at slots 0, 31, 32, 55, 57, 58, 61 and 139 would catch the six mutations in this PR. Please reuse that fixture for the mutation runner and add the new constant and integer-limit assertions there. That keeps one expected mapping for future slot changes.
github-bot changed title from tests: cover command_list_slot_names mapping and console shift boundaries to tests: reuse startup_command_list_slot_names fixture for the mutation controls 2026-12-02 16:29:44 +00:00
Author
Owner

@⁠Ammmae0x on GitHub · 2026-12-02 16:32 UTC · original

@⁠R0Y00 Addressed your review in 15012298 (tests: reuse startup_command_list_slot_names fixture for the mutation controls):

  • Removed all five duplicate command_list_slot_names_unit* files; CMakeLists.txt and src/ are untouched.
  • Reused tests/startup_command_list_slot_names.cpp (switched include from ../src/... to startup_stubs/command_list_slot_names.h so BEFORE PRIVATE picks up each mutated header) and added the constant (desktop_method_count through reset_slot, plus desktop_names boundary rows), integer-limit (-2, INT_MIN, INT_MAX), and explicit unnamed (62..138, 140, 141, 1000) assertions there.
  • Added the 6 WILL_FAIL TRUE controls reusing tests/startup_command_list_slot_names.cpp via tests/cmake/startup_command_list_slot_names.cmake and tests/startup_command_list_slot_names_meta_check.py.
  • Windows verification on 15012298: MSVC dev CTest 7/7 (0.77s), release CTest 7/7 (0.83s), python -B tests/startup_command_list_slot_names_meta_check.py 6/6 mutations killed (cl). Ready for re-review!

AI-assisted.

**@⁠Ammmae0x** on GitHub · 2026-12-02 16:32 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3870#issuecomment-7352085415) @⁠R0Y00 Addressed your review in `15012298` (`tests: reuse startup_command_list_slot_names fixture for the mutation controls`): - Removed all five duplicate `command_list_slot_names_unit*` files; `CMakeLists.txt` and `src/` are untouched. - Reused `tests/startup_command_list_slot_names.cpp` (switched include from `../src/...` to `startup_stubs/command_list_slot_names.h` so `BEFORE PRIVATE` picks up each mutated header) and added the constant (`desktop_method_count` through `reset_slot`, plus `desktop_names` boundary rows), integer-limit (`-2`, `INT_MIN`, `INT_MAX`), and explicit unnamed (`62..138`, `140`, `141`, `1000`) assertions there. - Added the 6 `WILL_FAIL TRUE` controls reusing `tests/startup_command_list_slot_names.cpp` via `tests/cmake/startup_command_list_slot_names.cmake` and `tests/startup_command_list_slot_names_meta_check.py`. - Windows verification on `15012298`: MSVC `dev` CTest `7/7` (`0.77s`), `release` CTest `7/7` (`0.83s`), `python -B tests/startup_command_list_slot_names_meta_check.py` `6/6 mutations killed (cl)`. Ready for re-review! AI-assisted.
Addresses @R0Y00's CHANGES_REQUESTED review (PRR_kwDOV10-fc8AAAABbtXGcA)
on PR #3870: remove the duplicate command_list_slot_names_unit suite
and reuse tests/startup_command_list_slot_names.cpp as the single
expected mapping.

- Remove all 5 duplicate command_list_slot_names_unit files.
- Fixture: include through src (startup_stubs/command_list_slot_names.h),
  plus <limits>; add all ten slot constants, the desktop_names boundary
  entries, INT_MIN/INT_MAX and -2, and the explicit unnamed 62..138
  range plus 140/141/1000.
- Add tests/cmake/startup_command_list_slot_names.cmake: src include
  directory on the existing target plus 6 WILL_FAIL TRUE header-mutation
  controls, each compiling the fixture against its configure-time
  mutated header copy (BEFORE PRIVATE, cxx_std_17, FATAL_ERROR on a
  lost anchor).
- Add tests/startup_command_list_slot_names_meta_check.py,
  tests/checks/python-linux/startup_command_list_slot_names.txt, and
  docs/experiments/startup-command-list-slot-names.md.
- No edits to CMakeLists.txt or src/.

Refs #1149.
github-bot changed target branch from main to gh-pr/3870/base 2026-12-02 17:04:50 +00:00
github manually merged commit 1501229813 into gh-pr/3870/base 2026-12-02 17:04:51 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 16:42 UTC · original · approved these changes

Reviewed 15012298. The existing mapping fixture now owns the new constants and integer limits and is reused by all six mutations. There is one expected slot mapping. Independent Windows/MSVC Debug ctest --preset dev --no-tests=error -j 1 -R '^startup_command_list_slot_names' passed 7/7, including the six mutation controls.

**@⁠R0Y00** on GitHub · 2026-12-02 16:42 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3870#pullrequestreview-6155114476) · **approved these changes** Reviewed 15012298. The existing mapping fixture now owns the new constants and integer limits and is reused by all six mutations. There is one expected slot mapping. Independent Windows/MSVC Debug `ctest --preset dev --no-tests=error -j 1 -R '^startup_command_list_slot_names'` passed 7/7, including the six mutation controls.
This discussion has been locked. Commenting is limited to contributors.
No description provided.