From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202410 header.b=bad70wI6; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id EE3775A004C for ; Tue, 05 Nov 2024 02:44:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1730771044; bh=YGmUuvfcvd8mCGs7Odh2corv8hXfol8/VWGhpiWKERM=; h=From:To:Cc:Subject:Date:From; b=bad70wI6NumoQSoRClxsl8/OG+jCmRH5QyG+Ucx6KXYPObCxWMgk77hfSVpdbPy3y TIDwhRaSxiYA9m93MMoGNM+rtqIwXsV4nJtkGsPv/ldailCSXuuHIjMYokVVb82ot1 usW8RINlp2SHxKOzIYyz/3cZxOdnWoz8uy6cPv198rPEHkm+pHxIluCx3/sLaqUr8P aoB+3bvSpikrBpLwbOI16fsHF5+xtuK85Map4d98ouC3j2bDecgAlgMEPJGmQWFlZF nFpso8k78umCpQwHqYHDfppyk+D5L8s2PcKSw8XmKerpwUdu/C1P4mbhHURlH7CLBu +BYs4JfCrx6fA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XjB2X3cdvz4x04; Tue, 5 Nov 2024 12:44:04 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH] test: Adjust misplaced sleeps in two_guests code Date: Tue, 5 Nov 2024 12:44:04 +1100 Message-ID: <20241105014404.669480-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: TOYBCS6THNKN6WP7HTMHQBJIWO2ZGFEV X-Message-ID-Hash: TOYBCS6THNKN6WP7HTMHQBJIWO2ZGFEV X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Most of our transfer tests using socat use 'sleep' waaiting for the server side to be ready before starting the client. However in two_guests/basic the sleep is in the wrong place: rather than being between starting the server and starting the client, it's after waiting for the server to complete. This causes occasional hangs when the client runs before the server is ready - in that case the receiving guest sends an RST, which we don't (currently) propagate back to the sender. Signed-off-by: David Gibson --- test/two_guests/basic | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/two_guests/basic b/test/two_guests/basic index 9ba5efe..e2338ff 100644 --- a/test/two_guests/basic +++ b/test/two_guests/basic @@ -52,33 +52,33 @@ check [ "__ADDR2_6__" = "__HOST_ADDR6__" ] test TCP/IPv4: guest 1 > guest 2 g1out GW1 ip -j -4 route show|jq -rM '.[] | select(.dst == "default").gateway' guest2b socat -u TCP4-LISTEN:10004 OPEN:msg,create,trunc +sleep 1 guest1 echo "Hello_from_guest_1" | socat -u STDIN TCP4:__GW1__:10004 guest2w -sleep 1 g2out MSG2 cat msg check [ "__MSG2__" = "Hello_from_guest_1" ] test TCP/IPv6: guest 2 > guest 1 g2out GW2_6 ip -j -6 route show|jq -rM '.[] | select(.dst == "default").gateway' guest1b socat -u TCP6-LISTEN:10001 OPEN:msg,create,trunc +sleep 1 guest2 echo "Hello_from_guest_2" | socat -u STDIN TCP6:[__GW2_6__%__IFNAME2__]:10001 guest1w -sleep 1 g1out MSG1 cat msg check [ "__MSG1__" = "Hello_from_guest_2" ] test UDP/IPv4: guest 1 > guest 2 guest2b socat -u TCP4-LISTEN:10004 OPEN:msg,create,trunc +sleep 1 guest1 echo "Hello_from_guest_1" | socat -u STDIN TCP4:__GW1__:10004 guest2w -sleep 1 g2out MSG2 cat msg check [ "__MSG2__" = "Hello_from_guest_1" ] test UDP/IPv6: guest 2 > guest 1 guest1b socat -u TCP6-LISTEN:10001 OPEN:msg,create,trunc +sleep 1 guest2 echo "Hello_from_guest_2" | socat -u STDIN TCP6:[__GW2_6__%__IFNAME2__]:10001 guest1w -sleep 1 g1out MSG1 cat msg check [ "__MSG1__" = "Hello_from_guest_2" ] -- 2.47.0