VirtualBox

Changeset 93140 in vbox for trunk/src


Ignore:
Timestamp:
Jan 7, 2022 3:57:25 PM (3 years ago)
Author:
vboxsync
Message:

Validation Kit/Guest Control: Handle guest session closing on guest reboot more gracefully (and log so if it failed).

File:
1 edited

Legend:

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

    r93139 r93140  
    32383238        oCreds.applyDefaultsIfNotSet(oTestVm);
    32393239
     3240        fRebooted = False;
    32403241        fRc = True;
    32413242
     
    33013302                        (oSession, oTxsSession) = self.oTstDrv.txsRebootAndReconnectViaTcp(oSession, oTxsSession,
    33023303                                                                                           cMsTimeout = 3 * 60000);
    3303                         if not oSession or not oTxsSession:
     3304                        if  oSession \
     3305                        and oTxsSession:
     3306                            # Set reboot flag (needed later for session closing).
     3307                            fRebooted = True;
     3308                        else:
     3309                            reporter.error('Rebooting via TXS failed');
    33043310                            try:    oGuestProcess.terminate();
    33053311                            except: reporter.logXcpt();
     
    33363342            oGuestSession.close();
    33373343        except:
    3338             fRc = reporter.errorXcpt();
     3344            # Closing the guest session will fail when the guest reboot has been triggered,
     3345            # as the session object will be cleared on a guest reboot.
     3346            if fRebooted:
     3347                reporter.logXcpt('Closing guest session failed, good (guest rebooted)');
     3348            else: # ... otherwise this (still) should succeed. Report so if it doesn't.
     3349                reporter.errorXcpt('Closing guest session failed');
    33393350
    33403351        return (fRc, oTxsSession);
Note: See TracChangeset for help on using the changeset viewer.

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