diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2023-03-21 12:43:25 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2023-03-21 12:43:25 +0000 |
commit | beb3112280054dc1abc357463d0456d1c31c82cf (patch) | |
tree | 853f5a7f7de0c9cd6ffdb443878638b4f081a988 /src/VBox/ValidationKit/common | |
parent | 129e433395a919ffaa307a34b78fbe7b16a35890 (diff) | |
download | VirtualBox-svn-beb3112280054dc1abc357463d0456d1c31c82cf.tar.gz |
ValidationKit/{common/utils.py,testdriver/base.py}: Rework the
Solaris-specific core file configuration code to back up any existing
coreadm(8) changes before modifying the system-wide core file
configuration and then restore the original coreadm(8) setup afterwards.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@99086 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/ValidationKit/common')
-rw-r--r-- | src/VBox/ValidationKit/common/utils.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/VBox/ValidationKit/common/utils.py b/src/VBox/ValidationKit/common/utils.py index 48e9766be9f..80ff1308150 100644 --- a/src/VBox/ValidationKit/common/utils.py +++ b/src/VBox/ValidationKit/common/utils.py @@ -1459,8 +1459,7 @@ def processCollectCrashInfo(uPid, fnLog, fnCrashFile): pass; # Some other useful locations as fallback. asDmpDirs.extend([ - u'/var/cores/', - u'/var/core/', + u'/var/cores/' ]); # # Solaris by default creates a core file in the directory of the crashing process with the name 'core'. @@ -1468,9 +1467,9 @@ def processCollectCrashInfo(uPid, fnLog, fnCrashFile): # As we need to distinguish the core files correlating to their PIDs and have a persistent storage location, # the host needs to be tweaked via: # - # ```coreadm -g /path/to/cores/core.%f.%p``` + # ```coreadm -g /var/cores/core.%f.%p``` # - sMatchSuffix = '.%u.core' % (uPid,); + sMatchRegEx = r'core\..*\.%u' % (uPid); for sDir in asDmpDirs: sDir = os.path.expandvars(sDir); if not os.path.isdir(sDir): @@ -1481,7 +1480,7 @@ def processCollectCrashInfo(uPid, fnLog, fnCrashFile): continue; for sEntry in asDirEntries: fnLog('Entry: %s' % (os.path.join(sDir, sEntry))); - if sEntry.endswith(sMatchSuffix): + if re.search(sMatchRegEx, sEntry): sFull = os.path.join(sDir, sEntry); fnLog('Found crash dump for %u: %s' % (uPid, sFull,)); fnCrashFile(sFull, True); |