- Timestamp:
- Jun 23, 2020 3:38:52 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138792
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r84897 r84920 1522 1522 reporter.log('Executing VBoxService (in background)...'); 1523 1523 oTxsSession.syncExec(sFileVBoxServiceGst, (sFileVBoxServiceGst, "-vvvv", "--only-control", \ 1524 "--control-dump-stdout", "--control-dump-stderr", \ 1524 1525 "--logfile", "/tmp/VBoxService-txs.log") ); 1525 1526 elif oTestVm.isWindows(): … … 1637 1638 # Enable VBoxService verbose logging. 1638 1639 # 1639 self.oDebug.sGstVBoxServiceLogPath = oTestVm.pathJoin(self.oTstDrv.getGuestTempDir(oTestVm), "VBoxService"); 1640 if oTxsSession.syncMkDirPath(self.oDebug.sGstVBoxServiceLogPath, 0o777) is not True: 1641 return reporter.error('Failed to create directory "%s"!' % (self.oDebug.sGstVBoxServiceLogPath,)); 1642 sPathLogFile = oTestVm.pathJoin(self.oDebug.sGstVBoxServiceLogPath, 'VBoxService.log'); 1643 1644 reporter.log('VBoxService logs will be stored in "%s"' % (self.oDebug.sGstVBoxServiceLogPath,)); 1645 1646 fRestartVBoxService = False; 1647 if oTestVm.isWindows(): 1648 sPathRegExe = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'reg.exe'); 1649 sPathVBoxServiceExe = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'VBoxService.exe'); 1650 sImagePath = '%s -vvvv --logfile %s' % (sPathVBoxServiceExe, sPathLogFile); 1651 fRestartVBoxService = self.oTstDrv.txsRunTest(oTxsSession, 'Enabling VBoxService verbose logging (via registry)', 1652 30 * 1000, 1653 sPathRegExe, 1654 (sPathRegExe, 'add', 1655 'HKLM\\SYSTEM\\CurrentControlSet\\Services\\VBoxService', 1656 '/v', 'ImagePath', '/t', 'REG_SZ', '/d', sImagePath, '/f')); 1657 elif oTestVm.isLinux(): 1658 sPathSed = '/bin/sed'; 1659 fRestartVBoxService = self.oTstDrv.txsRunTest(oTxsSession, 'Enabling VBoxService verbose logging', 30 * 1000, 1660 sPathSed, 1661 (sPathSed, '-i', '-e', 's/' 1662 '\\$2 \\$3' 1663 '/' 1664 '\\$2 \\$3 -vvvv --logfile \\/var\\/tmp\\/VBoxService\\/VBoxService.log' 1665 '/g', 1666 '/sbin/rcvboxadd-service')); 1667 else: 1668 reporter.log('Verbose logging for VBoxService not supported for this guest yet'); 1669 1670 if fRestartVBoxService: 1671 self.vboxServiceControl(oTxsSession, oTestVm, fStart = False); 1672 time.sleep(5); 1673 self.vboxServiceControl(oTxsSession, oTestVm, fStart = True); 1674 else: 1675 reporter.testStart('Waiting for VBoxService to get started'); 1676 fRc = self.waitForGuestFacility(oSession, vboxcon.AdditionsFacilityType_VBoxService, "VBoxService", 1677 vboxcon.AdditionsFacilityStatus_Active); 1678 reporter.testDone(); 1679 if not fRc: 1680 return False; 1640 if self.oDebug.sImgPath is None: # If no debugging enabled, skip this. 1641 self.oDebug.sGstVBoxServiceLogPath = oTestVm.pathJoin(self.oTstDrv.getGuestTempDir(oTestVm), "VBoxService"); 1642 if oTxsSession.syncMkDirPath(self.oDebug.sGstVBoxServiceLogPath, 0o777) is not True: 1643 return reporter.error('Failed to create directory "%s"!' % (self.oDebug.sGstVBoxServiceLogPath,)); 1644 sPathLogFile = oTestVm.pathJoin(self.oDebug.sGstVBoxServiceLogPath, 'VBoxService.log'); 1645 1646 reporter.log('VBoxService logs will be stored in "%s"' % (self.oDebug.sGstVBoxServiceLogPath,)); 1647 1648 fRestartVBoxService = False; 1649 if oTestVm.isWindows(): 1650 sPathRegExe = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'reg.exe'); 1651 sPathVBoxServiceExe = oTestVm.pathJoin(self.oTstDrv.getGuestSystemDir(oTestVm), 'VBoxService.exe'); 1652 sImagePath = '%s -vvvv --logfile %s' % (sPathVBoxServiceExe, sPathLogFile); 1653 fRestartVBoxService = self.oTstDrv.txsRunTest(oTxsSession, 'Enabling VBoxService verbose logging (via registry)', 1654 30 * 1000, 1655 sPathRegExe, 1656 (sPathRegExe, 'add', 1657 'HKLM\\SYSTEM\\CurrentControlSet\\Services\\VBoxService', 1658 '/v', 'ImagePath', '/t', 'REG_SZ', '/d', sImagePath, '/f')); 1659 elif oTestVm.isLinux(): 1660 sPathSed = '/bin/sed'; 1661 fRestartVBoxService = self.oTstDrv.txsRunTest(oTxsSession, 'Enabling VBoxService verbose logging', 30 * 1000, 1662 sPathSed, 1663 (sPathSed, '-i', '-e', 's/' 1664 '\\$2 \\$3' 1665 '/' 1666 '\\$2 \\$3 -vvvv --logfile \\/var\\/tmp\\/VBoxService\\/VBoxService.log' 1667 '/g', 1668 '/sbin/rcvboxadd-service')); 1669 else: 1670 reporter.log('Verbose logging for VBoxService not supported for this guest yet'); 1671 1672 if fRestartVBoxService: 1673 self.vboxServiceControl(oTxsSession, oTestVm, fStart = False); 1674 time.sleep(5); 1675 self.vboxServiceControl(oTxsSession, oTestVm, fStart = True); 1676 else: 1677 reporter.testStart('Waiting for VBoxService to get started'); 1678 fRc = self.waitForGuestFacility(oSession, vboxcon.AdditionsFacilityType_VBoxService, "VBoxService", 1679 vboxcon.AdditionsFacilityStatus_Active); 1680 reporter.testDone(); 1681 if not fRc: 1682 return False; 1681 1683 1682 1684 #
Note:
See TracChangeset
for help on using the changeset viewer.