VirtualBox

Changeset 100627 in vbox for trunk


Ignore:
Timestamp:
Jul 18, 2023 11:21:26 AM (15 months ago)
Author:
vboxsync
Message:

Guest Control/Validation Kit: Tests VMSVGA device, part 1 (prototype)

File:
1 edited

Legend:

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

    r99519 r100627  
    15061506            ( False, self.testGuestCtrlFileRemove,          'file_remove',      'Removing files',), # Destroys prepped files.
    15071507            ( False, self.testGuestCtrlUpdateAdditions,     'update_additions', 'Updating Guest Additions',),
     1508            ( False, self.testGuestCtrl3D,                  '3d',               '3D acceleration',),
    15081509        ];
    15091510
     
    54825483        return (fRc, oTxsSession);
    54835484
    5484 
     5485    def testGuestCtrl3D(self, oSession, oTxsSession, oTestVm):
     5486        """
     5487        Tests for VMSVGA device.
     5488        """
     5489
     5490        if oTestVm.sKind not in ('Windows7', 'Windows7_64', 'Windows8_64', 'Windows10', 'Windows10_64', 'Windows11_64'):
     5491            return (True, oTxsSession);
     5492
     5493        sPnpUtil = os.path.join(self.oTstDrv.getGuestSystemDir(oTestVm), 'pnputil.exe');
     5494
     5495        # Use credential defaults.
     5496        oCreds = tdCtxCreds();
     5497        oCreds.applyDefaultsIfNotSet(oTestVm);
     5498
     5499        #
     5500        # Create a session.
     5501        #
     5502        try:
     5503            oGuest = oSession.o.console.guest;
     5504            oGuestSession = oGuest.createSession(oCreds.sUser, oCreds.sPassword, oCreds.sDomain, "testGuestCtrl3D");
     5505            eWaitResult = oGuestSession.waitForArray([ vboxcon.GuestSessionWaitForFlag_Start, ], 30 * 1000);
     5506        except:
     5507            return (reporter.errorXcpt(), oTxsSession);
     5508
     5509        # Be nice to Guest Additions < 4.3: They don't support session handling and therefore return WaitFlagNotSupported.
     5510        if eWaitResult not in (vboxcon.GuestSessionWaitResult_Start, vboxcon.GuestSessionWaitResult_WaitFlagNotSupported):
     5511            return (reporter.error('Session did not start successfully - wait error: %d' % (eWaitResult,)), oTxsSession);
     5512        reporter.log('Session successfully started');
     5513
     5514        fRc = True;
     5515
     5516        try:
     5517            oCurProcess = self.processCreateWrapper(oGuestSession, sPnpUtil, [ sPnpUtil, '/enum-devices', '/connected', '/class', 'Display' ] if self.oTstDrv.fpApiVer >= 5.0 else [],
     5518                                                    "", # Working directory.
     5519                                                    [], [], 30 * 1000);
     5520        except:
     5521            fRc = reporter.errorXcpt();
     5522        else:
     5523            reporter.log('Waiting for PnPUtil process being started ...');
     5524            try:
     5525                eWaitResult = oCurProcess.waitForArray([ vboxcon.ProcessWaitForFlag_Start ], 30 * 1000);
     5526            except:
     5527                fRc = reporter.errorXcpt();
     5528            else:
     5529                if eWaitResult != vboxcon.ProcessWaitResult_Start:
     5530                    fRc = reporter.error('Waiting for PnPUtil process to start failed, got status %d' % (eWaitResult,));
     5531                else:
     5532                    reporter.log('PnPUtil process started');
     5533
     5534            oCurProcess = None;
     5535
     5536        #
     5537        # Clean up the session.
     5538        #
     5539        try:
     5540            oGuestSession.close();
     5541        except:
     5542            fRc = reporter.errorXcpt();
     5543
     5544        return (fRc, oTxsSession);
    54855545
    54865546class tdAddGuestCtrl(vbox.TestDriver):                                         # pylint: disable=too-many-instance-attributes,too-many-public-methods
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