test: ignore both kill and wait errors in TEST-87-AUX-UTILS-VM.vmspawn

If the process already exited it's not just wait, but also kill that
will fail, so guard them both

Follow-up for d32bc9cd07
This commit is contained in:
Luca Boccassi
2026-05-25 12:58:04 +01:00
parent 89f13af5f9
commit f6cd374e47
+2 -2
View File
@@ -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