From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 2/5] test/lib: Wait for kernel to free up ports used by iperf3 before reusing them Date: Fri, 23 Sep 2022 02:53:24 +0200 Message-ID: <20220923005327.1000042-3-sbrivio@redhat.com> In-Reply-To: <20220923005327.1000042-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6139240232311425131==" --===============6139240232311425131== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable If we start another server on the same port right away, we might fail to bind the port. A small delay appears to be needed -- I'm not entirely sure why at this point. Signed-off-by: Stefano Brivio --- test/lib/test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/lib/test b/test/lib/test index 7259383..558d0f0 100755 --- a/test/lib/test +++ b/test/lib/test @@ -68,6 +68,8 @@ test_iperf3() { 'for i in $(seq 0 '${__procs}'); do rm s${i}.json; done' =20 TEST_ONE_subs=3D"$(list_add_pair "${TEST_ONE_subs}" "__${__var}__" "${__bw}= " )" + + sleep 3 # Wait for kernel to free up ports } =20 test_one_line() { --=20 2.35.1 --===============6139240232311425131==--