diff --git a/packages/mosaic/framework/tools/wake/test-wake-install.sh b/packages/mosaic/framework/tools/wake/test-wake-install.sh index 2e414df2..794e0293 100755 --- a/packages/mosaic/framework/tools/wake/test-wake-install.sh +++ b/packages/mosaic/framework/tools/wake/test-wake-install.sh @@ -411,9 +411,13 @@ echo "== I14: per-class fallback cadence — blank-reset yields EXACTLY ONE OnUn # write-fallback-cadence writes the per-class cadence in BLANK-RESET form. out="$(bash "$WI" write-fallback-cadence 30min 2>&1)"; rc=$? [ "$rc" -eq 0 ] || fail_msg "I14: write-fallback-cadence must succeed + verify single (rc=$rc) [$out]" - echo "$out" | grep -qi 'EXACTLY ONE\|exactly one' || fail_msg "I14: the cadence write must confirm exactly-one OnUnitActiveUSec [$out]" + echo "$out" | grep -qi 'exactly one' || fail_msg "I14: the cadence write must confirm exactly-one OnUnitActiveUSec [$out]" [ -f "$UD/$TIMER.d/cadence.conf" ] || fail_msg "I14: the per-class cadence drop-in must be written under .d/" - grep -qz $'OnUnitActiveSec=\nOnUnitActiveSec=30min' "$UD/$TIMER.d/cadence.conf" \ + # Assert the blank-reset FORM: an empty `OnUnitActiveSec=` reset line IMMEDIATELY + # FOLLOWED by the new value. Portable across GNU and BusyBox grep (Alpine CI) — + # `grep -z` (NUL-data) is a GNU-only extension BusyBox grep does NOT support, so + # match the reset line and require the value on the very next line (-A1) instead. + grep -A1 '^OnUnitActiveSec=$' "$UD/$TIMER.d/cadence.conf" | grep -qx 'OnUnitActiveSec=30min' \ || fail_msg "I14: the drop-in must use the blank-reset form (empty reset line, then the value)" bash "$WI" verify-single "$TIMER" >/dev/null 2>&1 || fail_msg "I14: base(1h)+blank-reset(30min) must resolve exactly one OnUnitActiveUSec" # NEGATIVE CONTROL: a drop-in WITHOUT the reset line appends -> base 1h + 30min -> two -> fail.