Merge lp:~sylvain-pineau/checkbox/fix-1559189 into lp:checkbox

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 4289
Merged at revision: 4289
Proposed branch: lp:~sylvain-pineau/checkbox/fix-1559189
Merge into: lp:checkbox
Diff against target: 30 lines (+6/-2)
1 file modified
checkbox-support/checkbox_support/parsers/udevadm.py (+6/-2)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/fix-1559189
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+290338@code.launchpad.net

Description of the change

Fixes the linked bug

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

self-approved after validating both udevadm output provided in the bug report.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-support/checkbox_support/parsers/udevadm.py'
2--- checkbox-support/checkbox_support/parsers/udevadm.py 2016-02-17 16:40:50 +0000
3+++ checkbox-support/checkbox_support/parsers/udevadm.py 2016-03-29 16:52:20 +0000
4@@ -633,12 +633,16 @@
5 elif (self._environment.get("DEVTYPE") == "disk" and
6 "ID_MODEL_ENC" in self._environment):
7 return decode_id(self._environment["ID_MODEL_ENC"])
8- if self.driver == "nvme" and self.bus == 'pci' and self._stack:
9+ elif self.driver == "nvme" and self.bus == 'pci' and self._stack:
10 parent = self._stack[-1]
11 if parent.product:
12 return parent.product
13 else:
14 return self.name
15+ elif (
16+ self._environment.get("DEVTYPE") == "disk" and
17+ self.driver == 'virtio_blk' and self.bus == 'virtio'):
18+ return self.name
19
20 # floppy
21 if self.driver == "floppy":
22@@ -810,7 +814,7 @@
23 device._mmc_type == 'MMC'):
24 return False
25 # Do not ignore QEMU/KVM virtio disks
26- if ("ID_PART_TABLE_TYPE" in device._environment and
27+ if ("DEVTYPE" in device._environment and
28 device.bus == "virtio" and
29 device.driver == "virtio_blk"):
30 return False

Subscribers

People subscribed via source and target branches