Merge lp:~sylvain-pineau/checkbox/bug855382 into lp:checkbox

Proposed by Sylvain Pineau
Status: Merged
Approved by: Brendan Donegan
Approved revision: 1706
Merged at revision: 1709
Proposed branch: lp:~sylvain-pineau/checkbox/bug855382
Merge into: lp:checkbox
Diff against target: 47 lines (+11/-1)
2 files modified
checkbox/parsers/udevadm.py (+8/-1)
debian/changelog (+3/-0)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/bug855382
Reviewer Review Type Date Requested Status
Brendan Donegan (community) Approve
Sylvain Pineau (community) Needs Resubmitting
Review via email: mp+126218@code.launchpad.net

Commit message

Allow udev_resource to correctly categorise some wireless devices with spurious PCI IDs - fixes LP:855382

Description of the change

This MR improves the wireless devices detection.
The wireless category is now set if the subsystem is equal to ieee80211.

To post a comment you must log in.
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Please noone approve this until I get a chance to test it on the culprit tomorrow. Looks like it will work though!

review: Needs Information
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

By the way, while we have this opportunity, it would be good to run flake8 on udevadm.py. I believe there's only one existing error.

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

I tested the fix with the export-db file attached to bug 855382, just need to modify lines 31-32 in udev_resource:

# Command to retrieve udev information.
COMMAND = "cat /home/sylvain/export-db"

And regarding pep8, it reports no errors for me.

1706. By Sylvain Pineau

Small fix after a flake8 check on udevadm.py

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

(pep|flake)8 OK

review: Needs Resubmitting
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

I heartily approve! Works on the mentioned Atheros chip and also Pandaboard ;)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox/parsers/udevadm.py'
2--- checkbox/parsers/udevadm.py 2012-08-16 08:27:48 +0000
3+++ checkbox/parsers/udevadm.py 2012-09-25 12:00:48 +0000
4@@ -91,6 +91,9 @@
5 if "IFINDEX" in self._environment:
6 return "NETWORK"
7
8+ if self.bus == "ieee80211":
9+ return "WIRELESS"
10+
11 if "PCI_CLASS" in self._environment:
12 pci_class_string = self._environment["PCI_CLASS"]
13 pci_class = int(pci_class_string, 16)
14@@ -156,7 +159,7 @@
15 return "BLUETOOTH"
16
17 if class_id == Pci.BASE_CLASS_BRIDGE \
18- and (subclass_id == Pci.CLASS_BRIDGE_PCMCIA \
19+ and (subclass_id == Pci.CLASS_BRIDGE_PCMCIA
20 or subclass_id == Pci.CLASS_BRIDGE_CARDBUS):
21 return "SOCKET"
22
23@@ -396,6 +399,10 @@
24 if not device.bus:
25 return True
26
27+ # Keep 80211 devices
28+ if device.bus == "ieee80211":
29+ return False
30+
31 # Ignore devices without product information
32 if not device.product and device.product_id is None:
33 return True
34
35=== modified file 'debian/changelog'
36--- debian/changelog 2012-09-24 15:05:45 +0000
37+++ debian/changelog 2012-09-25 12:00:48 +0000
38@@ -147,6 +147,9 @@
39 and moved the rendercheck/tarball job into an attachment (LP #1053033)
40 * scripts/optical_write_test: Filter ANSI escape char outputed by wodim
41 (LP: #1052803)
42+ * checkbox/parsers/udevadm.py: Improved wireless devices detection.
43+ The wireless category is now set if the subsystem is equal to ieee80211
44+ (LP: #855382)
45
46 [Zygmunt Krynicki]
47 * Fixed simple duplicate 'the' mistakes (LP: #1040022)

Subscribers

People subscribed via source and target branches