We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee3963c commit dae6afdCopy full SHA for dae6afd
1 file changed
tests/fm-secondmate-liveness.test.sh
@@ -522,8 +522,9 @@ SH
522
lock="$w/home/state/.account-lifecycle-sm1.lock"
523
assert_contains "$out" "SECONDMATE_LIVENESS: secondmate sm1: respawned" \
524
"parent treated a successfully handed-off lock as its own release failure"
525
- [ -n "$sleeper_pid" ] && kill -0 "$sleeper_pid" 2>/dev/null \
526
- || fail "handoff simulation did not leave its child owner alive"
+ if [ -z "$sleeper_pid" ] || ! kill -0 "$sleeper_pid" 2>/dev/null; then
+ fail "handoff simulation did not leave its child owner alive"
527
+ fi
528
[ "$(sed -n '1p' "$lock" 2>/dev/null)" = "$sleeper_pid" ] \
529
|| fail "parent released or replaced the child-owned lifecycle lock"
530
kill "$sleeper_pid" 2>/dev/null || true
0 commit comments