From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 123545A0082 for ; Thu, 17 Nov 2022 00:27:05 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4NCK2G4TfPz4xZZ; Thu, 17 Nov 2022 10:27:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1668641222; bh=9UuwK4C42kOOuhDcqtNObZp+/I1wBLazaSn+xR1PIz8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d9DrYUmZky9IoIz0g89LaGjCHkPkLL6yxT2NO2l8eF4+vjFfhk+fOguzWCanWbk4L 8X1t+5lclkx2KzBVtMgtTIPQE1v9Ks1K7l1Fyrjsun5cPkYMXwseIpliUJ0phA7yzW b/VX0PNHm3TRfGtFS5zgXIfue5RfQjIW02oMEF7k= Date: Thu, 17 Nov 2022 10:02:03 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] test/lib/test: Clean up iperf3 JSON files before starting the server Message-ID: References: <20221116135331.248003-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/4NnvU1Mtd25Vq7w" Content-Disposition: inline In-Reply-To: <20221116135331.248003-1-sbrivio@redhat.com> Message-ID-Hash: AUKEFSDRB3FHUYZPFGCGDC6T46MN36PZ X-Message-ID-Hash: AUKEFSDRB3FHUYZPFGCGDC6T46MN36PZ 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: passt-dev@passt.top X-Mailman-Version: 3.3.3 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: --/4NnvU1Mtd25Vq7w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 16, 2022 at 02:53:31PM +0100, Stefano Brivio wrote: > ...instead of doing it after the test. Now that we have pre-built > guest images, we might also have old JSON files from previous, > interrupted test runs. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson Even better would be to put those in the STATEDIR, of course. > --- > test/lib/test | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/test/lib/test b/test/lib/test > index df32178..29612c2 100755 > --- a/test/lib/test > +++ b/test/lib/test > @@ -31,6 +31,8 @@ test_iperf3() { > __procs=3D"$((${1} - 1))"; shift > __time=3D"${1}"; shift > =20 > + pane_or_context_run "${__sctx}" 'rm -f s*.json' > + > pane_or_context_run_bg "${__sctx}" \ > 'for i in $(seq 0 '${__procs}'); do' \ > ' (iperf3 -s1J -p'${__port}' -i'${__time} \ > @@ -64,8 +66,6 @@ test_iperf3() { > =20 > __bw=3D$(pane_or_context_output "${__sctx}" \ > 'cat s*.json | jq -rMs "map('${__jval}') | add"') > - pane_or_context_run "${__sctx}" \ > - '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}" )" > =20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --/4NnvU1Mtd25Vq7w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoULxWu4/Ws0dB+XtgypY4gEwYSIFAmN1a+UACgkQgypY4gEw YSIH4hAAlly9Evy2iqobphmltrnz70WyWC06fIMl0lzRpk4xAFycJWIv3W12ByQP 1pwrwkOGZ6sjNuJkiiyXgDH6Tsx50Vep3AxGIHN8IFxZkYiTHpQdtIopVuCEMBOy pKUylw98d+dcnmpRsKQ9x1wilK44SFmrgzzGkC3Gn1ETUtc+S1hVmlNxeSKYa2DF EYCPyxdTye2VeQxSvfq9uka8oiJQOXBfEI6qX91dFuE7lIXOQIhCAHs93ckT6jHM JopWtnIzxbxc9UyoMkx+5DsXMXyO5FpgPNe4L9yGB8GHpGTQ4vIz5nwSbalI7Es3 dyOSuzh59ZcxIaBLD9UzAk4V8luq2xSiUgGq29oCGyLuXHuv+IfZWHEqg8Bi0wFR C98BylebHf+WxMwUqYFtIPgLARRk4UTL5F+A3nqUJUcslrtRGZv3SaxBXs6cP7O+ g3cp2ldFv6nkg4DAn8yK3nsuGB/19Yi7Dc3+ZHTlXH0G7MDTIBJTjfdoQHE7LL9b IcVuCPa85jri5s2Gqecp/rUMY85bMXkrRWnRZH4t2bMgOmn6nXUlH/TStPpGNIgD DlFUhXJWQRpGkO2Cwgtilae5NCe07Or9TLxb6D94Q7KlCVQvKPnN+rwXEvza1ylS CjRO1ZKDOAGVPTzGVzlJ005ejQVV9eb6fzs3QwIxvQt45nkAcWs= =ldCB -----END PGP SIGNATURE----- --/4NnvU1Mtd25Vq7w--