Merge ~tai271828/plainbox-provider-checkbox:mr-usb3-arm into plainbox-provider-checkbox:master

Proposed by Taihsiang Ho
Status: Merged
Approved by: Taihsiang Ho
Approved revision: af38af920f7ebb33841d5a4355b92c62139ce24b
Merged at revision: c23e237865ef88cd38355763eeba80a2f32df1c4
Proposed branch: ~tai271828/plainbox-provider-checkbox:mr-usb3-arm
Merge into: plainbox-provider-checkbox:master
Diff against target: 14 lines (+2/-1)
1 file modified
bin/removable_storage_test.py (+2/-1)
Reviewer Review Type Date Requested Status
Taihsiang Ho Approve
Devices Certification Bot Needs Fixing
Jeff Lane  Approve
Review via email: mp+411183@code.launchpad.net

Description of the change

Detect usb3 on arm with different driver names

In 182f27d6eb131a49df247c1b9d79288622f41f9f we began to make the usb3
storage detection work on arm. We found on some platforms the USB driver
names are 'xhci_hcd' as well. This merge proposal includes the name
convention.

Fixes lp:1938777

# Steps to Test This Merge Proposal
1. attach usb sticks to Ampere Mt. Jade server like https://ubuntu.com/certified/201907-27213
2. invoke "checkbox-cli run com.canonical.certification::device com.canonical.certification::usb3/storage-server"

# Expected Results
1. The test job is launched and passed if the usb storage is usb3.
2. The test job is launched but skip the test if the usb storage is usb2.

# Additional Info
1. For platforms of amd64, there is no impact. I have tested with my own laptop with usb2 and usb3. For usb2 it should simply keep skipping the test. For usb3 it should launch the test and pass.

2. The test result from a Ampere Mt. Jade server
2-1. as-is
Found the following mounted usb partitions:
    /dev/sdc1 : /tmp/tmpy2ybath6 : 480000000 bits/s (Will not test it, speed is below 500000000 bits/s)
    /dev/sdb1 : /tmp/tmpeomig7lm : 5000000000 bits/s
--------------------
/dev/sdb1 (Total Data Size / iteration: 255.9662 MB):
        [Iteration 0] Average Speed: 16.4867
        Summary:
                Total Data Attempted: 255.9662 MB
                Total Time to write: 15.5256 secs
                Average Write Time: 15.5256 secs
                Average Write Speed: 16.4867 MB/s
                --------------------------------
                Device Detected: SuperSpeed USB
                Disk does not use xhci_hcd.
------------------------------------------------------------------------- >8 ---
Outcome: job failed
Finalizing session that hasn't been submitted anywhere: checkbox-run-2021-11-02T21.03.10
==================================[ Results ]===================================
 ☑ : Collect information about hardware devices (udev)
 ☑ : Collect information about supported types of USB
 ☑ : Collect information about installed software packages
 ☑ : Collect information about the CPU
 ☑ : Collect information about installed snap packages
 ☒ : Test USB 3.0 or 3.1 ports

2-2. to-be
Found the following mounted usb partitions:
    /dev/sdc1 : /tmp/tmpy2ybath6 : 480000000 bits/s (Will not test it, speed is below 500000000 bits/s)
    /dev/sdb1 : /tmp/tmpegd95dwv : 5000000000 bits/s
--------------------
/dev/sdb1 (Total Data Size / iteration: 255.9662 MB):
        [Iteration 0] Average Speed: 15.6147
        Summary:
                Total Data Attempted: 255.9662 MB
                Total Time to write: 16.3927 secs
                Average Write Time: 16.3927 secs
                Average Write Speed: 15.6147 MB/s
                --------------------------------
                Device Detected: SuperSpeed USB
                Driver Detected: xhci_hcd
------------------------------------------------------------------------- >8 ---
Outcome: job passed
Finalizing session that hasn't been submitted anywhere: checkbox-run-2021-11-02T20.29.05
==================================[ Results ]===================================
 ☑ : Collect information about hardware devices (udev)
 ☑ : Collect information about installed software packages
 ☑ : Collect information about installed snap packages
 ☑ : Collect information about supported types of USB
 ☑ : Collect information about the CPU
 ☑ : Test USB 3.0 or 3.1 ports

To post a comment you must log in.
Revision history for this message
Jeff Lane  (bladernr) wrote :

+1 I'm guessing that in some places xhci-hcd is just a shortcut to xhcd_hcd

bladernr@galactica:~/development/kernels/ubuntu/focal/drivers$ modinfo xhci-hcd
name: xhci_hcd
filename: (builtin)
license: GPL
author: Sarah Sharp
description: 'eXtensible' Host Controller (xHC) Driver
parm: link_quirk:Don't clear the chain bit on a link TRB (int)
parm: quirks:Bit flags for quirks to be enabled as default (ullong)
bladernr@galactica:~/development/kernels/ubuntu/focal/drivers$ modinfo xhci_hcd
name: xhci_hcd
filename: (builtin)
license: GPL
author: Sarah Sharp
description: 'eXtensible' Host Controller (xHC) Driver
parm: link_quirk:Don't clear the chain bit on a link TRB (int)
parm: quirks:Bit flags for quirks to be enabled as default (ullong)

review: Approve
Revision history for this message
Devices Certification Bot (ce-certification-qa) wrote :

The merge was fine but running tests failed.

"10.38.105.108"
"10.38.105.54"
"10.38.105.197"
[xenial] [16:26:19] starting container
[bionic] [16:26:21] starting container
Device project added to xenial-testing
Device project added to bionic-testing
"10.38.105.54"
[xenial] [16:26:35] provisioning container
"10.38.105.114"
[bionic] [16:26:38] provisioning container
[xenial] [16:27:37] Starting tests...
[xenial] Found a test script: ./requirements/container-tests-provider-checkbox
[bionic] [16:27:37] Starting tests...
[bionic] Found a test script: ./requirements/container-tests-provider-checkbox
[focal] [16:27:52] starting container
Device project added to focal-testing
"10.38.105.227"
[focal] [16:28:09] provisioning container
[xenial] [16:28:54] container-tests-provider-checkbox: FAIL
[xenial] output: https://paste.ubuntu.com/p/jF3vmmj3S2/
[xenial] [16:28:56] Fixing file permissions in source directory
[xenial] [16:28:57] Destroying container
[bionic] [16:29:09] container-tests-provider-checkbox: FAIL
[bionic] output: https://paste.ubuntu.com/p/ZpFx6s48nd/
[bionic] [16:29:11] Fixing file permissions in source directory
[bionic] [16:29:11] Destroying container
[focal] [16:29:48] Starting tests...
[focal] Found a test script: ./requirements/container-tests-provider-checkbox
[focal] [16:31:08] container-tests-provider-checkbox: FAIL
[focal] output: https://paste.ubuntu.com/p/XXVB9cFt4D/
[focal] [16:31:10] Fixing file permissions in source directory
[focal] [16:31:11] Destroying container

review: Needs Fixing
Revision history for this message
Taihsiang Ho (tai271828) wrote :

Fixed the flake8 error, rebased, and re-submitted. Approving directly because of +1 from Jeff and
Sylvain.

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 a3eaa4b..4dcd5b2 100755
3--- a/bin/removable_storage_test.py
4+++ b/bin/removable_storage_test.py
5@@ -481,7 +481,8 @@ class DiskTest():
6 enumerator = GUdev.Enumerator(client=udev_client)
7 udev_devices_xhci = [
8 device for device in enumerator.execute()
9- if (device.get_driver() == 'xhci-hcd')]
10+ if (device.get_driver() == 'xhci-hcd' or
11+ device.get_driver() == 'xhci_hcd')]
12 for udev_device_xhci in udev_devices_xhci:
13 pci_slot_name = udev_device_xhci.get_property('PCI_SLOT_NAME')
14 xhci_devpath = udev_device_xhci.get_property('DEVPATH')

Subscribers

People subscribed via source and target branches