network script incorrectly parsing iperf output

Bug #1290981 reported by Daniel Manrique
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
High
Daniel Manrique

Bug Description

A sample run of network script on a really fast link results in this:

[ 3] local 172.100.202.227 port 39630 connected with 172.100.202.223 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 0.9 sec 1.00 GBytes 9.14 Gbits/sec
Transfer speed: 14 Gb/s
70.00% of theoretical max 20000Mb/s

Raw iperf output says 9.14 Gbits/sec, but the parsed result (the one with "Transfer Speed:" says 14 Gb/s. It's parsing the units correctly, but not the quantity, chopping off what's before the decimal point.
This is because the regex used to parse the speed won't consider a dot part of the quantity:

       match = re.search(r'\d+\s([GM])bits', iperf_return)

it should be something like this:

       match = re.search(r'[\d\.]+\s([GM])bits', iperf_return)

Tags: scripts

Related branches

Daniel Manrique (roadmr)
Changed in checkbox:
status: Triaged → In Progress
assignee: nobody → Daniel Manrique (roadmr)
Daniel Manrique (roadmr)
Changed in checkbox:
status: In Progress → Fix Committed
Zygmunt Krynicki (zyga)
affects: checkbox → plainbox-provider-checkbox
Changed in plainbox-provider-checkbox:
milestone: 2014-mar-28 → none
Daniel Manrique (roadmr)
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
milestone: none → 0.5
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.