diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-09-22 16:27:27 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-09-22 16:54:09 +0200 |
commit | 856b04490adf3dee0fe5894c36dde29062aefbe9 (patch) | |
tree | 0ed1232b8ac9a8d4ebca32b468784810ec22de0a | |
parent | df29ebfe02aa0639278527b0fa2d90074263af0f (diff) | |
download | passt-856b04490adf3dee0fe5894c36dde29062aefbe9.tar passt-856b04490adf3dee0fe5894c36dde29062aefbe9.tar.gz passt-856b04490adf3dee0fe5894c36dde29062aefbe9.tar.bz2 passt-856b04490adf3dee0fe5894c36dde29062aefbe9.tar.lz passt-856b04490adf3dee0fe5894c36dde29062aefbe9.tar.xz passt-856b04490adf3dee0fe5894c36dde29062aefbe9.tar.zst passt-856b04490adf3dee0fe5894c36dde29062aefbe9.zip |
test/lib: Run also iperf3 clients in background, revert to time-based wait
Unfortunately, this partially counters recent efforts by David to
speed up these tests, but it looks like iperf3 clients don't reliably
terminate, in some rare cases I couldn't isolate yet.
For the moment being, reintroduce the time-based wait approach, now
using the configurable test duration, and terminate the servers at
the end of it, in case they're stuck. There's no point in keeping
the 'sleep 2' later, so drop that, and while at it, make sure that
the stuck servers have time to flush the JSON output before we use
it.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-x | test/lib/test | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/lib/test b/test/lib/test index d68ade4..7259383 100755 --- a/test/lib/test +++ b/test/lib/test @@ -40,7 +40,7 @@ test_iperf3() { sleep 1 # Wait for server to be ready - pane_or_context_run "${__cctx}" \ + pane_or_context_run_bg "${__cctx}" \ '(' \ ' for i in $(seq 0 '${__procs}'); do' \ ' iperf3 -c '${__dest}' -p '${__port} \ @@ -49,9 +49,12 @@ test_iperf3() { ' wait' \ ')' + sleep $((__time + 5)) + # If client fails to deliver control message, tell server we're done - pane_or_context_run "${__sctx}" \ - 'sleep 2; kill -INT $(cat s*.pid); rm s*.pid' + pane_or_context_run "${__sctx}" 'kill -INT $(cat s*.pid); rm s*.pid' + + sleep 1 # ...and wait for output to be flushed __jval=".end.sum_received.bits_per_second" for __opt in ${@}; do |