VirtualBox

Changeset 61550 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 7, 2016 8:09:34 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
107889
Message:

vsheriff: Teaching it two new tricks.

File:
1 edited

Legend:

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

    r61460 r61550  
    383383    ktReason_Guru_VERR_PGM_PHYS_PAGE_RESERVED          = ( 'Guru Meditations',  'VERR_PGM_PHYS_PAGE_RESERVED' );
    384384    ktReason_Guru_VINF_EM_TRIPLE_FAULT                 = ( 'Guru Meditations',  'VINF_EM_TRIPLE_FAULT' );
     385    ktReason_Networking_Nonexistent_host_nic           = ( 'Networking',        'Nonexistent host networking interface' );
     386    ktReason_Panic_MP_BIOS_IO_APIC                     = ( 'Panic',             'MP-BIOS/IO-APIC' );
    385387    ktReason_XPCOM_Exit_Minus_11                       = ( 'API / (XP)COM',     'exit -11' );
    386388    ktReason_XPCOM_VBoxSVC_Hang                        = ( 'API / (XP)COM',     'VBoxSVC hang' );
     
    605607
    606608
    607     ## Thing we search a main or VM log for to figure out why something went bust.
     609    ## Things we search a main or VM log for to figure out why something went bust.
    608610    katSimpleMainAndVmLogReasons = [
    609         # ( Whether to stop on hit, needle, reason tuple ),
    610         ( False, 'GuruMeditation',                                  ktReason_Guru_Generic ),
    611         ( False, 'Guru Meditation',                                 ktReason_Guru_Generic ),
    612         ( True,  'VERR_IEM_INSTR_NOT_IMPLEMENTED',                  ktReason_Guru_VERR_IEM_INSTR_NOT_IMPLEMENTED ),
    613         ( True,  'VERR_IEM_ASPECT_NOT_IMPLEMENTED',                 ktReason_Guru_VERR_IEM_ASPECT_NOT_IMPLEMENTED ),
    614         ( True,  'VERR_TRPM_DONT_PANIC',                            ktReason_Guru_VERR_TRPM_DONT_PANIC ),
    615         ( True,  'VERR_PGM_PHYS_PAGE_RESERVED',                     ktReason_Guru_VERR_PGM_PHYS_PAGE_RESERVED ),
    616         ( True,  'VINF_EM_TRIPLE_FAULT',                            ktReason_Guru_VINF_EM_TRIPLE_FAULT ),
    617         ( False, 'Exception: 0x800706be (Call to remote object failed (NS_ERROR_CALL_FAILED))',
    618                                                                     ktReason_XPCOM_NS_ERROR_CALL_FAILED ),
     611        # ( Whether to stop on hit, reason tuple, needle text. )
     612        ( False, ktReason_Guru_Generic,                           'GuruMeditation' ),
     613        ( False, ktReason_Guru_Generic,                           'Guru Meditation' ),
     614        ( True,  ktReason_Guru_VERR_IEM_INSTR_NOT_IMPLEMENTED,    'VERR_IEM_INSTR_NOT_IMPLEMENTED' ),
     615        ( True,  ktReason_Guru_VERR_IEM_ASPECT_NOT_IMPLEMENTED,   'VERR_IEM_ASPECT_NOT_IMPLEMENTED' ),
     616        ( True,  ktReason_Guru_VERR_TRPM_DONT_PANIC,              'VERR_TRPM_DONT_PANIC' ),
     617        ( True,  ktReason_Guru_VERR_PGM_PHYS_PAGE_RESERVED,       'VERR_PGM_PHYS_PAGE_RESERVED' ),
     618        ( True,  ktReason_Guru_VINF_EM_TRIPLE_FAULT,              'VINF_EM_TRIPLE_FAULT' ),
     619        ( True,  ktReason_Networking_Nonexistent_host_nic,
     620          'rc=E_FAIL text="Nonexistent host networking interface, name \'eth0\' (VERR_INTERNAL_ERROR)"' ),
     621        ( False, ktReason_XPCOM_NS_ERROR_CALL_FAILED,
     622          'Exception: 0x800706be (Call to remote object failed (NS_ERROR_CALL_FAILED))' ),
     623    ];
     624
     625    ## Things we search the _RIGHT_ _STRIPPED_ vgatext for.
     626    katSimpleVgaTextReasons = [
     627        # ( Whether to stop on hit, reason tuple, needle text. )
     628        ( True,  ktReason_Panic_MP_BIOS_IO_APIC,
     629          "..MP-BIOS bug: 8254 timer not connected to IO-APIC\n\n" ),
    619630    ];
    620631
     
    628639            Investigates the current set of VM related logs.
    629640            """
    630             self.dprint('investigateLogSet: %u chars result log, %u chars VM log, %u chars kernel log'
     641            self.dprint('investigateLogSet: lengths: result log %u, VM log %u, kernel log %u, vga text %u, info text %u'
    631642                        % ( len(sResultLog) if sResultLog is not None else 0,
    632643                            len(sVMLog)     if sVMLog is not None else 0,
    633                             len(sKrnlLog)   if sKrnlLog is not None else 0), );
     644                            len(sKrnlLog)   if sKrnlLog is not None else 0,
     645                            len(sVgaText)   if sVgaText is not None else 0,
     646                            len(sInfoText)  if sInfoText is not None else 0, ));
    634647            #self.dprint('main.log<<<\n%s\n<<<\n' % (sResultLog,));
    635648            #self.dprint('vbox.log<<<\n%s\n<<<\n' % (sVMLog,));
    636649            #self.dprint('krnl.log<<<\n%s\n<<<\n' % (sKrnlLog,));
     650            #self.dprint('vgatext.txt<<<\n%s\n<<<\n' % (sVgaText,));
     651            #self.dprint('info.txt<<<\n%s\n<<<\n' % (sInfoText,));
    637652
    638653            # TODO: more
     
    667682            #
    668683            fFoundSomething = False;
    669             for fStopOnHit, sNeedle, tReason in self.katSimpleMainAndVmLogReasons:
     684            for fStopOnHit, tReason, sNeedle in self.katSimpleMainAndVmLogReasons:
    670685                if sResultLog.find(sNeedle) > 0 or sVMLog.find(sNeedle) > 0:
    671686                    oCaseFile.noteReasonForId(tReason, oFailedResult.idTestResult);
     
    673688                        return True;
    674689                    fFoundSomething = True;
     690
     691            # Continue with vga text.
     692            if sVgaText is not None and len(sVgaText) > 0:
     693                for fStopOnHit, tReason, sNeedle in self.katSimpleVgaTextReasons:
     694                    if sVgaText.find(sNeedle) > 0:
     695                        oCaseFile.noteReasonForId(tReason, oFailedResult.idTestResult);
     696                        if fStopOnHit:
     697                            return True;
     698                        fFoundSomething = True;
     699            _ = sInfoText;
    675700
    676701            #
     
    686711        #
    687712        # Check if we got any VM or/and kernel logs.  Treat them as sets in
    688         # case we run multiple VMs here.
    689         #
    690         sVMLog   = None;
    691         sKrnlLog = None;
     713        # case we run multiple VMs here (this is of course ASSUMING they
     714        # appear in the order that terminateVmBySession uploads them).
     715        #
     716        sVMLog    = None;
     717        sKrnlLog  = None;
     718        sVgaText  = None;
     719        sInfoText = None;
    692720        for oFile in oFailedResult.aoFiles:
    693721            if oFile.sKind == TestResultFileData.ksKind_LogReleaseVm:
     
    695723                    if investigateLogSet() is True:
    696724                        return True;
    697                 sKrnlLog = None;
    698                 sVMLog   = oCaseFile.getLogFile(oFile);
     725                sKrnlLog  = None;
     726                sVgaText  = None;
     727                sInfoText = None;
     728                sVMLog    = oCaseFile.getLogFile(oFile);
    699729            elif oFile.sKind == TestResultFileData.ksKind_LogGuestKernel:
    700                 sKrnlLog = oCaseFile.getLogFile(oFile);
     730                sKrnlLog  = oCaseFile.getLogFile(oFile);
     731            elif oFile.sKind == TestResultFileData.ksKind_InfoVgaText:
     732                sVgaText  = ''.join([sLine.rstrip() for sLine in oCaseFile.getLogFile(oFile).split('\n')]);
     733            elif oFile.sKind == TestResultFileData.ksKind_InfoCollection:
     734                sInfoText = oCaseFile.getLogFile(oFile);
    701735        if sVMLog is not None and investigateLogSet() is True:
    702736            return True;
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