Skip to content

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

Merged
tedin7 merged 1 commit into
R0Y00:mainfrom
rasptum:startup/placed-range-controls-exact
Nov 25, 2026
Merged

tedin7 merged 1 commit into
R0Y00:mainfrom
rasptum:startup/placed-range-controls-exact

Conversation

@rasptum

@rasptum rasptum commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

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

startup_placed_buffer_range_{region_only,walk_only}_control were
WILL_FAIL tests whose 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 (the same mapping R0Y00#2156's review
found). The controls are now ordinary tests: the region-only run exits 0
only when decisions differ in the partly committed cases and nowhere
else, the walk-only run only when the case-9 call count is its sole
failure, and 1 otherwise. A refused allocation or mapping is still a
capability skip (77).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tedin7
tedin7 merged commit 8bfbabf into R0Y00:main Nov 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants