VirtualBox

Changeset 60552 in vbox


Ignore:
Timestamp:
Apr 18, 2016 5:48:47 PM (9 years ago)
Author:
vboxsync
Message:

ValidationKit/usb: Fixes for the reattach test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/usb/tdUsb1.py

    r60549 r60552  
    353353        """
    354354        # Get configured USB test devices from hostname we are running on
    355         sGadgetHost, _ = self.getGadgetParams(self.sHostname, sSpeed);
     355        sGadgetHost, uGadgetPort = self.getGadgetParams(self.sHostname, sSpeed);
    356356
    357357        oUsbGadget = usbgadget2.UsbGadget();
    358358        reporter.log('Connecting to UTS: ' + sGadgetHost);
    359         fRc = oUsbGadget.connectTo(30 * 1000, sGadgetHost);
     359        fRc = oUsbGadget.connectTo(30 * 1000, sGadgetHost,  uPort = uGadgetPort);
    360360        if fRc is True:
    361             reporter.log('Connect succeeded');
    362             self.oVBox.host.addUSBDeviceSource('USBIP', sGadgetHost, sGadgetHost + ':' + oUsbGadget.getUsbIpPort(), [], []);
    363 
    364             # Create device filter
    365             fRc = oSession.addUsbDeviceFilter('Compliance device', '0525', 'a4a0');
     361            self.oVBox.host.addUSBDeviceSource('USBIP', sGadgetHost, sGadgetHost + (':%s' % oUsbGadget.getUsbIpPort()), [], []);
     362
     363            # Create test device gadget and a filter to attach the device automatically.
     364            fRc = oUsbGadget.impersonate(usbgadget2.g_ksGadgetImpersonationTest);
    366365            if fRc is True:
    367                 fRc = oUsbGadget.impersonate(usbgadget2.g_ksGadgetImpersonationTest);
     366                iBusId, _ = oUsbGadget.getGadgetBusAndDevId();
     367                fRc = oSession.addUsbDeviceFilter('Compliance device', sVendorId = '0525', sProductId = 'a4a0', sPort = str(iBusId));
    368368                if fRc is True:
    369369
    370                     self.sleep(1);
     370                    # Wait a moment to let the USB device appear
     371                    self.sleep(3);
    371372
    372373                    # Do a rapid disconnect reconnect cycle. Wait a second before disconnecting
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette