summaryrefslogtreecommitdiff
path: root/.gitlab-ci
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2022-09-06 16:48:04 +0200
committerMarge Bot <emma+marge@anholt.net>2022-09-07 09:18:49 +0000
commit9e19a40e56b17025a3b1f2e9587f149bd95e0da5 (patch)
tree69ee81803a7246275a8b34894a6101cd0619dd95 /.gitlab-ci
parentd6321fee5fb52c05ef0149ce667d9b561f33bb21 (diff)
downloadmesa-9e19a40e56b17025a3b1f2e9587f149bd95e0da5.tar.gz
mesa-9e19a40e56b17025a3b1f2e9587f149bd95e0da5.tar.bz2
mesa-9e19a40e56b17025a3b1f2e9587f149bd95e0da5.zip
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>
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x.gitlab-ci/crosvm-runner.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/.gitlab-ci/crosvm-runner.sh b/.gitlab-ci/crosvm-runner.sh
index f88bab08303..0edc72226a4 100755
--- a/.gitlab-ci/crosvm-runner.sh
+++ b/.gitlab-ci/crosvm-runner.sh
@@ -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; }