<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/test/hil/hil_test.py, branch merge_os</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/test/hil/hil_test.py?h=merge_os</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/test/hil/hil_test.py?h=merge_os'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-08-18T05:19:09Z</updated>
<entry>
<title>test/hil, ci: contain a wedged USB stack instead of stranding the runner</title>
<updated>2026-08-18T05:19:09Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-13T18:08:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=3963a1b70a572132aced1c1a0033e1c8249a0c7e'/>
<id>urn:sha1:3963a1b70a572132aced1c1a0033e1c8249a0c7e</id>
<content type='text'>
A wedged USB device used to take the whole HIL run with it. Every worker that
touched the poisoned node blocked uninterruptibly, the pool could not be joined,
map_async discarded every board's result, and the job ran to the GitHub ceiling
with no report at all -- while the self-hosted runner's single job slot stayed
occupied and every queued job waited behind it.

Bound the calls a worker makes itself. read_sysfs, bounded_open and run_cmd all
answer within a wall clock; read_sysfs distinguishes "absent" from "unknown",
because a blocked read is not evidence of absence, and caps stranded readers at
four (each costs a thread and an fd for the life of the process) after which the
worker declares itself blind. mtype, the gio unmount, the libmtp session and the
arecord/iperf reaps go through those bounds; the MTP session runs in a disposable
subprocess, since libmtp's ctypes calls block unkillably in D state.

Bound the run. A pool guard (HIL_POOL_TIMEOUT, 60 min) fires before any job
ceiling and still writes a report. When the pool will not shut down, the sweep
kills what the workers spawned -- descendants, not just direct children, since
flashers run in their own session -- confirms each kill actually landed, and
exits early so the runner is freed. Whatever survived is named in the report.

Deliberately shallow past that point. We do not re-scan process groups, prove
pid ownership, or escalate through sudo: a root-owned survivor is reported, not
force-killed, because signalling a pid we cannot prove is ours is the worse
failure, and the job ceiling backstops whatever this misses. A D-state holder
was never killable anyway.

Recover instead of reporting a wedge. A HUNG usbtest case reflashes its own DUT
through its roster flasher, but only where the flasher can reach its probe past
a poisoned node -- openocd pinned to a validated vid_pid, or esptool. Where it
cannot, the run says so rather than reserving budget for a path that cannot fire.

Raise the CI ceilings above the pool guard so the guard fires first and still
writes its report, and pin --retry 1 on every HIL leg: the guard is a flat
constant and does not scale with max_retry, so argparse's default of 3 would
triple the serialized usbtest tail against an unchanged guard.

Split the module: execution in hil_test/hil_flash/usbtest, infrastructure in
helper/ (locking, health, selection, shared bounded IO), and the two matrix
generators into .github/scripts/ -- ci_set_matrix.py sat in workflows/, where
GitHub treats every file as a workflow definition. 193 tests cover the bounded
paths, the kill ladder, the guard and the selector against synthetic /proc trees
and PATH-injected fakes; a real wedge cannot be manufactured on demand.
</content>
</entry>
<entry>
<title>Merge pull request #3790 from hathach/fix/lpc43-hfp-reliability</title>
<updated>2026-08-17T12:04:37Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-17T12:04:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=2465ea8f435114af3b3c935cc4fbed423d9eac69'/>
<id>urn:sha1:2465ea8f435114af3b3c935cc4fbed423d9eac69</id>
<content type='text'>
Fix HFP HIL reliability issue</content>
</entry>
<entry>
<title>test/hil: fold openocd_wch into openocd, verify per board, resolve firmware by flasher extension (#3804)</title>
<updated>2026-07-31T16:17:36Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-31T16:17:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=f3021b337fcea154b898489c417d428c92f88e92'/>
<id>urn:sha1:f3021b337fcea154b898489c417d428c92f88e92</id>
<content type='text'>
test/hil: one openocd flasher, per-board verify and firmware extension

The four WCH boards move to `openocd`, leaving one flasher for all.

`verify` is now a per-board opt-out, not dropped fleet-wide: WCH cannot read flash back
over the WCH-Link sdi transport; the other seven openocd boards can, and say so explicitly.

FLASHER_SUFFIX decides each flasher's extension once — find_firmware returns the full path
and the flashers pass it through, so a build with only the wrong artifact is skipped rather
than failed mid-flash. --skip-flash bypasses the filter.

rescue_openocd() power-on-resets a wedged RP2040/RP2350 via its Rescue DP from the flash
retry; the probe has no reset line.

Drops unused openocd_adi, stflash, wlink_rs and uniflash, parks the unstable ra6m5_ek, and
tests that every roster flasher name dispatches.</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/master' into tmp/pr3790-merge</title>
<updated>2026-07-29T19:35:02Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-29T19:35:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=6271842ea874812f1157b42bcd650c59ab59259b'/>
<id>urn:sha1:6271842ea874812f1157b42bcd650c59ab59259b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>hil, ci: scope HIL builds and tests to the boards a PR affects (#3797)</title>
<updated>2026-07-29T19:29:32Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-29T19:29:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=eef5af86aa26fe3d72e41156a586a6ed3ffce9f8'/>
<id>urn:sha1:eef5af86aa26fe3d72e41156a586a6ed3ffce9f8</id>
<content type='text'>
hil, ci: scope HIL builds and tests to the boards a PR affects

Add test/hil/hil_select.py, a stdlib-only selector that maps a PR diff to the
rig boards, tests and BSP families a change can affect, and wire it into CI so
pull requests build and run only those. A port change picks its families' boards,
a class change picks the examples enabling that class, and device/host changes
prune the other role. Anything unclassified — infra, an unmapped port, a selector
error — falls back to the full matrix, and push/schedule runs are untouched.
Move the shared example lists to hil_examples.py; 54 hardware-free tests cover
the rules.</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'tinyusb/master' into fix/lpc43-hfp-reliability</title>
<updated>2026-07-29T14:08:26Z</updated>
<author>
<name>Zixun LI</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-07-29T14:08:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=1b628e3fb581d56639fac9287448203db7d10ff1'/>
<id>urn:sha1:1b628e3fb581d56639fac9287448203db7d10ff1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>hil: split hil_test.py into hil_lock/hil_flash, add pool_check, update rig probes (#3794)</title>
<updated>2026-07-29T10:29:59Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-29T10:29:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=e88fc441ddcaaa5abd4f4673ef2bf29499522dc0'/>
<id>urn:sha1:e88fc441ddcaaa5abd4f4673ef2bf29499522dc0</id>
<content type='text'>
test/hil: add board-pool health check, split hil_test into focused modules (#3794)

Add test/hil/hil_pool_check.py: per-board rig health scan — probe presence,
light-example flash (dfu_runtime; device_info + serial check for host-only
boards), uid re-enumeration, safe recovery (probe authorized-toggle, board
reset), verified board_test re-park, USB topology report, and a markdown
summary table. Missing firmware is built on the spot (tools/build.py, idf.py
for espressif, one get_deps retry); row statuses: ok, flash-failed, failed,
locked. Board locks are always respected, never bypassed.

Refactor hil_test.py into hil_lock.py (flock protocol, controller permits,
hold/release/status CLI; replaces board_lock.py) and hil_flash.py (flashers,
find_firmware, run_cmd). Update WCH probe uids and the board roster in
tinyusb.json; add the hil-pool-check skill.</content>
</entry>
<entry>
<title>Merge tinyusb/master into fix/lpc43-hfp-reliability</title>
<updated>2026-07-28T22:41:26Z</updated>
<author>
<name>Zixun LI</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-07-28T22:41:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=a7d778c68e46c6013a39d8520c176a3592fc0cd7'/>
<id>urn:sha1:a7d778c68e46c6013a39d8520c176a3592fc0cd7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test/hil: make MTP checks deterministic</title>
<updated>2026-07-28T22:35:21Z</updated>
<author>
<name>Zixun LI</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-07-28T22:35:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=192e0bd872608b4a39b36047e0d5c1d18c2a8f02'/>
<id>urn:sha1:192e0bd872608b4a39b36047e0d5c1d18c2a8f02</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test/hil: avoid parallel MTP probe races</title>
<updated>2026-07-28T21:27:54Z</updated>
<author>
<name>Zixun LI</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-07-28T21:27:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=b868d6d268cab403eb843f3d0a190162a4e5d0db'/>
<id>urn:sha1:b868d6d268cab403eb843f3d0a190162a4e5d0db</id>
<content type='text'>
</content>
</entry>
</feed>
