[usb3/storage-automated] test.rem_disks_xhci[disk]: KeyError

Bug #1334991 reported by Yung Shen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Critical
Taihsiang Ho

Bug Description

plainbox-provider-checkbox version: 0.6~dev+bzr3094+pkg6~ubuntu14.04.1

this is being found on particular desktop systems(about 3 so far)

the issue can be reproduce on those systems with any usb3 flash drivers with following commands

$ ./usr/lib/2013.com.canonical.certification:checkbox/bin/removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd

Output:
Found the following mounted usb partitions:
    /dev/sdb1 : /media/u/C936-1EB6 : 5000000000 bits/s
--------------------
/dev/sdb1 (Total Data Size / iteration: 255.9662 MB):
 [Iteration 0] Average Speed: 5.5610
 Summary:
  Total Data Attempted: 255.9662 MB
  Total Time to write: 46.0287 secs
  Average Write Time: 46.0287 secs
  Average Write Speed: 5.5610 MB/s
Traceback (most recent call last):
  File "./removable_storage_test", line 628, in <module>
    sys.exit(main())
  File "./removable_storage_test", line 605, in main
    'xhci' == test.rem_disks_xhci[disk]):
KeyError: '/dev/sdb1'

the same usb drive, [125f:c13a], does not received this error on other desktops or laptops.

Related branches

Revision history for this message
Yung Shen (kaxing) wrote :
description: updated
Yung Shen (kaxing)
description: updated
Revision history for this message
Yung Shen (kaxing) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :

OK, a simplistic solution would be to change 'xhci' == test.rem_disks_xhci[disk] to 'xhci' == test.rem_disks_xhci.get(disk,"") to guarantee we get a comparable value all the time. However, there seems to be a deeper problem here, where the script is not considering /dev/sdb1 as having the xhci driver. I checked the attached udev file and it *is* using the xhci_hcd driver, so the logic is somewhow getting things wrong.

I'd prefer Tai to look at this, since he wrote the code, so I'll assign the bug to him, I can look into this next week if there haven't been any changes by then.

Changed in plainbox-provider-checkbox:
assignee: nobody → Taihsiang Ho (taihsiangho)
Changed in plainbox-provider-checkbox:
milestone: 0.6 → 0.7
Changed in plainbox-provider-checkbox:
milestone: 0.7 → 0.8
Taihsiang Ho (tai271828)
Changed in plainbox-provider-checkbox:
status: Confirmed → In Progress
Revision history for this message
Taihsiang Ho (tai271828) wrote :

in removable_storage_test

269 if (pci_slot_name ==
270 udev_device.get_property('DEVPATH').split('/')[3]):

for unknown reasons, the DEVPATH pci slot looks like, for example from the comment #1

E: DEVPATH=/devices/pci0000:00/0000:00:1c.6/0000:08:00.0
......
E: DEVPATH=/devices/pci0000:00/0000:00:1c.6/0000:08:00.0/usb4/4-4/4-4:1.0/host19/target19:0:0/19:0:0:0/block/sdb

namely, the parser should be sth. like
   udev_device.get_property('DEVPATH').split('/')[4]

to get the right pci slot to compare.

----

NEXT:
figure out how the hierarchy was decided and
how to integrate the parsers, split('/')[3] and split('/')[4].

namely a smarter parser should be provided.

Revision history for this message
Taihsiang Ho (tai271828) wrote :
Taihsiang Ho (tai271828)
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
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.