tests: reuse startup_command_list_slot_names fixture for the mutation controls #3870

Merged
Ammmae0x merged 3 commits from upstream-pr/3870 into main 2026-12-02 16:45:25 +00:00
Ammmae0x commented 2026-12-02 15:47:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Ammmae0x on 2026-12-02T15:47:26Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5609883543 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3870). Originally posted by [Ammmae0x](https://github.com/Ammmae0x) on 2026-12-02T15:47:26Z. --- 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 -->
R0Y00 commented 2026-12-02 16:02:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T16:02:01Z.

Review: CHANGES_REQUESTED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6154471024 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3870#pullrequestreview-6154471024). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T16:02:01Z. **Review:** CHANGES_REQUESTED --- 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.
Ammmae0x commented 2026-12-02 16:32:05 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Ammmae0x on 2026-12-02T16:32:05Z.


@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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7352085415 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3870#issuecomment-7352085415). Originally posted by [Ammmae0x](https://github.com/Ammmae0x) on 2026-12-02T16:32:05Z. --- @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.
R0Y00 commented 2026-12-02 16:42:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T16:42:20Z.

Review: APPROVED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6155114476 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3870#pullrequestreview-6155114476). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T16:42:20Z. **Review:** APPROVED --- 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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3870
No description provided.