VirtualBox

Changeset 61511 in vbox


Ignore:
Timestamp:
Jun 6, 2016 11:51:45 PM (8 years ago)
Author:
vboxsync
Message:

testmanager,testdriver: Add a bunch of 'info' items to the failed tests in case they contain anything useful. vgatext is separate for simplified (virtual) sheriffing.

Location:
trunk/src/VBox/ValidationKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r61447 r61511  
    25522552                sLastScreenshotPath = None;
    25532553
    2554         #
    25552554        # Query the OS kernel log from the debugger if appropriate/requested.
    2556         #
    25572555        sOsKernelLog = None;
    25582556        if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0:
    25592557            sOsKernelLog = oSession.queryOsKernelLog();
     2558
     2559        # Do "info vgatext all" separately.
     2560        sVgaText = None;
     2561        if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0:
     2562            sVgaText = oSession.queryDbgInfoVgaText();
     2563
     2564        # Various infos (do after kernel because of symbols).
     2565        asMiscInfos = [];
     2566        if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0:
     2567            for sInfo, sArg in [ ('mode', 'all'),
     2568                                 ('fflags', ''),
     2569                                 ('cpumguest', 'verbose all'),
     2570                                 ('cpumguestinstr', 'symbol all'),
     2571                                 ('pic', ''),
     2572                                 ('apic', ''),
     2573                                 ('ioapic', ''),
     2574                                 ('pit', ''),
     2575                                 ('phys', ''),
     2576                                 ('clocks', ''),
     2577                                 ('timers', ''),
     2578                                 ('guestgdt', ''),
     2579                                 ('ldtguest', ''),
     2580                                ]:
     2581                sThis = oSession.queryDbgInfo(sInfo, sArg);
     2582                if sThis is not None and len(sThis) > 0:
     2583                    if sThis[-1] != '\n':
     2584                        sThis += '\n';
     2585                    asMiscInfos += [
     2586                        '================ start %s %s ================\n' % (sInfo, sArg),
     2587                        sThis,
     2588                        '================ end %s %s ==================\n' % (sInfo, sArg),
     2589                    ];
    25602590
    25612591        #
     
    26322662        if sOsKernelLog is not None:
    26332663            reporter.addLogString(sOsKernelLog, 'kernel.log', 'log/guest/kernel', 'Guest OS kernel log');
     2664
     2665        # Add "info vgatext all" if we've got it.
     2666        if sVgaText is not None:
     2667            reporter.addLogString(sVgaText, 'vgatext.txt', 'info/vgatext', 'info vgatext all');
     2668
     2669        # Add the "info xxxx" items if we've got any.
     2670        if len(asMiscInfos) > 0:
     2671            reporter.addLogString(u''.join(asMiscInfos), 'info.txt', 'info/collection', 'A bunch of info items.');
     2672
    26342673
    26352674        return fRc;
  • trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py

    r61350 r61511  
    14401440            try:
    14411441                sHostName = socket.getfqdn()
    1442                 if not '.' in sHostName:
     1442                if '.' not in sHostName:
    14431443                    # somewhat misconfigured system, needs expensive approach to guessing FQDN
    14441444                    for aAI in socket.getaddrinfo(sHostName, None):
     
    23992399                    reporter.logXcpt('Unable to get the guest OS (%s) kernel log' % (sOsDetected,));
    24002400        return sOsKernelLog;
     2401
     2402    def queryDbgInfo(self, sItem, sArg = '', sDefault = None):
     2403        """
     2404        Simple wrapper around IMachineDebugger::info.
     2405
     2406        Returns string on success, sDefault on failure (logged).
     2407        """
     2408        try:
     2409            return self.o.console.debugger.info(sItem, sArg);
     2410        except:
     2411            reporter.logXcpt('Unable to query "%s" with arg "%s"' % (sItem, sArg,));
     2412        return sDefault;
     2413
     2414    def queryDbgInfoVgaText(self, sArg = 'all'):
     2415        """
     2416        Tries to get the 'info vgatext' output, provided we're in next mode.
     2417
     2418        Returns string containing text on success.
     2419        Returns None on failure or not text mode.
     2420        """
     2421        sVgaText = None;
     2422        try:
     2423            sVgaText = self.o.console.debugger.info('vgatext', sArg);
     2424            if sVgaText == 'Not in text mode!':
     2425                sVgaText = None;
     2426        except:
     2427            reporter.logXcpt('Unable to query vgatext with arg "%s"' % (sArg,));
     2428        return sVgaText;
     2429
    24012430
    24022431    #
     
    25472576        fReversedSetup = False;
    25482577        fUseNatForTxs  = False;
    2549         if sIpAddr == None:
     2578        if sIpAddr is None:
    25502579            try:
    25512580                oNic = self.oVM.getNetworkAdapter(0);
  • trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py

    r61509 r61511  
    719719                          'crash/report/client',
    720720                          'crash/dump/client',
     721                          'info/collection',
     722                          'info/vgatext',
    721723                          'misc/other',
    722724                          'screenshot/failure',
  • trunk/src/VBox/ValidationKit/testmanager/core/testresults.py

    r61478 r61511  
    406406    ksKind_CrashReportClient    = 'crash/report/client';
    407407    ksKind_CrashDumpClient      = 'crash/dump/client';
     408    ksKind_InfoCollection       = 'info/collection';
     409    ksKind_InfoVgaText          = 'info/vgatext';
    408410    ksKind_MiscOther            = 'misc/other';
    409411    ksKind_ScreenshotFailure    = 'screenshot/failure';
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette