qemu: agent-test.sh counts a zombie child as killed (CI containers reap nothing)
ci / patches-apply (push) Successful in 1m1s
ci / test (pull_request) Successful in 9s
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 28s
ci / mcdc (push) Successful in 35s
ci / bench (push) Successful in 7s
ci / test (push) Successful in 12s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / badges (push) Skipped
ci / qemu-tools (push) Successful in 2m21s
ci / bench (pull_request) Successful in 7s
ci / mcdc (pull_request) Successful in 35s
ci / kernel-symbols (push) Successful in 4m10s
ci / quality (push) Successful in 29s
ci / prune-artifacts (pull_request) Skipped
ci / qemu-tools (pull_request) Successful in 2m6s
ci / patches-apply (pull_request) Successful in 1m8s
ci / badges (pull_request) Skipped
ci / kernel-symbols (pull_request) Successful in 3m49s
ci / patches-apply (push) Successful in 1m1s
ci / test (pull_request) Successful in 9s
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 28s
ci / mcdc (push) Successful in 35s
ci / bench (push) Successful in 7s
ci / test (push) Successful in 12s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / badges (push) Skipped
ci / qemu-tools (push) Successful in 2m21s
ci / bench (pull_request) Successful in 7s
ci / mcdc (pull_request) Successful in 35s
ci / kernel-symbols (push) Successful in 4m10s
ci / quality (push) Successful in 29s
ci / prune-artifacts (pull_request) Skipped
ci / qemu-tools (pull_request) Successful in 2m6s
ci / patches-apply (pull_request) Successful in 1m8s
ci / badges (pull_request) Skipped
ci / kernel-symbols (pull_request) Successful in 3m49s
Run 10403: under a CI job container's non-reaping PID 1 the script child the deadline killed stays a zombie, and kill -0 still found it. The check now reads the process state from /proc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BdKQBQkJkq4zE7iPFMkAhS
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bbc91618f8
commit
1e182a44e4
@@ -80,7 +80,10 @@ took=$(( $(date +%s) - start ))
|
||||
check "a script past its deadline answers 124" grep -qx '<<END t1 124>>' "$WORK/late.out"
|
||||
check "the deadline holds (took ${took}s)" test "$took" -le 5
|
||||
child="$(cat "$WORK/child.pid" 2>/dev/null)"
|
||||
check "the script's child is killed too" bash -c "[ -n '$child' ] && ! kill -0 '$child' 2>/dev/null"
|
||||
# Gone or a zombie: in a CI job container PID 1 reaps nothing, so a killed
|
||||
# orphan stays a zombie that kill -0 still finds.
|
||||
gone() { [ ! -r "/proc/$1/stat" ] || [ "$(sed 's/.*) //' "/proc/$1/stat" | cut -d' ' -f1)" = Z ]; }
|
||||
check "the script's child is killed too" bash -c "[ -n '$child' ] && $(declare -f gone); sleep 0.5; gone '$child'"
|
||||
check "the agent answers after a timeout" grep -qx '<<PONG>>' "$WORK/late.out"
|
||||
|
||||
# Malformed requests: one error line each, nothing runs.
|
||||
|
||||
Reference in New Issue
Block a user