Skip to content

tests: fix main's Pytest red (dt fuzz link, t6041 ATC types.h fixture) - #571

Closed
RyanTheTide wants to merge 2 commits into
mainfrom
fix/fuzz-dt-link-adt-gpio
Closed

RyanTheTide wants to merge 2 commits into
mainfrom
fix/fuzz-dt-link-adt-gpio

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What: main is red in Pytest from two semantic clashes between PRs that landed on 11-29, so every open aura PR's test workflow fails:

  1. test_fuzz_regress.py::test_dt_fuzz_regress fails to link (undefined reference to 'adt_gpio_by_phandle'). kboot_audio.c now calls adt_gpio_by_phandle() (speaker assembly ID from the ADT straps), which lives in src/adt_gpio.c, and the dt fuzz target from Fuzz the ADT reader and payload device tree code, fix what it found #476 doesn't copy or link that file. Fix: copy adt_gpio.c next to the other files under test (it includes utils.h, so it needs the host stand-in) and link it, in both the pytest replay build and tests/fuzz/build.sh.
  2. All 10 test_t6041_atc_usb2_device cases error in setup (assert 'typedef u64 uintptr_t;\n' in types_h). Fuzz the ADT reader and payload device tree code, fix what it found #476's 8c3654a9 makes src/types.h take uintptr_t/ptrdiff_t/ssize_t from the compiler, and the ATC fixture still requires the old u64/s64 lines before it strips them. Fix: strip them when present, without asserting.

Tested: at db5d2ad0 with clang 22: test_fuzz_regress.py + test_t6041_atc_usb2_device.py 13 passed (on main 1c70ab57: the link failure plus the 10 setup errors, matching hosted CI on #526/#527/#571's first head). tests/fuzz/build.sh <out> builds adt-fuzz, dt-fuzz and pmgr-fuzz. Full tests/python locally: everything else passes except test_run_guest_sptm.py, which needs the proxyclient Python deps this host lacks (hosted CI passes it). Test-only, so no hardware row is needed.

Risk: two-way · test-only (no firmware source changes).

Not yet: nothing.

kboot_audio.c now calls adt_gpio_by_phandle() (speaker assembly ID
from the ADT straps), which lives in adt_gpio.c. The dt fuzz target
copies kboot_audio.c but not adt_gpio.c, so after both changes met on
main the dt-replay link fails and test_dt_fuzz_regress fails in every
Pytest job.

Copy adt_gpio.c next to the other files under test (it includes
utils.h, so it needs the host stand-in) and link it, in both the
pytest replay build and tests/fuzz/build.sh.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
@RyanTheTide
RyanTheTide requested review from a team as code owners November 29, 2026 04:52

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 042339be68fc

Blockers: None (wait for queued CI to finish green).

Checked:

  • tests/fuzz/build.sh and tests/python/test_fuzz_regress.py (+4/-4, test-only, no firmware source changes): copies src/adt_gpio.c alongside src/kboot_audio.c and src/devicetree.c (so #include "utils.h" resolves to tests/fuzz/host/utils.h) and links adt_gpio.c into both dt-fuzz and the test_dt_fuzz_regress dt-replay binary, fixing the undefined reference to 'adt_gpio_by_phandle' link break on main.
  • Verified tests/python/test_fuzz_regress.py flips from 1 failed on main (1c70ab57) to 3 passed at 042339be, and tests/fuzz/build.sh builds all three fuzz targets cleanly.
Evidence
  • MERGEABLE on main; test-only two-way change with zero Stage 1/Stage 2 firmware binary impact.
  • CI checks on 042339be are queued at review time; approve now so merge can proceed once Pytest/build/policy/format-check go green.

@github-actions github-actions Bot added door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Merge readiness at db5d2ad0: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA db5d2ad0, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · test-only (no firmware source changes).

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

8c3654a ("types: take uintptr_t, ptrdiff_t and ssize_t from the
compiler") removed the u64/s64 typedef lines that the t6041 ATC USB2
host fixture asserts are present before it strips them, so every case
of test_t6041_atc_usb2_device errors in setup on main. src/types.h is
host-safe now. Keep stripping the old lines when an older tree has
them, but don't require them.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
@RyanTheTide RyanTheTide changed the title tests/fuzz: link adt_gpio.c into the dt fuzz target tests: fix main's Pytest red (dt fuzz link, t6041 ATC types.h fixture) Nov 29, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at db5d2ad0d7d3

Blockers: None (wait for the 18 queued CI checks at db5d2ad0d7d3 to finish green).

Checked:

  • tests/fuzz/build.sh and tests/python/test_fuzz_regress.py (042339be): Copies src/adt_gpio.c alongside src/kboot_audio.c and src/devicetree.c and links it into both dt-fuzz and dt-replay, resolving the undefined reference to 'adt_gpio_by_phandle' link failure on main.
  • tests/python/test_t6041_atc_usb2_device.py (db5d2ad0, +4/-4): Removes the stale assert line in types_h check before stripping legacy typedef u64 uintptr_t; / typedef s64 ptrdiff_t; / typedef s64 ssize_t; definitions so the host fixture works with #476's updated src/types.h (compiler-provided types) while still stripping them on older trees, resolving all 10 test_t6041_atc_usb2_device setup errors.
  • Pure test-only two-way fix (+8/-8 across 3 test files, zero firmware source or binary changes; test_fuzz_regress.py + test_t6041_atc_usb2_device.py: 13 passed).
  • Checked for Apple material, tool attribution, private serials, and gating: clean.
Evidence
  • Head: db5d2ad0d7d3 (base: main, mergeable: MERGEABLE, +8/-8 across 3 test files).
  • Hosted CI at db5d2ad0d7d3: 1P/0 real failures/18Q (prior 042339be readiness/pr-text cancelled; full db5d2ad0d7d3 suite queued).

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Nov 29, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #570 (CLOSEOUT-AURA-DISTRO), which was opened first and makes the same two fixes: adt_gpio.c in the dt fuzz target, and the t6041 ATC fixture accepting the compiler typedefs. #570's CI is already running on the buildbox runners. Please review and merge #570 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant