test/lib/test: Wait a bit longer before terminating iperf3 processes

Sometimes tests run a few seconds longer than expected, wait a few
more seconds.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-10-21 04:51:39 +02:00
parent 27f5999677
commit 1f3d6f96b5

View file

@ -43,7 +43,7 @@ test_iperf3() {
pane_run "${__pane}" 'for i in $(seq 0 '${__procs}');' \ pane_run "${__pane}" 'for i in $(seq 0 '${__procs}');' \
'do ( iperf3 -c '"${__dest}"' -p '"${__port}" \ 'do ( iperf3 -c '"${__dest}"' -p '"${__port}" \
"${@}" ' -T s${i} & echo $! > c${i}.pid & ); done' "${@}" ' -T s${i} & echo $! > c${i}.pid & ); done'
sleep 36 sleep 40
pane_run "${__pane}" 'for i in $(seq 0 '${__procs}'); do'\ pane_run "${__pane}" 'for i in $(seq 0 '${__procs}'); do'\
'kill -INT $(cat c${i}.pid) 2>/dev/null; done' 'kill -INT $(cat c${i}.pid) 2>/dev/null; done'
) & ) &
@ -71,10 +71,10 @@ test_iperf3() {
fi fi
pane_wait "${__pane}" pane_wait "${__pane}"
sleep 38 sleep 45
pane_run "${__pane}" 'for i in $(seq 0 '${__procs}'); do' \ pane_run "${__pane}" 'for i in $(seq 0 '${__procs}'); do' \
'kill -INT $(cat s${i}.pid) 2>/dev/null; done' 'kill -INT $(cat s${i}.pid) 2>/dev/null; done'
sleep 1 sleep 4
pane_wait "${__pane}" pane_wait "${__pane}"
pane_run "${__pane}" '(cat s*.bw |' \ pane_run "${__pane}" '(cat s*.bw |' \
'sed '"'"'s/\(.*\)/\1\+/g'"'"' |' \ 'sed '"'"'s/\(.*\)/\1\+/g'"'"' |' \