Module: Mesa
Branch: main
Commit: 9e19a40e56b17025a3b1f2e9587f149bd95e0da5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e19a40e56b17025a3b1f2e9587f149bd95e0da5

Author: Tomeu Vizoso <[email protected]>
Date:   Tue Sep  6 16:48:04 2022 +0200

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18454>

---

 .gitlab-ci/crosvm-runner.sh | 9 +++------
 1 file 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; 
}

Reply via email to