Skip to content

tools/asahi: centauri-scan: follow btcentauri_t6050 RX descriptor skip - #3987

Merged
DjDeveloperr merged 1 commit into
mainfrom
fix/centauri-scan-harness-stubs
Dec 2, 2026
Merged

DjDeveloperr merged 1 commit into
mainfrom
fix/centauri-scan-harness-stubs

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

What: Fixes the centauri-scan-tests host-test harness, which has failed on main since c1d23e2 ("Bluetooth: btcentauri_t6050: skip malformed RX descriptors"). The Bluetooth harness copies cen_io_work() from the driver. The driver now calls cen_rx_consume() and dev_warn_ratelimited(), and the harness didn't have either, so it no longer compiled. That turned every PR's hosted host-tests red.

Tested: no runtime change. Local host-tests in the workflow's Ubuntu 24.04 image (gcc 13, clang 18, rust 1.96.0): main at 1b95b711 gives 968/970, failing only the two centauri-scan-tests jobs. This commit on that base gives 970/970.

Risk: two-way door · none (test harness only, no kernel code)

Not yet: nothing. A test for the new malformed-descriptor skip path in cen_io_work() would be a separate follow-up; the old stop-on-malformed path had no test either.

Details

c1d23e2 moved the event-ring consume step (advance rx_head, repost the buffer, advance rx_post, post ring 7) out of cen_io_work() into a new cen_rx_consume() helper. It also logs bad descriptors with dev_warn_ratelimited(). The harness builds bt-production.c with -Wall -Wextra -Werror, so gcc 13 stopped on two errors:

  • implicit declarations of dev_warn_ratelimited and cen_rx_consume
  • cen_rx_buffer defined but not used, since only cen_rx_consume() calls it now

The fix follows the harness's existing split. Pure ring bookkeeping is copied from the driver (cen_rx_pending, cen_tx_ready, now cen_rx_consume). Ring and hardware I/O stays stubbed (cen_post, cen_rx_buffer, cen_tail, cen_transmit). Because cen_rx_consume() is copied rather than stubbed, test 1 still checks the real rx_head advance and ring-7 post. dev_warn_ratelimited(...) becomes ((void)0), like dev_err in the same prelude and other harnesses in tools/asahi/.

4ce92d0 ("fall back to host duplicate filtering") doesn't reach this harness: it changes cen_transmit(), which is stubbed, and cen_hci_reset_dup_filter(), which isn't copied. No test, assertion or negative control changes. Both BT controls (bt-drops-rx-reschedule, bt-drops-tx-reschedule) still fail where they should.

Evidence

Image localhost/aurora-linux-host-tests:ubuntu2404 (ca34f1dd2adb): ubuntu:24.04, gcc 13.3.0, clang 18.1.3, rust 1.96.0, Python 3.14. Run as python3 -I tools/asahi/run-host-tests.py --jobs 10, with --network=none, on 20 threads.

tree result
main 1b95b71 968/970: FAIL centauri-scan-tests, FAIL centauri-scan-tests --negative-controls
1b95b71 + this commit (tree b2e1363c) 970/970
current main 87c01c2 + this commit, --only centauri 22/22

--negative-controls output with this commit:

bt-production: PASS
bt-drops-rx-reschedule: correctly rejected
bt-drops-tx-reschedule: correctly rejected

checkpatch.pl --strict -g HEAD: 0 errors, 0 warnings, 0 checks.

Commit c1d23e2 ("Bluetooth: btcentauri_t6050: skip malformed RX
descriptors") moved the event-ring consume step out of cen_io_work()
into a new cen_rx_consume() helper and added dev_warn_ratelimited()
calls. The Bluetooth harness copies cen_io_work() from the driver but
had neither name, so bt-production failed to compile with
-Werror=implicit-function-declaration, and the no-longer-called
cen_rx_buffer() stub tripped -Werror=unused-function. Both
centauri-scan-tests runs have failed on main since.

Copy cen_rx_consume() from the driver along with the other ring
helpers, so the harness still checks the real rx_head update and
ring-7 post, and stub dev_warn_ratelimited() the same way as dev_err().
No test or negative control changes.

Fixes: c1d23e2 ("Bluetooth: btcentauri_t6050: skip malformed RX descriptors")
Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners December 2, 2026 20:08
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:none Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Merge readiness at 0510750f: not ready yet

Check Detail
CI at head running running: host-tests
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok not needed: no runtime change
Conflicts ok none
PR text ok Risk: two-way · none (test harness only, no kernel code)

Areas: area:gpu

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

@RyanTheTide RyanTheTide 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.

Reviewed 0510750. The harness now extracts the production RX consume helper and stubs only the diagnostic like its existing dev_err stub. Its ring bookkeeping assertions and negative controls stay in place. The reported 968/970 to 970/970 comparison isolates the harness compile regression.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 2, 2026
@DjDeveloperr
DjDeveloperr merged commit 1262f9e into main Dec 2, 2026
4 of 5 checks passed
@DjDeveloperr
DjDeveloperr deleted the fix/centauri-scan-harness-stubs branch December 2, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:none Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants