儲存庫 vbox 的更動 65335
- 時間撮記:
- 2017-1-16 下午02:01:48 (8 年 以前)
- 位置:
- trunk/src/VBox/ValidationKit
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/ValidationKit/common/utils.py
r65321 r65335 749 749 return fRc; 750 750 751 def processGetInfo(uPid ):751 def processGetInfo(uPid, fSudo = False): 752 752 """ 753 753 Tries to acquire state information of the given process. … … 763 763 return None; 764 764 765 if sys.platform in ('linux2', ): 765 sHostOs = getHostOs(); 766 if sHostOs in [ 'linux',]: 766 767 sGdb = '/usr/bin/gdb'; 767 768 if not os.path.isfile(sGdb): sGdb = '/usr/local/bin/gdb'; 768 769 if not os.path.isfile(sGdb): sGdb = 'gdb'; 769 770 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', ): 771 [ sGdb, '-batch', 772 '-ex', 'thread apply all bt', 773 '-ex', 'info proc mapping', 774 '-ex', 'info sharedlibrary', 775 '-p', '%u' % (uPid,), ], 776 ]; 777 elif sHostOs == 'darwin': 776 778 # 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 tool778 # 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 s ys.platform in ('sunos5',):785 aasCmd = [ \786 ['/usr/bin/pstack', '%u' % (uPid,)],787 ['/usr/bin/pmap', '%u' % (uPid,)]788 779 # with macOS Sierra (10.12). GDB might not be installed. Use the sample 780 # tool instead with a 1 second duration and 1000ms sampling interval to 781 # get one stack trace. For the process mappings use vmmap. 782 aasCmd = [ 783 [ '/usr/bin/sample', '-mayDie', '%u' % (uPid,), '1', '1000', ], 784 [ '/usr/bin/vmmap', '%u' % (uPid,), ], 785 ]; 786 elif sHostOs == 'solaris': 787 aasCmd = [ 788 [ '/usr/bin/pstack', '%u' % (uPid,), ], 789 [ '/usr/bin/pmap', '%u' % (uPid,), ], 790 ]; 789 791 else: 790 aasCmd = None;792 aasCmd = []; 791 793 792 794 sInfo = ''; 793 if aasCmd is not None:794 for asCmd in aasCmd:795 try:795 for asCmd in aasCmd: 796 try: 797 if fSudo: 796 798 sThisInfo = sudoProcessOutputChecked(asCmd); 797 if sThisInfo is not None: 798 sInfo += sThisInfo; 799 except: 800 pass; 799 else: 800 sThisInfo = processOutputChecked(asCmd); 801 if sThisInfo is not None: 802 sInfo += sThisInfo; 803 except: 804 pass; 801 805 if not sInfo: 802 806 sInfo = None; -
trunk/src/VBox/ValidationKit/testdriver/vbox.py
r65321 r65335 2576 2576 # requires memory too and seems to wedge. 2577 2577 # 2578 sHostProcessInfo = None; 2578 2579 sLastScreenshotPath = None; 2579 2580 sOsKernelLog = None; 2580 2581 sVgaText = None; 2581 2582 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 2583 2588 2584 if not oSession.fHostMemoryLow: 2585 # Try to fetch the VM process info before meddling with its state. 2586 if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0: 2587 sHostProcessInfo = utils.processGetInfo(oSession.getPid(), fSudo = True); 2588 2589 2589 # 2590 2590 # Pause the VM if we're going to take any screenshots or dig into the … … 2742 2742 # Add the host process info if we were able to retrieve it. 2743 2743 if sHostProcessInfo is not None: 2744 reporter.addLogString(sHostProcessInfo, 'vmprocess.log', ' log/host/vmprocess', 'VM process state');2744 reporter.addLogString(sHostProcessInfo, 'vmprocess.log', 'process/report/vm', 'VM process state'); 2745 2745 2746 2746 return fRc; -
trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py
r65321 r65335 46 46 from testmanager.core.testboxstatus import TestBoxStatusData, TestBoxStatusLogic; 47 47 from testmanager.core.testbox import TestBoxData, TestBoxLogic; 48 from testmanager.core.testresults import TestResultLogic ;48 from testmanager.core.testresults import TestResultLogic, TestResultFileData; 49 49 from testmanager.core.testset import TestSetData, TestSetLogic; 50 50 from testmanager.core.systemlog import SystemLogData, SystemLogLogic; … … 704 704 raise TestBoxControllerException('Invalid MIME type "%s"' % (sMime,)); 705 705 706 if sKind not in [ 'log/release/vm', 707 'log/debug/vm', 708 'log/release/svc', 709 'log/debug/svc', 710 'log/release/client', 711 'log/debug/client', 712 'log/installer', 713 'log/uninstaller', 714 'log/guest/kernel', 715 'log/host/vmprocess', 716 'crash/report/vm', 717 'crash/dump/vm', 718 'crash/report/svc', 719 'crash/dump/svc', 720 'crash/report/client', 721 'crash/dump/client', 722 'info/collection', 723 'info/vgatext', 724 'misc/other', 725 'screenshot/failure', 726 'screenshot/success', 727 #'screencapture/failure', 728 ]: 706 if sKind not in TestResultFileData.kasKinds: 729 707 raise TestBoxControllerException('Invalid kind "%s"' % (sKind,)); 730 708 -
trunk/src/VBox/ValidationKit/testmanager/core/testresults.py
r65321 r65335 401 401 ksKind_LogUninstaller = 'log/uninstaller'; 402 402 ksKind_LogGuestKernel = 'log/guest/kernel'; 403 ksKind_ LogHostVmProcess = 'log/host/vmprocess';403 ksKind_ProcessReportVm = 'process/report/vm'; 404 404 ksKind_CrashReportVm = 'crash/report/vm'; 405 405 ksKind_CrashDumpVm = 'crash/dump/vm'; … … 413 413 ksKind_ScreenshotFailure = 'screenshot/failure'; 414 414 ksKind_ScreenshotSuccesss = 'screenshot/success'; 415 #k Skind_ScreenCaptureFailure = 'screencapture/failure';415 #kskind_ScreenCaptureFailure = 'screencapture/failure'; 416 416 ## @} 417 418 kasKinds = [ 419 ksKind_LogReleaseVm, 420 ksKind_LogDebugVm, 421 ksKind_LogReleaseSvc, 422 ksKind_LogRebugSvc, 423 ksKind_LogReleaseClient, 424 ksKind_LogDebugClient, 425 ksKind_LogInstaller, 426 ksKind_LogUninstaller, 427 ksKind_LogGuestKernel, 428 ksKind_ProcessReportVm, 429 ksKind_CrashReportVm, 430 ksKind_CrashDumpVm, 431 ksKind_CrashReportSvc, 432 ksKind_CrashDumpSvc, 433 ksKind_CrashReportClient, 434 ksKind_CrashDumpClient, 435 ksKind_InfoCollection, 436 ksKind_InfoVgaText, 437 ksKind_MiscOther, 438 ksKind_ScreenshotFailure, 439 ksKind_ScreenshotSuccesss, 440 #kskind_ScreenCaptureFailure, 441 ]; 417 442 418 443 kasAllowNullAttributes = [ 'idTestSet', ];
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器