Changeset 80140 in vbox for trunk/src/VBox/ValidationKit/testmanager
- Timestamp:
- Aug 5, 2019 7:59:41 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 132581
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/batch/virtual_test_sheriff.py
r80128 r80140 248 248 """ 249 249 if not self.sSvcLog: 250 a sSvcLogFiles = self.oTree.getListOfLogFilesByKind(TestResultFileData.ksKind_LogReleaseSvc);251 if a sSvcLogFiles:252 self.sSvcLog = self.getLogFile(a sSvcLogFiles[0]);250 aoSvcLogFiles = self.oTree.getListOfLogFilesByKind(TestResultFileData.ksKind_LogReleaseSvc); 251 if aoSvcLogFiles: 252 self.sSvcLog = self.getLogFile(aoSvcLogFiles[0]); 253 253 return self.sSvcLog; 254 254 … … 588 588 ## @name Failure reasons we know. 589 589 ## @{ 590 ktReason_Add_CopyToGuest_Timeout = ( 'Additions', 'CopyToGuest Timeout' ); 591 ktReason_Add_FlushViewOfFile = ( 'Additions', 'FlushViewOfFile' ); 592 ktReason_Add_Mmap_Coherency = ( 'Additions', 'mmap coherency' ); 590 593 ktReason_BSOD_Recovery = ( 'BSOD', 'Recovery' ); 591 594 ktReason_BSOD_Automatic_Repair = ( 'BSOD', 'Automatic Repair' ); … … 1004 1007 1005 1008 ## Things we search a main or VM log for to figure out why something went bust. 1006 katSimpleMainAndVmLogReasons = [ 1009 ## @note DO NOT ADD MORE STUFF HERE! 1010 ## Please use katSimpleMainLogReasons and katSimpleVmLogReasons instead! 1011 katSimpleMainAndVmLogReasonsDeprecated = [ 1007 1012 # ( Whether to stop on hit, reason tuple, needle text. ) 1008 1013 ( False, ktReason_Guru_Generic, 'GuruMeditation' ), … … 1038 1043 ]; 1039 1044 1045 ## This we search a main log for to figure out why something went bust. 1046 katSimpleMainLogReasons = [ 1047 # ( Whether to stop on hit, reason tuple, needle text. ) 1048 ]; 1049 1050 ## This we search a VM log for to figure out why something went bust. 1051 katSimpleVmLogReasons = [ 1052 # ( Whether to stop on hit, reason tuple, needle text. ) 1053 ]; 1054 1040 1055 ## Things we search a VBoxHardening.log file for to figure out why something went bust. 1041 1056 katSimpleVBoxHardeningLogReasons = [ … … 1139 1154 1140 1155 1156 def investigateGATest(self, oCaseFile, oFailedResult, sResultLog): 1157 """ 1158 Investigates a failed VM run. 1159 """ 1160 enmReason = None; 1161 if oFailedResult.sName == 'mmap': 1162 if sResultLog.find('FsPerf: Flush issue at offset ') >= 0: 1163 enmReason = self.ktReason_Add_Mmap_Coherency; 1164 elif sResultLog.find('FlushViewOfFile') >= 0: 1165 enmReason = self.ktReason_Add_FlushViewOfFile; 1166 elif oFailedResult.sName == 'Copy to guest': 1167 if sResultLog.find('*** abort action ***') >= 0: 1168 enmReason = self.ktReason_Add_CopyToGuest_Timeout; 1169 1170 if enmReason is not None: 1171 return oCaseFile.noteReasonForId(enmReason, oFailedResult.idTestResult); 1172 1173 self.vprint(u'TODO: Cannot place GA failure idTestResult=%u - %s' % (oFailedResult.idTestResult, oFailedResult.sName,)); 1174 self.dprint(u'%s + %s <<\n%s\n<<' % (oFailedResult.tsCreated, oFailedResult.tsElapsed, sResultLog,)); 1175 return False; 1176 1177 def isResultFromGATest(self, oFailedResult): 1178 """ 1179 Checks if this result and corresponding log snippet looks like a GA test run. 1180 """ 1181 while oFailedResult is not None: 1182 if oFailedResult.sName in [ 'Guest Control', 'Shared Folders', 'FsPerf', ]: 1183 return True; 1184 oFailedResult = oFailedResult.oParent; 1185 return False; 1186 1187 1141 1188 def investigateVMResult(self, oCaseFile, oFailedResult, sResultLog): 1142 1189 """ … … 1198 1245 # Loop thru the simple stuff. 1199 1246 # 1200 fRet = self.scanLog([sResultLog, sVMLog], self.katSimpleMainAndVmLogReasons, oCaseFile, oFailedResult.idTestResult); 1247 1248 # Main log. 1249 fRet = self.scanLog([sResultLog,], self.katSimpleMainLogReasons, oCaseFile, oFailedResult.idTestResult); 1250 if fRet is True: 1251 return fRet; 1252 fFoundSomething |= fRet is None; 1253 1254 # VM log. 1255 fRet = self.scanLog([sVMLog,], self.katSimpleVmLogReasons, oCaseFile, oFailedResult.idTestResult); 1256 if fRet is True: 1257 return fRet; 1258 fFoundSomething |= fRet is None; 1259 1260 # Old main + vm log. 1261 fRet = self.scanLog([sResultLog, sVMLog], self.katSimpleMainAndVmLogReasonsDeprecated, 1262 oCaseFile, oFailedResult.idTestResult); 1201 1263 if fRet is True: 1202 1264 return fRet; … … 1307 1369 return None; 1308 1370 1371 def isResultFromVMRun(self, oFailedResult, sResultLog): 1372 """ 1373 Checks if this result and corresponding log snippet looks like a VM run. 1374 """ 1375 1376 # Look for startVmEx/ startVmAndConnectToTxsViaTcp and similar output in the log. 1377 if sResultLog.find(' startVm') > 0: 1378 return True; 1379 1380 # Any other indicators? No? 1381 _ = oFailedResult; 1382 return False; 1383 1384 1309 1385 ## Things we search a VBoxSVC log for to figure out why something went bust. 1310 1386 katSimpleSvcLogReasons = [ … … 1324 1400 return False; 1325 1401 1326 1327 def isResultFromVMRun(self, oFailedResult, sResultLog): 1328 """ 1329 Checks if this result and corresponding log snippet looks like a VM run. 1330 """ 1331 1332 # Look for startVmEx/ startVmAndConnectToTxsViaTcp and similar output in the log. 1333 if sResultLog.find(' startVm') > 0: 1334 return True; 1335 1336 # Any other indicators? No? 1337 _ = oFailedResult; 1402 def investigateNtHardLogForVMRun(self, oCaseFile): 1403 """ 1404 Check if the hardening log for a single VM run contains VM crash indications. 1405 """ 1406 aoLogFiles = oCaseFile.oTree.getListOfLogFilesByKind(TestResultFileData.ksKind_LogReleaseVm); 1407 for oLogFile in aoLogFiles: 1408 if oLogFile.sFile.find('VBoxHardening.log') >= 0: 1409 sLog = oCaseFile.getLogFile(oLogFile); 1410 if sLog.find('Quitting: ExitCode=0xc0000005') >= 0: 1411 return oCaseFile.noteReasonForId(self.ktReason_Unknown_VM_Crash, oCaseFile.oTree.idTestResult); 1338 1412 return False; 1413 1339 1414 1340 1415 def investigateVBoxVMTest(self, oCaseFile, fSingleVM): … … 1415 1490 self.investigateVMResult(oCaseFile, oFailedResult, sResultLog); 1416 1491 1492 elif self.isResultFromGATest(oFailedResult): 1493 self.investigateGATest(oCaseFile, oFailedResult, sResultLog); 1494 1417 1495 elif sResultLog.find('most likely not unique') > 0: 1418 1496 oCaseFile.noteReasonForId(self.ktReason_Host_NetworkMisconfiguration, oFailedResult.idTestResult) … … 1433 1511 1434 1512 # 1435 # Check VBoxSVC.log for VM crashes if inconclusive on single VM runs.1513 # Check VBoxSVC.log and VBoxHardening.log for VM crashes if inconclusive on single VM runs. 1436 1514 # 1437 1515 if fSingleVM and len(oCaseFile.dReasonForResultId) < len(aoFailedResults): … … 1439 1517 % (len(oCaseFile.dReasonForResultId), len(aoFailedResults))); 1440 1518 if self.investigateSvcLogForVMRun(oCaseFile, oCaseFile.getSvcLog()): 1519 return self.caseClosed(oCaseFile); 1520 if self.investigateNtHardLogForVMRun(oCaseFile): 1441 1521 return self.caseClosed(oCaseFile); 1442 1522
Note:
See TracChangeset
for help on using the changeset viewer.