hil: harness follow-ups from #4594 (park refusal race, interrupted notice, runner stop)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 22/100
Direzione di ricerca
Start in test/hil/hil_test.py at _should_park/_park_refusal and their callers _sysview_capture/_board_battery, then _abort_report/_already_aborted in helper/hil_report.py, _BoardProcess.ended/_stop_boards, _died_row, and _retain in helper/farm_profile.py; line numbers are offset by a few dozen. Reproduce each with the in-process stubs the report describes before editing, and note item 5 asks for an interrupt-policy decision rather than a patch. Done means one refusal string drives both decision and message, termination is matched from the recorded signal, lingering-but-finished rows survive, and test_hil_flash.OpenocdEsp stops leaving /tmp/tinyusb-hil-locks fixtures behind.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
These come from the audit record refresh for #4542, which reviewed #4594 (490eb4ec9..17301f1a6). Claude and Codex each checked the other's findings, and each item below was reproduced in-process with stubs. Nothing was run on a rig. The audit's own harness commits do not touch any of these paths. Line numbers are at 17301f1a6 plus the audit commits, so they are a few dozen lines off in hil_test.py.
Defects
- SystemView capture can skip the park checks (
test/hil/hil_test.py_should_park/_park_refusal, used in_sysview_captureand_board_battery):- The two functions re-read the openocd_esp pending record separately.
pending_refusal()clears entries that have ended. So when an older run's record clears between the two calls, the reason comes back empty. The park then reportsnot parked:with no cause.- In
_sysview_capture, that empty reason falls past theelif/elsethat holds the park-image and remaining-time checks, so the capture runs without them. - Fix: compute one refusal string (
''means park) and use it for both the decision and the message.
- An interrupted run's notice gets overwritten (
hil_test.py_abort_reportwithhelper/hil_report.py_already_aborted):- The banner reads
**HIL run interrupted by SIGTERM.**, but_already_aborted()matches only the**HIL run abprefix. - So an accumulating no-boards re-run replaces both the caveat and the termination with
no-boards. - Fix: match on the recorded termination instead of the caveat text.
- The banner reads
- A finished row is lost when its process outlives the stop grace (
hil_test.py_BoardProcess.ended/_stop_boards):b.resultis filled at pipe EOF, but a board only counts as ended once its sentinel fires.- A board that has written its row and then lingers (an atexit handler or a non-daemon thread) goes to
_left_running. Its row is dropped and_abort_reportlists it as never reported. - Fix: keep the row, and also report that the process survived.
- A real-time signal aborts the whole run (
hil_test.py_died_row):signal.Signals(-exitcode)raisesValueErrorfor SIGRTMIN+n, which escapesrun_boards. Fix: fall back tosignal {n}. - A second SIGINT can skip stopping the boards (
hil_test.pyrun_boardsfinally):- The window is short: before
_stop_boards()'s_interrupts_ignored()takes effect. - In that window, a second SIGINT escapes without stopping the boards or registering survivors.
- Moving the context manager alone does not close every entry window, so the parent's interrupt policy needs a decision.
- The window is short: before
- An agentrc identity error can hide the reset's own failure (
helper/farm_profile.py_retain):_retainruns inreset'sfinally, and its_engine()reload can raise when agentrc's source identity changes mid-reset.- That error replaces the reset's own exception and loses its
.operation. - Fix: keep both failures, without suppressing the identity error.
- Minor:
_frame_resultturns an unpickle failure into a generic "died (exit code 0)" row; put the decode error in the cell..github/workflows/pr_comment.yml:311-315still says the code-size comment reports a failed agentrc fetch, but a missing agentrc now fails the freshness check and posts nothing, which is intended. Drop the stale comment and the redundantcontinue-on-error.
Cleanups
- An explicit agentrc engine API for unresolved evidence (
ctx.retain_unprovenor similar), sofarm_profile._retainstops appending rows to the engine-privatectx.ledger. This needs an agentrc change. .claude/skills/hil-contract/SKILL.md:215: keep tinyusb's obligations (which entry points refuse, when to stop the board, what the cell shows) and link agentrc'shilFlashers and Recovery sections for the pending record's mechanics.
Test isolation (pre-existing)
test_hil_flash.OpenocdEsp writes a fake pending record (usj-30_ED_A0_E0_C9_02.openocd-esp-pending.json, token t0k) into the real /tmp/tinyusb-hil-locks, so the next hil-test run fails two OpenocdEsp tests. This was observed on master 490eb4ec9: a clean run leaves the file behind, and the next run fails.
- Lingua principale
- C
- Stelle
- 7.3k
- Fork
- 1.6k
- Merge medio
- 1g 19h
- PR unite (30g)
- 67
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hathach/tinyusb
-
follow-up Port WCH USBFS Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
follow-up Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
hil-contract: a background hil_remote.py launch is killed at the Bash default 10 min timeoutForse già presa @hathach l’ha presa 16 giorni fa. Apertafollow-up Prio 📌
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
ch32v30x: debug UART loses queued bytes when its TX ring fillsForse già presa @hathach l’ha presa 16 giorni fa. Apertafollow-up Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
followup Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di hathach/tinyusb
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
rofl0r/proxychains-ng#631 ·
-
RP2350: enabling secure boot via rescue fails with 6400 (BOOTKEY written as 33 bytes in ECC mode)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
pcqpcq/open-source-android-apps#619 ·
I maintainer di solito rispondono entro 1 giorno
-
Can't link with minizip-ngAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
-
Missing slice offset check in jvp_equal fast path corrupts slice comparison and aborts delpathsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 3 giorni