summaryrefslogtreecommitdiff
path: root/bin
diff options
authorTaihsiang Ho <taihsiang.ho@canonical.com>2014-07-18 14:37:31 +0800
committerTaihsiang Ho <taihsiang.ho@canonical.com>2014-07-18 14:37:31 +0800
commitb046d057ad96e7c8c638c48ea7117772426542f2 (patch)
treeafe627776caefc75ba9e409a00e4c120bbbe2d7f /bin
parent0d2ccbb8a689af32fd05b2cce5a0415aa1909784 (diff)
typo: 1.correct dictionary value should be DEVNAME, not DEVPATH 2.the upper of sysfs pci tree should be smaller index value, not larger value
Diffstat (limited to 'bin')
-rwxr-xr-xbin/removable_storage_test5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/removable_storage_test b/bin/removable_storage_test
index 53304b9..9360bec 100755
--- a/bin/removable_storage_test
+++ b/bin/removable_storage_test
@@ -266,7 +266,8 @@ class DiskTest():
devpath = udev_device.get_property('DEVPATH')
if (self._compare_pci_slot_from_devpath(devpath,
pci_slot_name)):
- self.rem_disks_xhci[devpath] = 'xhci'
+ self.rem_disks_xhci[
+ udev_device.get_property('DEVNAME')] = 'xhci'
except:
logging.error("Failed to get driver information.")
@@ -369,7 +370,7 @@ class DiskTest():
dl = devpath.split('/')
s = set([x for x in dl if dl.count(x) > 1])
if ((pci_slot_name in dl)
- and (dl.index(pci_slot_name) > dl.index('block'))
+ and (dl.index(pci_slot_name) < dl.index('block'))
and (not(pci_slot_name in s))):
# 1. there is such pci_slot_name
# 2. sysfs topology looks like