Skip to content

tools/asahi: pmp-floor-tests: keep the class-twice mutant building on GCC 16 - #2658

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
tests/pmp-floor-mutant-gcc16
Nov 22, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
tests/pmp-floor-mutant-gcc16

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

pmp-floor-tests --mutant class-twice fails on a host with GCC 16 (exit 1 without a control failure). The mutant replaces the only read of seen in pmp_floor_parse() with 0, and GCC 16 rejects the mutated header with -Werror=unused-but-set-variable before the test runs. CI pins GCC 13, so CI stays green, but a local run-host-tests.py on a current distro reports a false failure.

Change

The mutant keeps the read as a void cast (((void)seen, 0)), as the foreign-ok mutant 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 as cc (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)

… 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]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

No blockers.

tools/asahi/pmp-floor-tests.py:29: ((void)seen, 0) keeps the only read of seen in the mutated header, so the build no longer trips -Werror=unused-but-set-variable. The mutant still accepts a class twice, the same way foreign-ok (line 39) keeps word alive. The other mutants still read seen (lane-wide keeps || seen). This is a host-only test change, so no hardware row is needed.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pre-PR checklist review (§1–§6) at 2e642ce5c899: APPROVE (0 blockers).

  • Code check (tools/asahi/pmp-floor-tests.py:29): Replacing seen & (1U << (cls - PMP_FLOOR_CLASS_FIRST))) with ((void)seen, 0)) in drivers/pmdomain/apple/pmp-floor-gov.h:57 matches the unique occurrence, keeps balanced parentheses and || precedence, preserves a reference to seen so GCC 16 does not fail -Werror=unused-but-set-variable before the test runs, and still evaluates to 0 so the duplicate-class mutant is injected and caught (matching the existing foreign-ok pattern at line 39).
  • §1–§3 / §6: Host-only test harness change; no model gating, hacks, safety impact, or naming issues.
  • §4 Attribution: Commit 2e642ce5c899 carries human author/committer and human Signed-off-by: Ryan Murray <[email protected]> only, with zero AI trailers in the commit.
  • §5 Evidence & CI: Pure host-tests change; host-tests CI is green on 2e642ce5c899, and local run-host-tests.py --only pmp-floor (11/11 on GCC 16.1 and clang 22) is documented.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide
RyanTheTide merged commit b0cc6dc into integration/aurora Nov 22, 2026
1 check passed
@RyanTheTide
RyanTheTide deleted the tests/pmp-floor-mutant-gcc16 branch November 27, 2026 13:21
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