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>
This commit is contained in:
parent
df29ebfe02
commit
856b04490a
1 changed files with 6 additions and 3 deletions
|
@ -40,7 +40,7 @@ test_iperf3() {
|
||||||
|
|
||||||
sleep 1 # Wait for server to be ready
|
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' \
|
' for i in $(seq 0 '${__procs}'); do' \
|
||||||
' iperf3 -c '${__dest}' -p '${__port} \
|
' iperf3 -c '${__dest}' -p '${__port} \
|
||||||
|
@ -49,9 +49,12 @@ test_iperf3() {
|
||||||
' wait' \
|
' wait' \
|
||||||
')'
|
')'
|
||||||
|
|
||||||
|
sleep $((__time + 5))
|
||||||
|
|
||||||
# If client fails to deliver control message, tell server we're done
|
# If client fails to deliver control message, tell server we're done
|
||||||
pane_or_context_run "${__sctx}" \
|
pane_or_context_run "${__sctx}" 'kill -INT $(cat s*.pid); rm s*.pid'
|
||||||
'sleep 2; kill -INT $(cat s*.pid); rm s*.pid'
|
|
||||||
|
sleep 1 # ...and wait for output to be flushed
|
||||||
|
|
||||||
__jval=".end.sum_received.bits_per_second"
|
__jval=".end.sum_received.bits_per_second"
|
||||||
for __opt in ${@}; do
|
for __opt in ${@}; do
|
||||||
|
|
Loading…
Reference in a new issue