Merge ~sylvain-pineau/plainbox-provider-checkbox:fix-1903244 into plainbox-provider-checkbox:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 182f27d6eb131a49df247c1b9d79288622f41f9f
Merged at revision: dc30e34be6d8fb8c2e0587f0d03bab61dbe1ab06
Proposed branch: ~sylvain-pineau/plainbox-provider-checkbox:fix-1903244
Merge into: plainbox-provider-checkbox:master
Diff against target: 37 lines (+11/-0)
1 file modified
bin/removable_storage_test.py (+11/-0)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+401866@code.launchpad.net

Description of the change

Fixes the usb3 storage test to work on arm.

Tested using sideloading on the target:

# ./test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
Found the following mounted usb partitions:
    /dev/sda1 : /media/ubuntu/a : 5000000000 bits/s
--------------------
/dev/sda1 (Total Data Size / iteration: 255.9662 MB):
 [Iteration 0] Average Speed: 22.1739
 Summary:
  Total Data Attempted: 255.9662 MB
  Total Time to write: 11.5436 secs
  Average Write Time: 11.5436 secs
  Average Write Speed: 22.1739 MB/s
  --------------------------------
  Device Detected: SuperSpeed USB
  Driver Detected: xhci_hcd

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

self-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/removable_storage_test.py b/bin/removable_storage_test.py
2index 4253cbf..a3eaa4b 100755
3--- a/bin/removable_storage_test.py
4+++ b/bin/removable_storage_test.py
5@@ -6,6 +6,7 @@ import dbus
6 import hashlib
7 import logging
8 import os
9+import platform
10 import re
11 import shlex
12 import subprocess
13@@ -476,14 +477,24 @@ class DiskTest():
14 udev_devices = get_udev_block_devices(udev_client)
15 # Get a collection of all udev devices corresponding to xhci devices
16 udev_devices_xhci = get_udev_xhci_devices(udev_client)
17+ if platform.machine() in ("aarch64", "armv7l"):
18+ enumerator = GUdev.Enumerator(client=udev_client)
19+ udev_devices_xhci = [
20+ device for device in enumerator.execute()
21+ if (device.get_driver() == 'xhci-hcd')]
22 for udev_device_xhci in udev_devices_xhci:
23 pci_slot_name = udev_device_xhci.get_property('PCI_SLOT_NAME')
24+ xhci_devpath = udev_device_xhci.get_property('DEVPATH')
25 for udev_device in udev_devices:
26 devpath = udev_device.get_property('DEVPATH')
27 if (self._compare_pci_slot_from_devpath(devpath,
28 pci_slot_name)):
29 self.rem_disks_xhci[
30 udev_device.get_property('DEVNAME')] = 'xhci'
31+ if platform.machine() in ("aarch64", "armv7l"):
32+ if xhci_devpath in devpath:
33+ self.rem_disks_xhci[
34+ udev_device.get_property('DEVNAME')] = 'xhci'
35 return self.rem_disks_xhci
36
37 def mount(self):

Subscribers

People subscribed via source and target branches