post_check: run-to-completion units that exited 0 are ok, not warnings
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KqhjP7nud5gdBg25zCiRk9
This commit is contained in:
@@ -184,4 +184,13 @@ elif echo "$pc" | grep -q 'van-nvme-watch'; then bad "--post-check mentions van-
|
||||
else ok "--post-check skips van-nvme-watch when ENABLE_NVME_WATCH=0"; fi
|
||||
if grep -q 'USB hub' deploy.sh; then bad "stale 'USB hub' text remains in deploy.sh"; else ok "no stale 'USB hub' text in deploy.sh"; fi
|
||||
|
||||
# 12. unit-state classification used by post_check (run-to-completion units are not failures)
|
||||
for row in "active success 0:ok" "inactive success 0:finished" "failed exit-code 1:warn" \
|
||||
"activating success 0:wait" "inactive exit-code 1:warn" "inactive success 1:warn"; do
|
||||
args=${row%%:*}; want=${row##*:}
|
||||
# shellcheck disable=SC2086
|
||||
got=$(./deploy.sh --classify-unit $args 2>&1) || true
|
||||
if [ "$got" = "$want" ]; then ok "--classify-unit $args -> $want"; else bad "--classify-unit $args gave '$got', want '$want'"; fi
|
||||
done
|
||||
|
||||
exit "$fail"
|
||||
|
||||
Reference in New Issue
Block a user