tests: add unit and mutation tests for native_copy_ranges.h #3656
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3656
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3654"
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?
@Ammmae0x on GitHub · 2026-11-30 21:45 UTC · original
Ammmae0x:tests/startup-native-copy-ranges→main· +931 −0 · 5 files · 2 commits · merged 2026-12-01 00:11 UTCRefs #1149
Adds a portable C++17 unit, differential-fuzz, and configure-time header-mutation test suite for
x2w_startup::NativeCopyRanges(src/startup_stubs/native_copy_ranges.h, previously untested intests/). No existing file is modified;native_copy_ranges.hand device code are untouched.What landed (5 new files, +923/-0):
tests/startup_native_copy_ranges_check.cpp— standard C++17 only, no device or graphics API. Six cases (--caseselectable, loudFAIL: <case>:to stderr): empty/inverted ranges are no-ops, adjacent coalesce in both orders, one add bridging three spans, middle/multi-span splits and trims, coverage none/partial/full across exact edges, gaps, and the[UINT64_MAX-16, UINT64_MAX)endpoints, and a deterministic 1500-step splitmix64 differential fuzz against an independent reference model (strict span invariants checked at every step).tests/cmake/startup_native_copy_ranges.cmake— per-case plusstartup_native_copy_ranges_alltests, and sixWILL_FAIL TRUEmutation controls mirroringera_physical_owns_last_page_control, each a configure-time mutated header copy with a pinned control case.tests/startup_native_copy_ranges_meta_check.py+tests/checks/python-linux/startup_native_copy_ranges.txt— Linux contract audit that compiles and runs the real test and every mutated header copy natively withg++ -std=c++17.docs/experiments/startup-native-copy-ranges.md— cases, controls, and runs.Tests (Linux):
PASS: startup native copy ranges: 6 cases, 6/6 mutations killed (g++).form_coverage_check.py,docs_links_check.py(192 files/745 links),bidi_controls_check.py(2762 files) pass;diff --checkclean; zero personal paths.tools/run_checks_parallel.py --from-dir tests/checks/python-linux ...): all 282 checks passed.Windows execution (MSVC) awaits Windows verification:
Windows Verification (
6f1d84ea)AI-assisted.
@R0Y00 on GitHub · 2026-12-01 00:10 UTC · original · approved these changes
Reviewed the native copy-range fixtures and their six mutation controls.
ctest --test-dir <build> --no-tests=error -j1 -R '^startup_native_copy_ranges_' --output-on-failurepassed in the Windows Release integration.python -B tests/startup_native_copy_ranges_meta_check.pyindependently passed with all six mutations caught.github-bot referenced this pull request2026-12-02 15:43:49 +00:00