tests: fold NativeCopyRanges coverage into startup_native_copy_ranges #3866
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3866"
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:37:58Z.
Addresses @R0Y00's CHANGES_REQUESTED review: the duplicate suite is gone and only the existing
startup_native_copy_rangessuite is extended (Refs #1149).What changed
All 5
native_copy_ranges_unitfiles are removed (git rm):docs/experiments/native-copy-ranges-unit.mdtests/checks/python-linux/native_copy_ranges_unit.txttests/cmake/native_copy_ranges_unit.cmaketests/native_copy_ranges_unit_check.cpptests/native_copy_ranges_unit_meta_check.pyOnly the 4 existing
startup_native_copy_ranges*files are modified (net diff vsorigin/main: 4 files, +185/-28). Nosrc/change, no other files touched. Mergedorigin/main7eebdb44cleanly (merge commit8b398f6f).Newly caught cases (all in the existing suite)
In
split_middle()(tests/startup_native_copy_ranges_check.cpp):[10, 20)minus[5, 15) -> [15, 20), plus touching no-ops[0, 15)and[20, 30)on the trimmed span.[0, 10), [20, 30), [40, 50)minus[0, 35)leaves[40, 50)untouched (the loop only visits spans beginning before the write ends).UINT64_MAX(kMax = UINT64_MAX):[kMax - 32, kMax - 16) + [kMax - 16, kMax) -> [kMax - 32, kMax)in both insertion orders; middle split by[kMax - 24, kMax - 8) -> [kMax - 32, kMax - 24), [kMax - 8, kMax); empty/inverted addsadd(kMax, kMax)/add(kMax, kMax - 1)are no-ops.In
boundary_coverage():UINT64_MAXpartial edge(kMax - 17, kMax - 15)on[kMax - 16, kMax) -> partial, and one-byte full suffix(kMax - 1, kMax) -> full.One correction to the review request as written: it asked to add
(0, 11)over[0, 10) -> partial, but that assertion already existed inboundary_coverage()(line 311) and was not duplicated. It is the pin that catches the newcoverage_fullcontrol below.Three new mutation controls (9 total, 1:1 in the meta check)
In
tests/cmake/startup_native_copy_ranges.cmake(each fails configure loudly if its anchor is gone):startup_native_copy_ranges_cpu_write_left_trim_mutcpu_writesuffix trimit->begin = endbecomes= beginsplit_middle: left-overhang trim comes back[5, 20)instead of[15, 20)startup_native_copy_ranges_cpu_write_split_begin_mutcpu_writesplit insert{end, old.end}becomes{begin, old.end}split_middle: the halves overlap, and touch atUINT64_MAX([kMax - 24, kMax)vs[kMax - 32, kMax - 24))startup_native_copy_ranges_coverage_full_mutcoveragefull test drops&& end <= row->endboundary_coverage:(0, 11),(5, 25),(20, 31)all reportfullinstead ofpartialtests/startup_native_copy_ranges_meta_check.pynow tests all 9 mutations 1:1 (6 existing + 3 new) and supportsclalongsideg++(Linux keeps-std=c++17 -O2 -Wall -Wextra -Werror).docs/experiments/startup-native-copy-ranges.mddocuments the added cases and controls.Linux verification (this host)
python3 -B tests/startup_native_copy_ranges_meta_check.py—PASS: startup native copy ranges: 6 cases, 9/9 mutations killed (g++)ctest -R '^startup_native_copy_ranges'—16/16 tests passed(6 cases +all+ 9WILL_FAIL TRUEcontrols, each failing cleanly)tests/form_coverage_check.py— passedtests/docs_links_check.py— passed (248 Markdown files, 942 links)tests/bidi_controls_check.py— passed (2977 files, no bidirectional controls)git diff --check origin/main...HEAD— cleangit merge-tree --write-tree origin/main HEAD— exits 0The full Python Linux suite was not waited on locally in this round; GitHub Actions runs the full workflow on push. No Windows CTest / MSVC run on this Linux host, so Windows verification stays the arbiter. Do not merge.
Windows Verification (
d3cb0e78)git merge-tree --write-tree upstream/main HEADandgit diff --check.dev:cmake --preset dev, built all 10 targets (startup_native_copy_ranges_check+ 9_muttargets),ctest --preset dev --no-tests=error -R '^startup_native_copy_ranges' --output-on-failurepassed16/16(1.15s); directstartup_native_copy_ranges_check.exeprintedPASS: startup_native_copy_ranges: 6/6 cases passed.release:cmake --preset release, built all 10 targets,ctest --preset release --no-tests=error -R '^startup_native_copy_ranges' --output-on-failurepassed16/16(0.92s).clmeta check:python -B tests/startup_native_copy_ranges_meta_check.pyprintedPASS: startup native copy ranges: 6 cases, 9/9 mutations killed (cl).tests/docs_links_check.py(248 files, 942 links) andtests/bidi_controls_check.py(2977 files) passed.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T15:45:12Z.
Review: CHANGES_REQUESTED
Independent MSVC Debug
ctest --preset dev --no-tests=error -R '^native_copy_ranges_unit' --output-on-failurepassed 15/15, including the six mutation executables. The overlap remains: #3654 already checks empty/reversed spans, adjacency, bridge, split, trims and coverage, with differential fuzzing and six header mutations. This was also the reason #3700 was closed. A distinct CTest prefix avoids name collisions while both suites still compile and run the same coverage in CI. Please add only the new assertions and any uniquely distinguishing controls to the existing check. In particular, show which near-UINT64_MAXcases or mutation failures are newly caught.Imported from R0Y00/Xbox2Windows. Originally posted by Ammmae0x on 2026-12-02T16:33:37Z.
@R0Y00 Addressed your review in
d3cb0e78(tests: fold NativeCopyRanges coverage into startup_native_copy_ranges):native_copy_ranges_unit*files; only the four existingstartup_native_copy_ranges*files are touched (+185/-28,src/unchanged).tests/startup_native_copy_ranges_check.cpp: left-overhang trim + touching no-ops + early-stop multi-span write + explicit near-UINT64_MAXtouching coalesces and split (split_middle), plus near-UINT64_MAXpartial/full boundary checks (boundary_coverage, keeping existing(0, 11)on line 311 unduplicated).WILL_FAIL TRUEcontrols (cpu_write_left_trim_mut,cpu_write_split_begin_mut,coverage_full_mut-> 9 total) intests/cmake/startup_native_copy_ranges.cmakeandtests/startup_native_copy_ranges_meta_check.py(withclsupport alongsideg++).d3cb0e78: MSVCdevCTest16/16(1.15s),releaseCTest16/16(0.92s),python -B tests/startup_native_copy_ranges_meta_check.py6 cases, 9/9 mutations killed (cl). Ready for re-review!AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T16:42:09Z.
Review: APPROVED
Reviewed
d3cb0e78. The new near-UINT64_MAX and split/trim assertions now run in the existing fixture, and its original differential fuzz check remains. Independent Windows/MSVC Debugctest --preset dev --no-tests=error -j 1 -R '^startup_native_copy_ranges'passed 16/16, including all nine mutation controls.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T19:32:42Z.
Review: APPROVED
Revalidated
8c50c14fafter GitHub Update branch brought the #3883 fix into this PR. The four owned files are unchanged fromd3cb0e78. Independent MSVC Debugctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^startup_native_copy_ranges'passed 16/16, including all nine mutation controls. The old Windows job's only failure wasstartup_indirect_mesh_lease_warp_dual-tracefinding noreq_*.m86; the new check is running on the fixed baseline.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T19:37:58Z.
Review: COMMENTED
The updated Windows job passed, including the previously failing dual-trace WARP fixture. The remaining Linux job fails on
standin_exports_check.pywithd3d12_xs entries 84 != 83; I independently reproduced that failure on main. #3885 updates the export inventory. I'll recheck this branch when that fix lands.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T20:05:08Z.
Review: APPROVED
Revalidated
3a696326after GitHub Update branch brought #3885 into the baseline. The PR's own files are unchanged. Independent Windows/MSVC Debugctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^startup_native_copy_ranges'passed 16/16, including nine mutation controls.python -B tests/standin_exports_check.pypassed all 476 checks and six mutation controls.