Changeset 100083 in vbox
- Timestamp:
- Jun 6, 2023 2:02:59 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 157772
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/usb/usbgadget.py
r98655 r100083 512 512 self.fTryConnect = fTryConnect; 513 513 514 if not self.startTask(cMsTimeout, False, "connecting", self. taskConnect, (cMsIdleFudge,)):514 if not self.startTask(cMsTimeout, False, "connecting", self.utsTaskConnect, (cMsIdleFudge,)): 515 515 raise base.GenError("startTask failed"); 516 516 … … 562 562 self.fnTask = fnTask; 563 563 self.aTaskArgs = aArgs; 564 self.oThread = threading.Thread(target=self. taskThread, args=(), name='UTS-%s' % (sStatus,));564 self.oThread = threading.Thread(target=self.utsTaskThread, args=(), name='UTS-%s' % (sStatus,)); 565 565 self.oThread.setDaemon(True); # pylint: disable=deprecated-method 566 566 self.msStart = base.timestampMilli(); … … 608 608 return oThread.is_alive(); 609 609 610 def taskThread(self):610 def utsTaskThread(self): 611 611 """ 612 612 The task thread function. … … 618 618 oTaskRc = fnTask(*self.aTaskArgs); 619 619 except: 620 reporter.fatalXcpt(' taskThread', 15);620 reporter.fatalXcpt('utsTaskThread', 15); 621 621 oTaskRc = None; 622 622 else: 623 reporter.log(' taskThread: cancelled already');623 reporter.log('utsTaskThread: cancelled already'); 624 624 625 625 self.lockTask(); 626 626 627 reporter.log(' taskThread: signalling task with status "%s", oTaskRc=%s' % (self.sStatus, oTaskRc));627 reporter.log('utsTaskThread: signalling task with status "%s", oTaskRc=%s' % (self.sStatus, oTaskRc)); 628 628 self.oTaskRc = oTaskRc; 629 629 self.oThread = None; … … 760 760 # 761 761 762 def taskConnect(self, cMsIdleFudge):762 def utsTaskConnect(self, cMsIdleFudge): 763 763 """Tries to connect to the UTS""" 764 764 while not self.isCancelled(): 765 reporter.log2(' taskConnect: connecting ...');765 reporter.log2('utsTaskConnect: connecting ...'); 766 766 rc = self.oTransport.connect(self.getMsLeft(500)); 767 767 if rc is True: 768 reporter.log(' taskConnect: succeeded');768 reporter.log('utsTaskConnect: succeeded'); 769 769 return self.taskGreet(cMsIdleFudge); 770 770 if rc is None: 771 reporter.log2(' taskConnect: unable to connect');771 reporter.log2('utsTaskConnect: unable to connect'); 772 772 return None; 773 773 if self.hasTimedOut(): 774 reporter.log2(' taskConnect: timed out');774 reporter.log2('utsTaskConnect: timed out'); 775 775 if not self.fTryConnect: 776 reporter.maybeErr(self.fErr, ' taskConnect: timed out');776 reporter.maybeErr(self.fErr, 'utsTaskConnect: timed out'); 777 777 return False; 778 778 time.sleep(self.getMsLeft(1, 1000) / 1000.0); 779 779 if not self.fTryConnect: 780 reporter.maybeErr(self.fErr, ' taskConnect: cancelled');780 reporter.maybeErr(self.fErr, 'utsTaskConnect: cancelled'); 781 781 return False; 782 782
Note:
See TracChangeset
for help on using the changeset viewer.