tests: pass the placed-buffer controls only on their stated failure #2177

Merged
rasptum merged 1 commit from upstream-pr/2185 into main 2026-11-25 03:24:31 +00:00
rasptum commented 2026-11-25 03:17:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-25T03:17:30Z.


Problem

startup_placed_buffer_range_region_only_control and startup_placed_buffer_range_walk_only_control (#1766) were WILL_FAIL tests. Their mutated run exited 1 for the stated failure and 0 otherwise. CTest's WILL_FAIL inverts every nonzero exit, so a crash or an unrelated failure also passed them. This is the same mapping the #2156 review found in that PR's drop control.

Change

The controls are now ordinary tests:

  • --mutate region-only exits 0 only when decisions differ in the partly committed cases and nowhere else.
  • --mutate walk-only exits 0 only when the case-9 call count is its sole failure.
  • Anything else exits 1, so a crash or a different failure now fails the control.
  • A refused allocation or mapping is still a capability skip (77).

The main check and the cases are unchanged. The comments in the test, CMakeLists.txt and docs/startup-runtime.md now describe the new rule.

Verification

ctest --preset dev --no-tests=error -R '^startup_placed_buffer_range' -V
ctest --preset release --no-tests=error -R '^startup_placed_buffer_range' -V

Windows 10 19045, MSVC 19.44.

  • Result: 3 of 3 passed, 0 skipped, in dev and release.
    • The region-only control reports "failures other 0, partly committed 11 (or 10, depending on the heap layout), cost 0 -> failed for the stated reason" and exits 0.
    • The walk-only control reports "other 0, partly committed 0, cost 1" and exits 0.
  • Large pages: the large-page case still reports "not run (error 1314)", as before.

AI-assisted (Claude Code).
🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6596392391 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2185). Originally posted by [rasptum](https://github.com/rasptum) on 2026-11-25T03:17:30Z. --- ### Problem `startup_placed_buffer_range_region_only_control` and `startup_placed_buffer_range_walk_only_control` (#1766) were `WILL_FAIL` tests. Their mutated run exited 1 for the stated failure and 0 otherwise. CTest's `WILL_FAIL` inverts every nonzero exit, so a crash or an unrelated failure also passed them. This is the same mapping the #2156 review found in that PR's drop control. ### Change The controls are now ordinary tests: - `--mutate region-only` exits 0 only when decisions differ in the partly committed cases and nowhere else. - `--mutate walk-only` exits 0 only when the case-9 call count is its sole failure. - Anything else exits 1, so a crash or a different failure now fails the control. - A refused allocation or mapping is still a capability skip (77). The main check and the cases are unchanged. The comments in the test, `CMakeLists.txt` and `docs/startup-runtime.md` now describe the new rule. ### Verification ``` ctest --preset dev --no-tests=error -R '^startup_placed_buffer_range' -V ctest --preset release --no-tests=error -R '^startup_placed_buffer_range' -V ``` Windows 10 19045, MSVC 19.44. - **Result:** 3 of 3 passed, 0 skipped, in dev and release. - The region-only control reports "failures other 0, partly committed 11 (or 10, depending on the heap layout), cost 0 -> failed for the stated reason" and exits 0. - The walk-only control reports "other 0, partly committed 0, cost 1" and exits 0. - **Large pages:** the large-page case still reports "not run (error 1314)", as before. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-25 04:04:11 +00:00
tedin7 commented 2026-11-25 04:04:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:23:36Z.

Review: COMMENTED


Review of head 6c44748cd93b2d03b003eacccbbed8dbcab159b5: 0 P1, 0 P2.

Findings:

  • The two negative controls change from WILL_FAIL tests to ordinary tests. They exit 0 only when the failure pattern matches the stated reason (region-only: partly-committed cases differ and nothing else; walk-only: only the call-count case fails). A crash or any other failure now fails the test instead of passing as "expected failure". The return stated ? 0 : 1 flip, the CMake properties, the test header comment and docs/startup-runtime.md all agree. Capability skip (77) is kept.
  • Clean-room: tests and docs only, no source or vendor material. No other open PR touches this test.

Commands executed locally:

  • python3 tests/docs_links_check.py -> pass (18 files, 402 links)
  • python3 tests/bidi_controls_check.py -> pass (1464 files)
  • git diff --check origin/main...HEAD -> clean
  • x2w_pipe.py win2025 2185 --wait 3600 -> Debug and Release /O2: startup_placed_buffer_range, _region_only_control, _walk_only_control 3/3 passed
  • Mutation (via --patch, Debug): flipped return stated ? 0 : 1 to stated ? 1 : 0 in the control branch -> both controls Failed (2 of 3 failed), main test still passed. Mutation reverted.
  • CI Build and test on Windows: SUCCESS.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6051391668 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2185#pullrequestreview-6051391668). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:23:36Z. **Review:** COMMENTED --- Review of head `6c44748cd93b2d03b003eacccbbed8dbcab159b5`: 0 P1, 0 P2. Findings: - The two negative controls change from WILL_FAIL tests to ordinary tests. They exit 0 only when the failure pattern matches the stated reason (region-only: partly-committed cases differ and nothing else; walk-only: only the call-count case fails). A crash or any other failure now fails the test instead of passing as "expected failure". The `return stated ? 0 : 1` flip, the CMake properties, the test header comment and docs/startup-runtime.md all agree. Capability skip (77) is kept. - Clean-room: tests and docs only, no source or vendor material. No other open PR touches this test. Commands executed locally: - `python3 tests/docs_links_check.py` -> pass (18 files, 402 links) - `python3 tests/bidi_controls_check.py` -> pass (1464 files) - `git diff --check origin/main...HEAD` -> clean - `x2w_pipe.py win2025 2185 --wait 3600` -> Debug and Release /O2: startup_placed_buffer_range, _region_only_control, _walk_only_control 3/3 passed - Mutation (via `--patch`, Debug): flipped `return stated ? 0 : 1` to `stated ? 1 : 0` in the control branch -> both controls Failed (2 of 3 failed), main test still passed. Mutation reverted. - CI `Build and test on Windows`: SUCCESS. AI-assisted; commands listed were executed locally.
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!2177
No description provided.