VirtualBox

Ignore:
Timestamp:
Aug 5, 2019 7:59:41 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
132581
Message:

vsheriff: Recognize some GA test failures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/batch/virtual_test_sheriff.py

    r80128 r80140  
    248248        """
    249249        if not self.sSvcLog:
    250             asSvcLogFiles = self.oTree.getListOfLogFilesByKind(TestResultFileData.ksKind_LogReleaseSvc);
    251             if asSvcLogFiles:
    252                 self.sSvcLog = self.getLogFile(asSvcLogFiles[0]);
     250            aoSvcLogFiles = self.oTree.getListOfLogFilesByKind(TestResultFileData.ksKind_LogReleaseSvc);
     251            if aoSvcLogFiles:
     252                self.sSvcLog = self.getLogFile(aoSvcLogFiles[0]);
    253253        return self.sSvcLog;
    254254
     
    588588    ## @name Failure reasons we know.
    589589    ## @{
     590    ktReason_Add_CopyToGuest_Timeout                   = ( 'Additions',         'CopyToGuest Timeout' );
     591    ktReason_Add_FlushViewOfFile                       = ( 'Additions',         'FlushViewOfFile' );
     592    ktReason_Add_Mmap_Coherency                        = ( 'Additions',         'mmap coherency' );
    590593    ktReason_BSOD_Recovery                             = ( 'BSOD',              'Recovery' );
    591594    ktReason_BSOD_Automatic_Repair                     = ( 'BSOD',              'Automatic Repair' );
     
    10041007
    10051008    ## 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 = [
    10071012        # ( Whether to stop on hit, reason tuple, needle text. )
    10081013        ( False, ktReason_Guru_Generic,                             'GuruMeditation' ),
     
    10381043    ];
    10391044
     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
    10401055    ## Things we search a VBoxHardening.log file for to figure out why something went bust.
    10411056    katSimpleVBoxHardeningLogReasons = [
     
    11391154
    11401155
     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
    11411188    def investigateVMResult(self, oCaseFile, oFailedResult, sResultLog):
    11421189        """
     
    11981245            # Loop thru the simple stuff.
    11991246            #
    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);
    12011263            if fRet is True:
    12021264                return fRet;
     
    13071369        return None;
    13081370
     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
    13091385    ## Things we search a VBoxSVC log for to figure out why something went bust.
    13101386    katSimpleSvcLogReasons = [
     
    13241400        return False;
    13251401
    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);
    13381412        return False;
     1413
    13391414
    13401415    def investigateVBoxVMTest(self, oCaseFile, fSingleVM):
     
    14151490                self.investigateVMResult(oCaseFile, oFailedResult, sResultLog);
    14161491
     1492            elif self.isResultFromGATest(oFailedResult):
     1493                self.investigateGATest(oCaseFile, oFailedResult, sResultLog);
     1494
    14171495            elif sResultLog.find('most likely not unique') > 0:
    14181496                oCaseFile.noteReasonForId(self.ktReason_Host_NetworkMisconfiguration, oFailedResult.idTestResult)
     
    14331511
    14341512        #
    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.
    14361514        #
    14371515        if fSingleVM and len(oCaseFile.dReasonForResultId) < len(aoFailedResults):
     
    14391517                        % (len(oCaseFile.dReasonForResultId), len(aoFailedResults)));
    14401518            if self.investigateSvcLogForVMRun(oCaseFile, oCaseFile.getSvcLog()):
     1519                return self.caseClosed(oCaseFile);
     1520            if self.investigateNtHardLogForVMRun(oCaseFile):
    14411521                return self.caseClosed(oCaseFile);
    14421522
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