- Timestamp:
- Apr 19, 2016 11:15:23 AM (9 years ago)
- Location:
- trunk/src/VBox/ValidationKit/tests/usb
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/usb/Makefile.kmk
r60489 r60567 34 34 ValidationKitTestsUsb_EXEC_SOURCES := \ 35 35 $(PATH_SUB_CURRENT)/tdUsb1.py \ 36 $(PATH_SUB_CURRENT)/usbgadget.py 36 $(PATH_SUB_CURRENT)/usbgadget.py \ 37 $(PATH_SUB_CURRENT)/tst-utsgadget.py 37 38 38 39 VBOX_VALIDATIONKIT_PYTHON_SOURCES += $(ValidationKitTestsUsb_EXEC_SOURCES) -
trunk/src/VBox/ValidationKit/tests/usb/tdUsb1.py
r60562 r60567 49 49 50 50 # USB gadget control import 51 import usbgadget 2;51 import usbgadget; 52 52 53 53 class tdUsbBenchmark(vbox.TestDriver): # pylint: disable=R0902 … … 308 308 sGadgetHost, uGadgetPort = self.getGadgetParams(self.sHostname, sSpeed); 309 309 310 oUsbGadget = usbgadget 2.UsbGadget();310 oUsbGadget = usbgadget.UsbGadget(); 311 311 reporter.log('Connecting to UTS: ' + sGadgetHost); 312 312 fRc = oUsbGadget.connectTo(30 * 1000, sGadgetHost, uPort = uGadgetPort); … … 316 316 317 317 # Create test device gadget and a filter to attach the device automatically. 318 fRc = oUsbGadget.impersonate(usbgadget 2.g_ksGadgetImpersonationTest);318 fRc = oUsbGadget.impersonate(usbgadget.g_ksGadgetImpersonationTest); 319 319 if fRc is True: 320 320 iBusId, _ = oUsbGadget.getGadgetBusAndDevId(); … … 356 356 sGadgetHost, uGadgetPort = self.getGadgetParams(self.sHostname, sSpeed); 357 357 358 oUsbGadget = usbgadget 2.UsbGadget();358 oUsbGadget = usbgadget.UsbGadget(); 359 359 reporter.log('Connecting to UTS: ' + sGadgetHost); 360 360 fRc = oUsbGadget.connectTo(30 * 1000, sGadgetHost, uPort = uGadgetPort); … … 363 363 364 364 # Create test device gadget and a filter to attach the device automatically. 365 fRc = oUsbGadget.impersonate(usbgadget 2.g_ksGadgetImpersonationTest);365 fRc = oUsbGadget.impersonate(usbgadget.g_ksGadgetImpersonationTest); 366 366 if fRc is True: 367 367 iBusId, _ = oUsbGadget.getGadgetBusAndDevId(); -
trunk/src/VBox/ValidationKit/tests/usb/usbgadget.py
r60566 r60567 166 166 (u16 / 256) % 256) ); 167 167 168 def u8ToByteArray(u 8):168 def u8ToByteArray(uint8): 169 169 """Encodes the u8 value as a little endian byte (B) array.""" 170 return array.array('B', (u 8 % 256));170 return array.array('B', (uint8 % 256)); 171 171 172 172 def zeroByteArray(cb): … … 174 174 abArray = array.array('B', (0, )); 175 175 cb = cb - 1; 176 for i in range(cb): 176 for i in range(cb): # pylint: disable=W0612 177 177 abArray.append(0); 178 178 return abArray; … … 609 609 so the client can inspect it later on. 610 610 """ 611 if cMsTimeout ==None:611 if cMsTimeout is None: 612 612 cMsTimeout = self.getMsLeft(500); 613 613 cbMsg, sOpcode, abPayload = self.oTransport.recvMsg(cMsTimeout, fNoDataOk); … … 664 664 if sOpcode == "FALSE": 665 665 return False; 666 reporter.maybeErr(self.fErr, 'recvAckLogged: %s response was %s: %s' % (sCommand, sOpcode, getSZ(abPayload, 16, sOpcode))); 666 reporter.maybeErr(self.fErr, 'recvAckLogged: %s response was %s: %s' % \ 667 (sCommand, sOpcode, getSZ(abPayload, 16, sOpcode))); 667 668 return None; 668 669 … … 671 672 Wrapper for TransportBase.sendMsg that inserts the correct timeout. 672 673 """ 673 if cMsTimeout ==None:674 if cMsTimeout is None: 674 675 cMsTimeout = self.getMsLeft(500); 675 676 return self.oTransport.sendMsg(sOpcode, cMsTimeout, aoPayload); … … 1037 1038 reporter.fatalXcpt('socket.select() on connect failed'); 1038 1039 1040 # pylint: disable=R0916 1039 1041 if rc is True: 1040 1042 pass; … … 1050 1052 reporter.fatalXcpt('socket.connect((%s,%s)) failed; iRc=%s' % (self.sHostname, self.uPort, iRc)); 1051 1053 reporter.log2('TransportTcp::connect: rc=%s iRc=%s' % (rc, iRc)); 1054 # pylint: enable=R0916 1052 1055 except: 1053 1056 reporter.fatalXcpt('socket.connect((%s,%s)) failed' % (self.sHostname, self.uPort)); … … 1372 1375 fRc = True; 1373 1376 1377 # @todo 1378 if fUsbIpSupport is False: 1379 return False; 1380 1374 1381 reporter.log2('openTcpSession(%s, %s, %s, %s)' % \ 1375 1382 (cMsTimeout, sHostname, uPort, cMsIdleFudge));
Note:
See TracChangeset
for help on using the changeset viewer.