Repository navigation
bt-uart-test: unwind HCI resources and stop on failed identity reads - #225
Conversation
Release partially acquired GPIO and tty resources, attempt both power-down writes, and report success only after cleanup. Validate inputs before hardware acquisition and cover failure paths with mocked host regressions.
|
Thanks, this is a tidy fix, and the mocked test covers the cleanup order on both bank layouts nicely. Small things: the |
|
Thanks, Gr-linkk, all four points are in: the dead checks are gone, the PERIC0 hint, the line requests and the "low" message are back (in the same order as before), the header says a failed identity read is a FAIL, and |
…st and this branch's test)
…es, bt-uart-gpio and lineage-ref)
Keep the USB-interface-pinned SSH reproduction in mobile tooling as requested in linux-omarchy-mobile derekross#225. The kernel selftest remains host-only; document what the transfer profile does and does not establish. Assisted-by: LLM
…erekross#225) The raw HCI diagnostic could leak its GPIO lines and tty after a partial setup, and reported PASS after a failed version or config read. It now releases what it acquired (ExitStack), attempts both power-down writes even if one fails, closes the tty when termios setup fails, checks the baud rate and delays before taking any GPIO, and reports success only after cleanup. A failed identity read is a FAIL. The pin sequence is the same as before (BT_REG_ON low, BT_DEV_WAKE low); the PERIC0 hint and the line-request messages are kept. Covered by a mocked host test; tests/all skips *.py for bash -n.
Keep the USB-interface-pinned SSH reproduction in mobile tooling as requested in linux-omarchy-mobile derekross#225. The kernel selftest remains host-only; document what the transfer profile does and does not establish. Assisted-by: LLM
Keep the USB-interface-pinned SSH reproduction in mobile tooling as requested in linux-omarchy-mobile derekross#225. The kernel selftest remains host-only; document what the transfer profile does and does not establish. Assisted-by: LLM
Keep the USB-interface-pinned SSH reproduction in mobile tooling as requested in linux-omarchy-mobile derekross#225. The kernel selftest remains host-only; document what the transfer profile does and does not establish. Assisted-by: LLM
…ejay UPSTREAM status (#666) The transfer profile behind linux-omarchy-mobile #225's aggregation-retry fix needs a phone, so it lives here and not in the kernel's selftests. Sixteen fresh `tools/phone-ssh` connections each pull 2 MiB of zeros from the phone, checked by size and SHA-256 under one 20 s deadline, with no retry and no write on the phone. A failure names the transfer and the check and shows ssh's stderr. `tests/ncm-transfer` runs it against a stand-in `ssh`. A pass shows that the link carried the transfers, not that the retry ran, and it covers neither laptop sleep nor a replug. Bluejay's UPSTREAM page is brought up to the November kernel revisions, none of which has booted on the phone, and it records that #346 stays passive. Assisted-by: OpenAI Codex
Title: bt-uart-test: unwind HCI resources and stop on failed identity reads
The raw HCI diagnostic can leak resources during partial setup and report success after failed version/config reads. Use ExitStack to release acquired resources, attempt both power-down writes even if one fails, and report success only after cleanup. Close the tty if its termios setup fails and reject unsupported baud/negative delay before GPIO acquisition.
Preserves upstream's existing --wake BANK:LINE interface, including separate wake banks; this is diagnostic hardening, not Bluetooth driver or device enablement. Configurable loop rates from the original draft are deferred to keep this candidate focused.
Validation: mocked host regression for same/separate banks, acquisition/exchange/cleanup failures, each failed HCI command, invalid arguments, and tty setup failure; Python syntax, bash syntax, git diff --check and privacy inspection. Wired into tests/all; the full repository suite was not run. No phone access or hardware validation.
Independent read-only review found premature PASS reporting on cleanup failure; fixed and covered by injected cleanup failure. Existing firmware-download command lifecycle remains outside this scope.