arch-run: Wait for incoming socket being removed

Sometimes, QEMU needs a bit longer to remove the incoming migration
socket. This happens in some environments on s390x for the
migration-skey-sequential test.

Instead of directly erroring out, wait for the removal of the socket.

Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240305141214.707046-1-nrb@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 2214d94..413f3ed 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -237,12 +237,8 @@
 	echo > ${dst_infifo}
 	rm ${dst_infifo}
 
-	# Ensure the incoming socket is removed, ready for next destination
-	if [ -S ${dst_incoming} ] ; then
-		echo "ERROR: Incoming migration socket not removed after migration." >& 2
-		qmp ${dst_qmp} '"quit"'> ${dst_qmpout} 2>/dev/null
-		return 2
-	fi
+	# Wait for the incoming socket being removed, ready for next destination
+	while [ -S ${dst_incoming} ] ; do sleep 0.1 ; done
 
 	wait ${live_pid}
 	ret=$?