VirtualBox

Ignore:
Timestamp:
Dec 21, 2021 10:40:28 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
149040
Message:

Validation Kit/Guest Control: Added more checks for testGuestCtrlSessionReboot / "session_reboot" testcase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py

    r92982 r93037  
    32433243        # Create a process.
    32443244        #
     3245        # That process will also be used later to see if the session cleanup worked upon reboot.
     3246        #
    32453247        sImage = self.oTstDrv.getGuestSystemShell(oTestVm);
    32463248        asArgs  = [ sImage, ];
     
    32793281                        oThreadReboot.start();
    32803282
    3281                         # Not sure why this fudge is needed...
    3282                         reporter.log('5 second wait fudge before triggering reboot ...');
    3283                         self.oTstDrv.sleep(5);
    3284 
    32853283                        # Do the reboot.
    32863284                        reporter.log('Rebooting guest and reconnecting TXS ...');
     
    32953293                        oThreadReboot.join();
    32963294
     3295                        # Check that the guest session now still has the formerly guest process object created above,
     3296                        # but with the "down" status now (because of guest reboot).
     3297                        try:
     3298                            aoGuestProcs = self.oTstDrv.oVBoxMgr.getArray(oGuestSession, 'processes');
     3299                            if len(aoGuestProcs) == 1:
     3300                                enmProcSts = aoGuestProcs[0].status;
     3301                                if enmProcSts != vboxcon.ProcessStatus_Down:
     3302                                    fRc = reporter.error('Old guest process (before reboot) has status %d, expected %s' \
     3303                                                         % enmProcSts, vboxcon.ProcessStatus_Down);
     3304                            else:
     3305                                fRc = reporter.error('Old guest session (before reboot) has %d processes registered, expected 1' \
     3306                                                     % (len(aoGuestProcs)));
     3307                        except:
     3308                            fRc = reporter.errorXcpt();
    32973309            #
    32983310            # Try make sure we don't leave with a stale process on failure.
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette