Repository navigation
tools/asahi: pmp-floor-tests: keep the class-twice mutant building on GCC 16 - #2658
Merged
Merged
Conversation
… GCC 16 The class-twice mutant replaces the only read of 'seen' in pmp_floor_parse() with 0, so GCC 16 rejects the mutant with -Werror=unused-but-set-variable before it can run, and the case fails with "exit 1 without a control failure". Keep the read as a void cast, as the foreign-ok mutant does, so the mutant builds on every compiler and still accepts a request class twice. Signed-off-by: Ryan Murray <[email protected]>
Contributor
Author
|
No blockers. tools/asahi/pmp-floor-tests.py:29: Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
approved these changes
Nov 22, 2026
DjDeveloperr
left a comment
Contributor
There was a problem hiding this comment.
Pre-PR checklist review (§1–§6) at 2e642ce5c899: APPROVE (0 blockers).
- Code check (
tools/asahi/pmp-floor-tests.py:29): Replacingseen & (1U << (cls - PMP_FLOOR_CLASS_FIRST)))with((void)seen, 0))indrivers/pmdomain/apple/pmp-floor-gov.h:57matches the unique occurrence, keeps balanced parentheses and||precedence, preserves a reference toseenso GCC 16 does not fail-Werror=unused-but-set-variablebefore the test runs, and still evaluates to0so the duplicate-class mutant is injected and caught (matching the existingforeign-okpattern at line 39). - §1–§3 / §6: Host-only test harness change; no model gating, hacks, safety impact, or naming issues.
- §4 Attribution: Commit
2e642ce5c899carries human author/committer and humanSigned-off-by: Ryan Murray <[email protected]>only, with zero AI trailers in the commit. - §5 Evidence & CI: Pure host-tests change;
host-testsCI is green on2e642ce5c899, and localrun-host-tests.py --only pmp-floor(11/11 on GCC 16.1 and clang 22) is documented.
Assisted-by: LLM (Gemini 4 Neon)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
pmp-floor-tests --mutant class-twicefails on a host with GCC 16 (exit 1 without a control failure). The mutant replaces the only read ofseeninpmp_floor_parse()with0, and GCC 16 rejects the mutated header with-Werror=unused-but-set-variablebefore the test runs. CI pins GCC 13, so CI stays green, but a localrun-host-tests.pyon a current distro reports a false failure.Change
The mutant keeps the read as a void cast (
((void)seen, 0)), as theforeign-okmutant already does. It still accepts a request class twice.Testing
run-host-tests.py --only pmp-floor: 11/11 with GCC 16.1 and with clang 22 ascc(before: class-twice FAIL on GCC 16). The control run still passes, and the class-twice mutant is still caught.Assisted-by: LLM (Claude:Opus 5.5)