]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: ignore both kill and wait errors in TEST-87-AUX-UTILS-VM.vmspawn 42291/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Mon, 25 May 2026 11:57:51 +0000 (12:57 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 25 May 2026 11:58:04 +0000 (12:58 +0100)
If the process already exited it's not just wait, but also kill that
will fail, so guard them both

Follow-up for d32bc9cd07e61e852c624f228dda8669f540bf6d

test/units/TEST-87-AUX-UTILS-VM.vmspawn.sh

index faf767df4e439e3924a9850cb9851a49380b94ab..0a33cbd60c5f2782c8dce3eb7576a8df9bb94736 100755 (executable)
@@ -156,7 +156,7 @@ varlinkctl call "$VARLINK_ADDR" io.systemd.MachineInstance.Resume '{}'
 sleep 0.5
 
 # Kill the subscriber and check output
-kill "$SUBSCRIBE_ALL_PID" 2>/dev/null; wait "$SUBSCRIBE_ALL_PID" 2>/dev/null || true
+{ kill "$SUBSCRIBE_ALL_PID" 2>/dev/null && wait "$SUBSCRIBE_ALL_PID" 2>/dev/null; } || :
 cat "$WORKDIR/events-all.json"
 
 # Verify initial READY event
@@ -180,7 +180,7 @@ sleep 0.2
 varlinkctl call "$VARLINK_ADDR" io.systemd.MachineInstance.Resume '{}'
 sleep 0.5
 
-kill "$SUBSCRIBE_FILTER_PID" 2>/dev/null; wait "$SUBSCRIBE_FILTER_PID" 2>/dev/null || true
+{ kill "$SUBSCRIBE_FILTER_PID" 2>/dev/null && wait "$SUBSCRIBE_FILTER_PID" 2>/dev/null; } || :
 cat "$WORKDIR/events-filtered.json"
 
 # Should have STOP but not RESUME