Changeset 61950 in vbox
- Timestamp:
- Jun 30, 2016 9:17:51 AM (8 years ago)
- Location:
- trunk/src/VBox/ValidationKit/testdriver
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vbox.py
r61934 r61950 761 761 oSession = self.oSession; 762 762 if oSession is not None: # paranoia 763 if sErrId == 'HostMemoryLow': 764 oSession.signalHostMemoryLow(); 763 765 oSession.signalTask(); 764 766 self.oVBoxMgr.interruptWaitEvents(); … … 2551 2553 2552 2554 # 2553 # Pause the VM if we're going to take any screenshots or dig into the 2554 # guest. Failures are quitely ignored. 2555 # 2556 if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0: 2557 try: 2558 if oSession.oVM.state in [ vboxcon.MachineState_Running, 2559 vboxcon.MachineState_LiveSnapshotting, 2560 vboxcon.MachineState_Teleporting ]: 2561 oSession.o.console.pause(); 2562 except: 2563 reporter.logXcpt(); 2564 2565 # 2566 # Take Screenshot and upload it (see below) to Test Manager if appropriate/requested. 2555 # If the host is out of memory, just skip all the info collection as it 2556 # requires memory too and seems to wedge. 2567 2557 # 2568 2558 sLastScreenshotPath = None; 2569 if fTakeScreenshot is True or self.fAlwaysUploadScreenshots or reporter.testErrorCount() > 0: 2570 sLastScreenshotPath = os.path.join(self.sScratchPath, "LastScreenshot-%s.png" % oSession.sName); 2571 fRc = oSession.takeScreenshot(sLastScreenshotPath); 2572 if fRc is not True: 2573 sLastScreenshotPath = None; 2574 2575 # Query the OS kernel log from the debugger if appropriate/requested. 2576 sOsKernelLog = None; 2577 if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0: 2578 sOsKernelLog = oSession.queryOsKernelLog(); 2579 2580 # Do "info vgatext all" separately. 2581 sVgaText = None; 2582 if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0: 2583 sVgaText = oSession.queryDbgInfoVgaText(); 2584 2585 # Various infos (do after kernel because of symbols). 2586 asMiscInfos = []; 2587 if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0: 2588 # Dump the guest stack for all CPUs. 2589 cCpus = oSession.getCpuCount(); 2590 if cCpus > 0: 2591 for iCpu in xrange(0, cCpus): 2592 sThis = oSession.queryDbgGuestStack(iCpu); 2559 sOsKernelLog = None; 2560 sVgaText = None; 2561 asMiscInfos = []; 2562 if not oSession.fHostMemoryLow: 2563 # 2564 # Pause the VM if we're going to take any screenshots or dig into the 2565 # guest. Failures are quitely ignored. 2566 # 2567 if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0: 2568 try: 2569 if oSession.oVM.state in [ vboxcon.MachineState_Running, 2570 vboxcon.MachineState_LiveSnapshotting, 2571 vboxcon.MachineState_Teleporting ]: 2572 oSession.o.console.pause(); 2573 except: 2574 reporter.logXcpt(); 2575 2576 # 2577 # Take Screenshot and upload it (see below) to Test Manager if appropriate/requested. 2578 # 2579 if fTakeScreenshot is True or self.fAlwaysUploadScreenshots or reporter.testErrorCount() > 0: 2580 sLastScreenshotPath = os.path.join(self.sScratchPath, "LastScreenshot-%s.png" % oSession.sName); 2581 fRc = oSession.takeScreenshot(sLastScreenshotPath); 2582 if fRc is not True: 2583 sLastScreenshotPath = None; 2584 2585 # Query the OS kernel log from the debugger if appropriate/requested. 2586 if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0: 2587 sOsKernelLog = oSession.queryOsKernelLog(); 2588 2589 # Do "info vgatext all" separately. 2590 if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0: 2591 sVgaText = oSession.queryDbgInfoVgaText(); 2592 2593 # Various infos (do after kernel because of symbols). 2594 if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0: 2595 # Dump the guest stack for all CPUs. 2596 cCpus = oSession.getCpuCount(); 2597 if cCpus > 0: 2598 for iCpu in xrange(0, cCpus): 2599 sThis = oSession.queryDbgGuestStack(iCpu); 2600 if sThis is not None and len(sThis) > 0: 2601 asMiscInfos += [ 2602 '================ start guest stack VCPU %s ================\n' % (iCpu,), 2603 sThis, 2604 '================ end guest stack VCPU %s ==================\n' % (iCpu,), 2605 ]; 2606 2607 for sInfo, sArg in [ ('mode', 'all'), 2608 ('fflags', ''), 2609 ('cpumguest', 'verbose all'), 2610 ('cpumguestinstr', 'symbol all'), 2611 ('pic', ''), 2612 ('apic', ''), 2613 ('ioapic', ''), 2614 ('pit', ''), 2615 ('phys', ''), 2616 ('clocks', ''), 2617 ('timers', ''), 2618 ('gdtguest', ''), 2619 ('ldtguest', ''), 2620 ]: 2621 if sInfo in ['apic',] and self.fpApiVer < 5.1: # asserts and burns 2622 continue; 2623 sThis = oSession.queryDbgInfo(sInfo, sArg); 2593 2624 if sThis is not None and len(sThis) > 0: 2625 if sThis[-1] != '\n': 2626 sThis += '\n'; 2594 2627 asMiscInfos += [ 2595 '================ start guest stack VCPU %s ================\n' % (iCpu,),2628 '================ start %s %s ================\n' % (sInfo, sArg), 2596 2629 sThis, 2597 '================ end guest stack VCPU %s ==================\n' % (iCpu,),2630 '================ end %s %s ==================\n' % (sInfo, sArg), 2598 2631 ]; 2599 2600 for sInfo, sArg in [ ('mode', 'all'),2601 ('fflags', ''),2602 ('cpumguest', 'verbose all'),2603 ('cpumguestinstr', 'symbol all'),2604 ('pic', ''),2605 ('apic', ''),2606 ('ioapic', ''),2607 ('pit', ''),2608 ('phys', ''),2609 ('clocks', ''),2610 ('timers', ''),2611 ('gdtguest', ''),2612 ('ldtguest', ''),2613 ]:2614 if sInfo in ['apic',] and self.fpApiVer < 5.1: # asserts and burns2615 continue;2616 sThis = oSession.queryDbgInfo(sInfo, sArg);2617 if sThis is not None and len(sThis) > 0:2618 if sThis[-1] != '\n':2619 sThis += '\n';2620 asMiscInfos += [2621 '================ start %s %s ================\n' % (sInfo, sArg),2622 sThis,2623 '================ end %s %s ==================\n' % (sInfo, sArg),2624 ];2625 2632 2626 2633 # -
trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py
r61931 r61950 538 538 self.oConsoleEventHandler = None; 539 539 self.uPid = None; 540 self.fHostMemoryLow = False; # see signalHostMemoryLow; read-only for outsiders. 540 541 541 542 try: … … 708 709 self.oConsoleEventHandler.unregister(); 709 710 self.oConsoleEventHandler = None; 711 712 713 def signalHostMemoryLow(self): 714 """ 715 Used by a runtime error event handler to indicate that we're low on memory. 716 Signals the task. 717 """ 718 self.fHostMemoryLow = True; 719 self.signalTask(); 720 return True; 721 710 722 711 723 def assertPoweredOff(self):
Note:
See TracChangeset
for help on using the changeset viewer.