VirtualBox

Ignore:
Timestamp:
Apr 15, 2016 2:34:35 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106643
Message:

ValidationKit/usb: Fixes, basic compliance testing works finally

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetClassTest.cpp

    r60517 r60522  
    3232#include <iprt/string.h>
    3333#include <iprt/symlink.h>
     34#include <iprt/thread.h>
    3435#include <iprt/types.h>
    3536
     
    359360                    if (RT_SUCCESS(rc))
    360361                        rc = RTLinuxSysFsWriteStrFile(pClass->pszUdc, 0, NULL, "%s/UDC", pClass->pszGadgetPath);
     362                    if (RT_SUCCESS(rc))
     363                        RTThreadSleep(500); /* Fudge: Sleep a bit to give the device a chance to appear on the host so binding succeeds. */
    361364                }
    362365            }
     
    406409static DECLCALLBACK(int) utsGadgetClassTestConnect(PUTSGADGETCLASSINT pClass)
    407410{
    408     return RTLinuxSysFsWriteStrFile("connect", 0, NULL, "/sys/class/udc/%s/soft_connect", pClass->pszUdc);
     411    int rc = RTLinuxSysFsWriteStrFile("connect", 0, NULL, "/sys/class/udc/%s/soft_connect", pClass->pszUdc);
     412    if (RT_SUCCESS(rc))
     413        RTThreadSleep(500); /* Fudge: Sleep a bit to give the device a chance to appear on the host so binding succeeds. */
     414
     415    return rc;
    409416}
    410417
Note: See TracChangeset for help on using the changeset viewer.

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