* [PATCH] test/lib/test: Clean up iperf3 JSON files before starting the server
@ 2022-11-16 13:53 Stefano Brivio
2022-11-16 23:02 ` David Gibson
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Brivio @ 2022-11-16 13:53 UTC (permalink / raw)
To: passt-dev; +Cc: David Gibson
...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.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
test/lib/test | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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="$((${1} - 1))"; shift
__time="${1}"; shift
+ 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() {
__bw=$(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'
TEST_ONE_subs="$(list_add_pair "${TEST_ONE_subs}" "__${__var}__" "${__bw}" )"
--
@@ -31,6 +31,8 @@ test_iperf3() {
__procs="$((${1} - 1))"; shift
__time="${1}"; shift
+ 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() {
__bw=$(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'
TEST_ONE_subs="$(list_add_pair "${TEST_ONE_subs}" "__${__var}__" "${__bw}" )"
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] test/lib/test: Clean up iperf3 JSON files before starting the server
2022-11-16 13:53 [PATCH] test/lib/test: Clean up iperf3 JSON files before starting the server Stefano Brivio
@ 2022-11-16 23:02 ` David Gibson
2022-11-17 7:25 ` Stefano Brivio
0 siblings, 1 reply; 3+ messages in thread
From: David Gibson @ 2022-11-16 23:02 UTC (permalink / raw)
To: Stefano Brivio; +Cc: passt-dev
[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]
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.
>
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Even better would be to put those in the STATEDIR, of course.
> ---
> test/lib/test | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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="$((${1} - 1))"; shift
> __time="${1}"; shift
>
> + 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() {
>
> __bw=$(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'
>
> TEST_ONE_subs="$(list_add_pair "${TEST_ONE_subs}" "__${__var}__" "${__bw}" )"
>
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] test/lib/test: Clean up iperf3 JSON files before starting the server
2022-11-16 23:02 ` David Gibson
@ 2022-11-17 7:25 ` Stefano Brivio
0 siblings, 0 replies; 3+ messages in thread
From: Stefano Brivio @ 2022-11-17 7:25 UTC (permalink / raw)
To: David Gibson; +Cc: passt-dev
On Thu, 17 Nov 2022 10:02:03 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:
> 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.
> >
> > Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
>
> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
>
> Even better would be to put those in the STATEDIR, of course.
Oops, right, I keep forgetting about that one too.
--
Stefano
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-17 7:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16 13:53 [PATCH] test/lib/test: Clean up iperf3 JSON files before starting the server Stefano Brivio
2022-11-16 23:02 ` David Gibson
2022-11-17 7:25 ` Stefano Brivio
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).