VirtualBox

Ignore:
Timestamp:
Nov 23, 2022 7:50:16 AM (2 years ago)
Author:
vboxsync
Message:

Validation Kit: Added enabling + collecting crash reporting (core dumps) for Solaris hosts.

File:
1 edited

Legend:

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

    r97659 r97661  
    716716        self.sKindCrashDump   = sKindCrashDump;
    717717
    718         sOs = utils.getHostOs();
     718        sCorePath = None;
     719        sOs       = utils.getHostOs();
    719720        if sOs == 'solaris':
    720721            if sKindCrashDump is not None: # Enable.
    721                 try:
    722                     sCorePath = getDirEnv('TESTBOX_PATH_SCRATCH', fTryCreate = False);
    723                 except:
    724                     sCorePath = '/var/cores'; # Use some well-known core path as fallback.
    725                 try:
    726                     utils.processCall([ 'coreadm', '-g', os.path.join(sCorePath, 'core.%f.%p') ]);
    727                 except:
    728                     reporter.logXcpt('sKindCrashDump=%s' % (sKindCrashDump,));
     722                sCorePath = getDirEnv('TESTBOX_PATH_SCRATCH', sAlternative = '/var/cores', fTryCreate = False);
     723                utils.processOutputChecked([ 'coreadm', '-e', 'process', '-g', os.path.join(sCorePath, 'core.%f.%p') ]);
    729724            else: # Disable.
    730                 try:
    731                     utils.processCall([ 'coreadm', '-d', 'all' ]);
    732                 except:
    733                     reporter.logXcpt('sKindCrashDump=%s' % (sKindCrashDump,));
     725                utils.processOutputChecked([ 'coreadm', '-d', 'process' ]);
     726
     727        if sKindCrashDump is not None:
     728            assert sCorePath is not None;
     729            reporter.log('Crash dumps enabled -- Core path is "%s"' % (sCorePath,));
     730        else:
     731            reporter.log('Crash dumps disabled');
    734732
    735733        return True;
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