Merge lp:~rodsmith/checkbox/fix-net-speed-detection into lp:checkbox

Proposed by Rod Smith on 2016-10-05
Status: Merged
Approved by: Sylvain Pineau on 2016-10-07
Approved revision: 4509
Merged at revision: 4521
Proposed branch: lp:~rodsmith/checkbox/fix-net-speed-detection
Merge into: lp:checkbox
Diff against target: 20 lines (+2/-2)
1 file modified
providers/plainbox-provider-checkbox/bin/network (+2/-2)
To merge this branch: bzr merge lp:~rodsmith/checkbox/fix-net-speed-detection
Reviewer Review Type Date Requested Status
Jeff Lane 2016-10-05 Approve on 2016-10-07
Sylvain Pineau Approve on 2016-10-07
Review via email:

Description of the change

On a Cavium Thunder (ARM64) system, ethtool outputs less information than on (most? all?) AMD64 systems. This causes the network test to fail to identify the network speed, resulting in a default "pass" result even when the network is under-performing. This patch broadens the scope of the search for the link speed in the network test, causing correct behavior on both AMD64 and Cavium systems -- that is, a reported failure when the network test actually fails.

To post a comment you must log in.
Sylvain Pineau (sylvain-pineau) wrote :

Weird indeed. Thanks for the fix Rod

review: Approve
Jeff Lane (bladernr) wrote :

Well, Sylvain beat me to it... ack

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'providers/plainbox-provider-checkbox/bin/network'
2--- providers/plainbox-provider-checkbox/bin/network 2016-07-21 19:17:18 +0000
3+++ providers/plainbox-provider-checkbox/bin/network 2016-10-05 16:25:41 +0000
4@@ -296,14 +296,14 @@
5 logging.error(e.output)
6 ethinfo = None
7 finally:
8- expression = '(\\d+)(base)([A-Z]+)'
9+ expression = '(\\d+)(base)([A-Z]+)|(\d+)(Mb/s)'
10 regex = re.compile(expression)
11 speeds = [0]
12 if ethinfo:
13 for i in ethinfo:
14 hit =
15 if hit:
16- speeds.append(int(
17+ speeds.append(int(re.sub("\D", "",
18 return max(speeds)
20 @property


People subscribed via source and target branches