From fa275f1bf88068ba3df6aaccd5a8949d967cbc07 Mon Sep 17 00:00:00 2001 From: Derek Ross Date: Sun, 1 Nov 2026 23:21:22 -0500 Subject: [PATCH 1/2] omamobile-audio: give the watchdog's c9 settle tests a 10 s window #315 moved the c9 rise test's steps apart, but CI still failed it (#319's run): the watchdog logged its start and nothing else, because on the slower runner the steps arrived after its 80 polls (4 s) were over. The c9 settle tests now poll 200 times (10 s at 0.05 s). A test that expects a mute still ends at the mute. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d --- packages/omamobile-audio/test/all | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/omamobile-audio/test/all b/packages/omamobile-audio/test/all index 9d623cc40..ac1ee2eec 100755 --- a/packages/omamobile-audio/test/all +++ b/packages/omamobile-audio/test/all @@ -507,7 +507,9 @@ c9settle() { # name settle steps...: steps are delay_s:temp_bytes, applied in o ( for _ in $(seq 1 100); do grep -c 'watchdog: watching' "$r/watch.out" >/dev/null 2>&1 && break; sleep 0.05; done for s in "${steps[@]}"; do sleep "${s%%:*}"; amx cset "name=Bottom DSP1 Protection cd CSPL_TEMPERATURE" "${s#*:}" >/dev/null; done ) & wprep=(OMAMOBILE_SPK_STAGE=c9 OMAMOBILE_SPK_DIGITAL=817 OMAMOBILE_SPK_ANALOG=17 FAKE_ANALOG_MAX=17 OMAMOBILE_SPK_TEMP_SETTLE=$st OMAMOBILE_SPK_TEMP_JUMP=${JUMP:-5}) - WATCH_N=80 watchrun; wait + # 200 polls (10 s at 0.05 s): on a slow CI runner the steps above arrive + # seconds late, and 80 polls let the watchdog finish before the rise came. + WATCH_N=200 watchrun; wait } c9settle c9-step 1.5 0.2:0x00,0x0a,0x00,0x00 # 25 -> 40 C: the measured value, a step ((rc == 0)) && ! muted && grep -c 's into a stream' "$r/watch.out" >/dev/null || { cat "$r/watch.out" >&2; fail "watchdog: in stage c9 the step from the reference to the measured coil does not mute"; } From bdc3fb7796df5b7bbfd72838e0c1c06479a0a7c5 Mon Sep 17 00:00:00 2001 From: Derek Ross Date: Sun, 1 Nov 2026 23:36:17 -0500 Subject: [PATCH 2/2] omamobile-audio: the c9 rise test starts at the measured coil, before the watchdog runs Still failing on CI with the 10 s window: the test set its starting temperature only after it saw the watchdog's "watching" line, and the watchdog's output to a file is buffered, so on CI the line came late and the baseline was taken from the earlier 25 C. The watchdog then muted on "25 -> 33" and the test's check for "33 -> 41" failed. The rise test now sets the measured 33 C before the watchdog starts, so the baseline can't depend on when its output shows; the step from the reference to the measured value in the settle window stays covered by the c9-step test. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d --- packages/omamobile-audio/test/all | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/omamobile-audio/test/all b/packages/omamobile-audio/test/all index ac1ee2eec..e69270fed 100755 --- a/packages/omamobile-audio/test/all +++ b/packages/omamobile-audio/test/all @@ -502,7 +502,7 @@ c9settle() { # name settle steps...: steps are delay_s:temp_bytes, applied in o local n=$1 st=$2; shift 2; local steps=("$@") c9 "$n"; ((rc == 0)) || { cat "$r/out" >&2; fail "$n: start"; } echo 'state: RUNNING' > "$r/asound/card0/pcm5p/sub0/status" - amx cset "name=Bottom DSP1 Protection cd CSPL_TEMPERATURE" 0x00,0x06,0x40,0x00 >/dev/null + amx cset "name=Bottom DSP1 Protection cd CSPL_TEMPERATURE" "${C9_START:-0x00,0x06,0x40,0x00}" >/dev/null rm -f "$r/watch.out" ( for _ in $(seq 1 100); do grep -c 'watchdog: watching' "$r/watch.out" >/dev/null 2>&1 && break; sleep 0.05; done for s in "${steps[@]}"; do sleep "${s%%:*}"; amx cset "name=Bottom DSP1 Protection cd CSPL_TEMPERATURE" "${s#*:}" >/dev/null; done ) & @@ -516,7 +516,7 @@ c9settle c9-step 1.5 0.2:0x00,0x0a,0x00,0x00 # 25 -> 40 C: the measured value # The settle window leaves a second either side: on a loaded machine (CI, the # nightly publish) the step to 33 C once landed after a 0.6 s baseline was # taken, so the watchdog saw 25 -> 41 and the test failed for timing alone. -c9settle c9-rise 1.0 0.0:0x00,0x08,0x40,0x00 2.0:0x00,0x0a,0x40,0x00 # 25 -> 33 in the window, then 33 -> 41 C +C9_START=0x00,0x08,0x40,0x00 c9settle c9-rise 1.0 2.0:0x00,0x0a,0x40,0x00 # starts at the measured 33 C (so the baseline never depends on when the watchdog's output shows), then 33 -> 41 C ((rc == 1)) && muted && grep -c 'jumped 8.0 C (33.0 -> 41.0)' "$r/run/speaker-protection" >/dev/null || { cat "$r/watch.out" >&2; fail "watchdog: in stage c9 a rise of 8 C above the measured value mutes"; } c9settle c9-cold 0.4 1.5:0x00,0x07,0xc0,0x00 # no step: the baseline at 0.4 s, then 25 -> 31 C ((rc == 1)) && muted && grep -c 'jumped 6.0 C' "$r/run/speaker-protection" >/dev/null || { cat "$r/watch.out" >&2; fail "watchdog: in stage c9 a 6 C rise after the settle window mutes"; }