Merge ~rodsmith/plainbox-provider-certification-server:fix-precheck-iperf-delay into plainbox-provider-certification-server:master

Proposed by Rod Smith
Status: Merged
Approved by: Rod Smith
Approved revision: 0d1e58503b13ac9ae280d80af3328b117e908b67
Merged at revision: 45c15d0af2e5ab74a44eb027d64e95a61896a634
Proposed branch: ~rodsmith/plainbox-provider-certification-server:fix-precheck-iperf-delay
Merge into: plainbox-provider-certification-server:master
Diff against target: 13 lines (+1/-1)
1 file modified
tools/canonical-certification-precheck (+1/-1)
Reviewer Review Type Date Requested Status
Jeff Lane  Approve
Review via email: mp+372774@code.launchpad.net

Commit message

Add a 5-second timeout to the iperf3 check in canonical-certification-precheck

Description of the change

I used the bash "timeout" feature because, although some versions of iperf3 support a --connect-timeout option that should do the job, that's not supported in all versions of iperf3.

To post a comment you must log in.
Revision history for this message
Jeff Lane  (bladernr) wrote :

LGTM. Maybe in the future we can change this to use the built in function, but this is good. Thanks for addressing this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/canonical-certification-precheck b/tools/canonical-certification-precheck
2index c3a1c04..b5337d0 100755
3--- a/tools/canonical-certification-precheck
4+++ b/tools/canonical-certification-precheck
5@@ -573,7 +573,7 @@ fi
6 local iperf3found=0
7 for iperfserver in $(grep ^TEST_TARGET_IPERF /etc/xdg/canonical-certification.conf | cut -d = -f 2 | sed s/,/\\n/g)
8 do
9- iperf3 -c $iperfserver -n 1 >/dev/null 2>&1
10+ timeout 5 iperf3 -c $iperfserver -n 1 >/dev/null 2>&1
11 if [ $? = 0 ]; then
12 echo " Iperf3 server found on port 5201 on $iperfserver"
13 iperf3found=1

Subscribers

People subscribed via source and target branches

to all changes: