tests: reuse startup_command_list_slot_names fixture for the mutation controls #3870
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3870"
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?
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_unitsuite is removed, andtests/startup_command_list_slot_names.cppcarries the mutation controls instead, so there is one expected mapping for future slot changes.What changed
command_list_slot_names_unitfiles: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.tests/startup_command_list_slot_names.cpp: its include changed from../src/startup_stubs/command_list_slot_names.htostartup_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 withoutsrcon the include path), plus#include <limits>.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), thedesktop_namesboundary entries ([0]Close,[17]ResourceBarrier,[19]SetDescriptorHeaps,[42]DiscardResource,[43]BeginQuery,[47]SetMarker,[50]ExecuteIndirect), the integer limits (name(-2),INT_MINandINT_MAXreturnnullptr), and the explicit unnamed range (every slot 62..138, plus 140, 141, 1000 returnnullptr).tests/cmake/startup_command_list_slot_names.cmake(CMakeLists.txtuntouched, pertests/cmake/README.md): it addstarget_include_directories(startup_command_list_slot_names PRIVATE src)to the existing target and registers all 6WILL_FAIL TRUEheader-mutation controls, each compiling the fixture.cppdirectly against its configure-time mutated header copy withBEFORE PRIVATE <mut> srcandcxx_std_17, failing configure withFATAL_ERRORif any anchor is lost.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, anddocs/experiments/startup-command-list-slot-names.md.CMakeLists.txtorsrc/. Mergedorigin/main6e3a181bcleanly (merge commit154da4ef); branch diff vsorigin/mainis 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++)startup_command_list_slot_names+ all 6WILL_FAIL TRUEcontrols)tests/form_coverage_check.py: passedtests/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 (tree45eebaa979928db64eed4d43a8a3715aa2bce512)Windows Verification (
15012298)git merge-tree --write-tree upstream/main HEADandgit diff --check.dev:cmake --preset dev, built 7 targets (startup_command_list_slot_names+ 6_muttargets),ctest --preset dev --no-tests=error -R '^startup_command_list_slot_names' --output-on-failurepassed7/7(0.77s); directstartup_command_list_slot_names.exeprintedcommand list slot name checks passed.release:cmake --preset release, built 7 targets,ctest --preset release --no-tests=error -R '^startup_command_list_slot_names' --output-on-failurepassed7/7(0.83s).clmeta check:python -B tests/startup_command_list_slot_names_meta_check.pyprintedPASS: startup_command_list_slot_names: 6/6 mutations killed (cl).tests/docs_links_check.py(250 files, 951 links) andtests/bidi_controls_check.py(2985 files) passed.AI-assisted.
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-failurepassed 19/19.tests/startup_command_list_slot_names.cppalready 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.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):command_list_slot_names_unit*files;CMakeLists.txtandsrc/are untouched.tests/startup_command_list_slot_names.cpp(switched include from../src/...tostartup_stubs/command_list_slot_names.hsoBEFORE PRIVATEpicks up each mutated header) and added the constant (desktop_method_countthroughreset_slot, plusdesktop_namesboundary rows), integer-limit (-2,INT_MIN,INT_MAX), and explicit unnamed (62..138,140,141,1000) assertions there.WILL_FAIL TRUEcontrols reusingtests/startup_command_list_slot_names.cppviatests/cmake/startup_command_list_slot_names.cmakeandtests/startup_command_list_slot_names_meta_check.py.15012298: MSVCdevCTest7/7(0.77s),releaseCTest7/7(0.83s),python -B tests/startup_command_list_slot_names_meta_check.py6/6 mutations killed (cl). Ready for re-review!AI-assisted.
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 Debugctest --preset dev --no-tests=error -j 1 -R '^startup_command_list_slot_names'passed 7/7, including the six mutation controls.