ci: Make sure that the Crosvm control socket has been removed
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Mon, 5 Sep 2022 09:01:00 +0000 (11:01 +0200)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Mon, 5 Sep 2022 12:12:58 +0000 (14:12 +0200)
To avoid Crosvm bailing out at startup like this:

ERROR - dEQP error: [ERROR:src/main.rs:2826] invalid value "crosvm-14.sock": this socket path already exists

Closes: #7093

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18414>

.gitlab-ci/crosvm-runner.sh

index 0acd7d7..f88bab0 100755 (executable)
@@ -55,8 +55,12 @@ VM_SOCKET=crosvm-${THREAD}.sock
 # 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
    # Wait for socats from that invocation to drain
-   sleep 5
+   sleep 4
 fi
 
 set_vsock_context || { echo "Could not generate crosvm vsock CID" >&2; exit 1; }