Changeset 65321 in vbox for trunk/src/VBox
- Timestamp:
- Jan 16, 2017 12:51:03 PM (8 years ago)
- Location:
- trunk/src/VBox/ValidationKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/common/utils.py
r65312 r65321 749 749 return fRc; 750 750 751 def processGetInfo(uPid): 752 """ 753 Tries to acquire state information of the given process. 754 755 Returns a string with the information on success or None on failure or 756 if the host is not supported. 757 758 Note that the format of the information is host system dependent and will 759 likely differ much between different hosts. 760 """ 761 fRc = processExists(uPid); 762 if fRc is not True: 763 return None; 764 765 if sys.platform in ('linux2', ): 766 sGdb = '/usr/bin/gdb'; 767 if not os.path.isfile(sGdb): sGdb = '/usr/local/bin/gdb'; 768 if not os.path.isfile(sGdb): sGdb = 'gdb'; 769 aasCmd = [ 770 [sGdb, '-batch', '-ex', 'thread apply all bt', 771 '-ex', 'info proc mapping', 772 '-ex', 'info sharedlibrary', 773 '-p', '%u' % (uPid,)] 774 ]; 775 elif sys.platform in ('darwin', ): 776 # LLDB doesn't work in batch mode when attaching to a process, at least 777 # with macOS Sierra (10.12). GDB might not be installed. Use the sample tool 778 # instead with a 1 second duration and 1000ms sampling interval to get one stack trace. 779 # For the process mappings use vmmap. 780 aasCmd = [ \ 781 ['/usr/bin/sample', '-mayDie', '%u' % (uPid,), '1', '1000'], 782 ['/usr/bin/vmmap', '%u' % (uPid,)] 783 ]; 784 elif sys.platform in ('sunos5',): 785 aasCmd = [ \ 786 ['/usr/bin/pstack', '%u' % (uPid,)], 787 ['/usr/bin/pmap', '%u' % (uPid,)] 788 ]; 789 else: 790 aasCmd = None; 791 792 sInfo = ''; 793 if aasCmd is not None: 794 for asCmd in aasCmd: 795 try: 796 sThisInfo = sudoProcessOutputChecked(asCmd); 797 if sThisInfo is not None: 798 sInfo += sThisInfo; 799 except: 800 pass; 801 if not sInfo: 802 sInfo = None; 803 804 return sInfo; 805 751 806 752 807 class ProcessInfo(object): -
trunk/src/VBox/ValidationKit/testdriver/vbox.py
r65310 r65321 2580 2580 sVgaText = None; 2581 2581 asMiscInfos = []; 2582 sHostProcessInfo = None; 2583 2584 # Try to fetch the VM process info before meddling with its state. 2585 if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0: 2586 sHostProcessInfo = utils.processGetInfo(oSession.getPid()); 2587 2582 2588 if not oSession.fHostMemoryLow: 2583 2589 # … … 2734 2740 reporter.addLogString(u''.join(asMiscInfos), 'info.txt', 'info/collection', 'A bunch of info items.'); 2735 2741 2742 # Add the host process info if we were able to retrieve it. 2743 if sHostProcessInfo is not None: 2744 reporter.addLogString(sHostProcessInfo, 'vmprocess.log', 'log/host/vmprocess', 'VM process state'); 2736 2745 2737 2746 return fRc; -
trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py
r62484 r65321 713 713 'log/uninstaller', 714 714 'log/guest/kernel', 715 'log/host/vmprocess', 715 716 'crash/report/vm', 716 717 'crash/dump/vm', -
trunk/src/VBox/ValidationKit/testmanager/core/testresults.py
r65319 r65321 401 401 ksKind_LogUninstaller = 'log/uninstaller'; 402 402 ksKind_LogGuestKernel = 'log/guest/kernel'; 403 ksKind_LogHostVmProcess = 'log/host/vmprocess'; 403 404 ksKind_CrashReportVm = 'crash/report/vm'; 404 405 ksKind_CrashDumpVm = 'crash/dump/vm';
Note:
See TracChangeset
for help on using the changeset viewer.