Changeset 97658 in vbox
- Timestamp:
- Nov 22, 2022 5:50:37 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 154712
- Location:
- trunk/src/VBox/ValidationKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/common/utils.py
r96987 r97658 1431 1431 fnLog('Found crash dump for %u: %s' % (uPid, sFull,)); 1432 1432 fnCrashFile(sFull, True); 1433 1433 elif sOs == 'solaris': 1434 asDmpDirs = []; 1435 try: 1436 sScratchPath = getDirEnv('TESTBOX_PATH_SCRATCH', fTryCreate = False); 1437 asDmpDirs.extend([ sScratchPath ]); 1438 except: 1439 pass; 1440 # Some other useful locations as fallback. 1441 asDmpDirs.extend([ 1442 u'/var/cores/', 1443 u'/var/core/', 1444 u'/var/tmp/', 1445 ]); 1446 # 1447 # Solaris by default creates a core file in the directory of the crashing process with the name 'core'. 1448 # 1449 # As we need to distinguish the core files correlating to their PIDs and have a persistent storage location, 1450 # the host needs to be tweaked via: 1451 # 1452 # ```coreadm -g /path/to/cores/core.%f.%p``` 1453 # 1454 sMatchPrefix = 'core'; 1455 sMatchSuffix = '.%u' % (uPid,); 1456 for sDir in asDmpDirs: 1457 sDir = os.path.expandvars(sDir); 1458 if not os.path.isdir(sDir): 1459 continue; 1460 try: 1461 asDirEntries = os.listdir(sDir); 1462 except: 1463 continue; 1464 for sEntry in asDirEntries: 1465 if sEntry.startswith(sMatchPrefix) \ 1466 and sEntry.endswith(sMatchSuffix): 1467 sFull = os.path.join(sDir, sEntry); 1468 fnLog('Found crash dump for %u: %s' % (uPid, sFull,)); 1469 fnCrashFile(sFull, True); 1434 1470 else: 1435 1471 pass; ## TODO … … 2536 2572 unittest.main(); 2537 2573 # not reached. 2538 -
trunk/src/VBox/ValidationKit/testdriver/base.py
r96407 r97658 715 715 self.sKindCrashReport = sKindCrashReport; 716 716 self.sKindCrashDump = sKindCrashDump; 717 718 sOs = utils.getHostOs(); 719 if sOs == 'solaris': 720 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 subprocess.run([ 'coreadm', '-g', os.path.join(sCorePath, 'core.%f.%p') ]); 726 else: # Disable. 727 subprocess.run([ 'coreadm', '-d', 'all' ]); 728 717 729 return True; 718 730
Note:
See TracChangeset
for help on using the changeset viewer.