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
diff --git a/bin/removable_storage_test.py b/bin/removable_storage_test.py
index 4253cbf..a3eaa4b 100755
--- a/bin/removable_storage_test.py
+++ b/bin/removable_storage_test.py
@@ -6,6 +6,7 @@ import dbus
6import hashlib6import hashlib
7import logging7import logging
8import os8import os
9import platform
9import re10import re
10import shlex11import shlex
11import subprocess12import subprocess
@@ -476,14 +477,24 @@ class DiskTest():
476 udev_devices = get_udev_block_devices(udev_client)477 udev_devices = get_udev_block_devices(udev_client)
477 # Get a collection of all udev devices corresponding to xhci devices478 # Get a collection of all udev devices corresponding to xhci devices
478 udev_devices_xhci = get_udev_xhci_devices(udev_client)479 udev_devices_xhci = get_udev_xhci_devices(udev_client)
480 if platform.machine() in ("aarch64", "armv7l"):
481 enumerator = GUdev.Enumerator(client=udev_client)
482 udev_devices_xhci = [
483 device for device in enumerator.execute()
484 if (device.get_driver() == 'xhci-hcd')]
479 for udev_device_xhci in udev_devices_xhci:485 for udev_device_xhci in udev_devices_xhci:
480 pci_slot_name = udev_device_xhci.get_property('PCI_SLOT_NAME')486 pci_slot_name = udev_device_xhci.get_property('PCI_SLOT_NAME')
487 xhci_devpath = udev_device_xhci.get_property('DEVPATH')
481 for udev_device in udev_devices:488 for udev_device in udev_devices:
482 devpath = udev_device.get_property('DEVPATH')489 devpath = udev_device.get_property('DEVPATH')
483 if (self._compare_pci_slot_from_devpath(devpath,490 if (self._compare_pci_slot_from_devpath(devpath,
484 pci_slot_name)):491 pci_slot_name)):
485 self.rem_disks_xhci[492 self.rem_disks_xhci[
486 udev_device.get_property('DEVNAME')] = 'xhci'493 udev_device.get_property('DEVNAME')] = 'xhci'
494 if platform.machine() in ("aarch64", "armv7l"):
495 if xhci_devpath in devpath:
496 self.rem_disks_xhci[
497 udev_device.get_property('DEVNAME')] = 'xhci'
487 return self.rem_disks_xhci498 return self.rem_disks_xhci
488499
489 def mount(self):500 def mount(self):

Subscribers

People subscribed via source and target branches