ci: Crosvm won't remove the control socket file on stop
When sending the stop command to a lingering Crosvm instance, the socket file will remain and the next instance will fail to start. Make sure the file is deleted before starting Crosvm with the same path. Acked-by: David Heidelberg <david.heidelberg@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18454>
This commit is contained in:
@@ -54,13 +54,10 @@ VM_SOCKET=crosvm-${THREAD}.sock
|
||||
# was terminated due to timeouts. This "vm stop" may fail if the crosvm died
|
||||
# without cleaning itself up.
|
||||
if [ -e $VM_SOCKET ]; then
|
||||
crosvm stop $VM_SOCKET || rm -rf $VM_SOCKET
|
||||
# Wait for Crosvm to have removed the socket
|
||||
until [ ! -f $VM_SOCKET ]; do
|
||||
sleep 1
|
||||
done
|
||||
crosvm stop $VM_SOCKET || true
|
||||
# Wait for socats from that invocation to drain
|
||||
sleep 4
|
||||
sleep 5
|
||||
rm -rf $VM_SOCKET || true
|
||||
fi
|
||||
|
||||
set_vsock_context || { echo "Could not generate crosvm vsock CID" >&2; exit 1; }
|
||||
|
||||
Reference in New Issue
Block a user