VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py@ 84190

Last change on this file since 84190 was 84190, checked in by vboxsync, 5 years ago

Validation Kit/tdAddBasic1.py: Fixes for GA runlevel testing.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 24.6 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3# $Id: tdAddBasic1.py 84190 2020-05-07 18:28:27Z vboxsync $
4
5"""
6VirtualBox Validation Kit - Additions Basics #1.
7"""
8
9__copyright__ = \
10"""
11Copyright (C) 2010-2020 Oracle Corporation
12
13This file is part of VirtualBox Open Source Edition (OSE), as
14available from http://www.virtualbox.org. This file is free software;
15you can redistribute it and/or modify it under the terms of the GNU
16General Public License (GPL) as published by the Free Software
17Foundation, in version 2 as it comes in the "COPYING" file of the
18VirtualBox OSE distribution. VirtualBox OSE is distributed in the
19hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
20
21The contents of this file may alternatively be used under the terms
22of the Common Development and Distribution License Version 1.0
23(CDDL) only, as it comes in the "COPYING.CDDL" file of the
24VirtualBox OSE distribution, in which case the provisions of the
25CDDL are applicable instead of those of the GPL.
26
27You may elect to license modified versions of this file under the
28terms and conditions of either the GPL or the CDDL or both.
29"""
30__version__ = "$Revision: 84190 $"
31
32# Standard Python imports.
33import os;
34import sys;
35import uuid;
36
37# Only the main script needs to modify the path.
38try: __file__
39except: __file__ = sys.argv[0];
40g_ksValidationKitDir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))));
41sys.path.append(g_ksValidationKitDir);
42
43# Validation Kit imports.
44from testdriver import reporter;
45from testdriver import base;
46from testdriver import vbox;
47from testdriver import vboxcon;
48
49# Sub-test driver imports.
50sys.path.append(os.path.dirname(os.path.abspath(__file__))); # For sub-test drivers.
51from tdAddGuestCtrl import SubTstDrvAddGuestCtrl;
52from tdAddSharedFolders1 import SubTstDrvAddSharedFolders1;
53
54
55
56class tdAddBasicConsoleCallbacks(vbox.ConsoleEventHandlerBase):
57 """
58 For catching the Guest Additions change state events.
59 """
60 def __init__(self, dArgs):
61 oTstDrv = dArgs['oTstDrv'];
62 oVBoxMgr = dArgs['oVBoxMgr']; _ = oVBoxMgr;
63 oGuest = dArgs['oGuest'];
64
65 vbox.ConsoleEventHandlerBase.__init__(self, dArgs, 'tdAddBasic1');
66 self.oTstDrv = oTstDrv;
67 self.oGuest = oGuest;
68
69 def handleEvent(self, oEvt):
70 try:
71 oEvtBase = self.oVBoxMgr.queryInterface(oEvt, 'IEvent');
72 eType = oEvtBase.type;
73 except:
74 reporter.logXcpt();
75 return None;
76 if eType == vboxcon.VBoxEventType_OnAdditionsStateChanged:
77 return self.onAdditionsStateChanged();
78 return None;
79
80 def onAdditionsStateChanged(self):
81 reporter.log('onAdditionsStateChange');
82 self.oTstDrv.fGAStatusCallbackFired = True;
83 self.oTstDrv.eGAStatusCallbackRunlevel = self.oGuest.additionsRunLevel;
84 self.oVBoxMgr.interruptWaitEvents();
85 return None;
86
87class tdAddBasic1(vbox.TestDriver): # pylint: disable=too-many-instance-attributes
88 """
89 Additions Basics #1.
90 """
91 ## @todo
92 # - More of the settings stuff can be and need to be generalized!
93 #
94
95 def __init__(self):
96 vbox.TestDriver.__init__(self);
97 self.oTestVmSet = self.oTestVmManager.getSmokeVmSet('nat');
98 self.asTestsDef = ['install', 'guestprops', 'stdguestprops', 'guestcontrol', 'sharedfolders'];
99 self.asTests = self.asTestsDef;
100 self.asRsrcs = None
101 # The file we're going to use as a beacon to wait if the Guest Additions CD-ROM is ready.
102 self.sFileCdWait = '';
103
104 self.addSubTestDriver(SubTstDrvAddGuestCtrl(self));
105 self.addSubTestDriver(SubTstDrvAddSharedFolders1(self));
106
107 self.fGAStatusCallbackFired = False;
108 self.eGAStatusCallbackRunlevel = 0;
109
110 #
111 # Overridden methods.
112 #
113 def showUsage(self):
114 rc = vbox.TestDriver.showUsage(self);
115 reporter.log('');
116 reporter.log('tdAddBasic1 Options:');
117 reporter.log(' --tests <s1[:s2[:]]>');
118 reporter.log(' Default: %s (all)' % (':'.join(self.asTestsDef)));
119 reporter.log(' --quick');
120 reporter.log(' Same as --virt-modes hwvirt --cpu-counts 1.');
121 return rc;
122
123 def parseOption(self, asArgs, iArg): # pylint: disable=too-many-branches,too-many-statements
124 if asArgs[iArg] == '--tests':
125 iArg += 1;
126 if iArg >= len(asArgs): raise base.InvalidOption('The "--tests" takes a colon separated list of tests');
127 self.asTests = asArgs[iArg].split(':');
128 for s in self.asTests:
129 if s not in self.asTestsDef:
130 raise base.InvalidOption('The "--tests" value "%s" is not valid; valid values are: %s'
131 % (s, ' '.join(self.asTestsDef),));
132
133 elif asArgs[iArg] == '--quick':
134 self.parseOption(['--virt-modes', 'hwvirt'], 0);
135 self.parseOption(['--cpu-counts', '1'], 0);
136
137 else:
138 return vbox.TestDriver.parseOption(self, asArgs, iArg);
139 return iArg + 1;
140
141 def getResourceSet(self):
142 if self.asRsrcs is None:
143 self.asRsrcs = []
144 for oSubTstDrv in self.aoSubTstDrvs:
145 self.asRsrcs.extend(oSubTstDrv.asRsrcs)
146 self.asRsrcs.extend(self.oTestVmSet.getResourceSet())
147 return self.asRsrcs
148
149 def actionConfig(self):
150 if not self.importVBoxApi(): # So we can use the constant below.
151 return False;
152
153 eNic0AttachType = vboxcon.NetworkAttachmentType_NAT;
154 sGaIso = self.getGuestAdditionsIso();
155
156 # On 6.0 we merge the GAs with the ValidationKit so we can get at FsPerf.
157 # Note! Not possible to do a dboule import as both images an '/OS2' dir.
158 # So, using same dir as with unattended VISOs for the valkit.
159 if self.fpApiVer >= 6.0 and 'sharedfolders' in self.asTests:
160 sGaViso = os.path.join(self.sScratchPath, 'AdditionsAndValKit.viso');
161 ## @todo encode as bash cmd line:
162 sVisoContent = '--iprt-iso-maker-file-marker-bourne-sh %s ' \
163 '--import-iso \'%s\' ' \
164 '--push-iso \'%s\' ' \
165 '/vboxvalidationkit=/ ' \
166 '--pop ' \
167 % (uuid.uuid4(), sGaIso, self.sVBoxValidationKitIso);
168 reporter.log2('Using VISO combining GAs and ValKit "%s": %s' % (sGaViso, sVisoContent));
169 oGaViso = open(sGaViso, 'w');
170 oGaViso.write(sVisoContent);
171 oGaViso.close();
172 sGaIso = sGaViso;
173
174 return self.oTestVmSet.actionConfig(self, eNic0AttachType = eNic0AttachType, sDvdImage = sGaIso);
175
176 def actionExecute(self):
177 return self.oTestVmSet.actionExecute(self, self.testOneCfg);
178
179
180 #
181 # Test execution helpers.
182 #
183
184 def testOneCfg(self, oVM, oTestVm):
185 """
186 Runs the specified VM thru the tests.
187
188 Returns a success indicator on the general test execution. This is not
189 the actual test result.
190 """
191 fRc = False;
192
193 if oTestVm.isWindows():
194 self.sFileCdWait = 'VBoxWindowsAdditions.exe';
195 elif oTestVm.isLinux():
196 self.sFileCdWait = 'VBoxLinuxAdditions.run';
197
198 self.logVmInfo(oVM);
199 oSession, oTxsSession = self.startVmAndConnectToTxsViaTcp(oTestVm.sVmName, fCdWait = True,
200 cMsCdWait = 5 * 60 * 1000,
201 sFileCdWait = self.sFileCdWait);
202 if oSession is not None:
203 self.addTask(oTxsSession);
204 # Do the testing.
205 fSkip = 'install' not in self.asTests;
206 reporter.testStart('Install');
207 if not fSkip:
208 fRc, oTxsSession = self.testInstallAdditions(oSession, oTxsSession, oTestVm);
209 reporter.testDone(fSkip);
210
211 if not fSkip \
212 and not fRc:
213 reporter.log('Skipping following tests as Guest Additions were not installed successfully');
214 else:
215 fSkip = 'guestprops' not in self.asTests;
216 reporter.testStart('Guest Properties');
217 if not fSkip:
218 fRc = self.testGuestProperties(oSession, oTxsSession, oTestVm) and fRc;
219 reporter.testDone(fSkip);
220
221 fSkip = 'guestcontrol' not in self.asTests;
222 reporter.testStart('Guest Control');
223 if not fSkip:
224 fRc, oTxsSession = self.aoSubTstDrvs[0].testIt(oTestVm, oSession, oTxsSession);
225 reporter.testDone(fSkip);
226
227 fSkip = 'sharedfolders' not in self.asTests and self.fpApiVer >= 6.0;
228 reporter.testStart('Shared Folders');
229 if not fSkip:
230 fRc, oTxsSession = self.aoSubTstDrvs[1].testIt(oTestVm, oSession, oTxsSession);
231 reporter.testDone(fSkip or fRc is None);
232
233 ## @todo Save and restore test.
234
235 ## @todo Reset tests.
236
237 ## @todo Final test: Uninstallation.
238
239 # Cleanup.
240 self.removeTask(oTxsSession);
241 self.terminateVmBySession(oSession)
242 return fRc;
243
244 def waitForGuestAdditionsRunLevel(self, oSession, oGuest, cMsTimeout, eRunLevel):
245 """
246 Waits for the Guest Additions to reach a specific run level.
247
248 Returns success status.
249 """
250 # No need to wait as we already reached the run level?
251 eRunLevelCur = oGuest.additionsRunLevel;
252 if eRunLevelCur == eRunLevel:
253 reporter.log('Already reached run level %s' % eRunLevel);
254 return True;
255
256 reporter.log('Waiting for Guest Additions to reach run level %s with %dms (current: %s) ...' %
257 (eRunLevel, cMsTimeout, eRunLevelCur));
258
259 oConsoleCallbacks = oSession.registerDerivedEventHandler(tdAddBasicConsoleCallbacks, \
260 {'oTstDrv':self, 'oGuest':oGuest, });
261 fRc = False;
262 if oConsoleCallbacks is not None:
263 tsStart = base.timestampMilli();
264 while base.timestampMilli() - tsStart < cMsTimeout:
265 self.sleep(1); # Do some busy waiting.
266 if self.fGAStatusCallbackFired:
267 reporter.log('Reached new run level %s after %dms' %
268 (self.eGAStatusCallbackRunlevel, base.timestampMilli() - tsStart));
269 if eRunLevel == self.eGAStatusCallbackRunlevel:
270 fRc = True;
271 break;
272 self.fGAStatusCallbackFired = False;
273 if fRc:
274 reporter.log('Final Guest Additions run level reached after %dms' % (base.timestampMilli() - tsStart));
275 else:
276 reporter.error('Guest Additions run level not reached');
277
278 # cleanup.
279 oConsoleCallbacks.unregister();
280 else:
281 reporter.error('Registering derived event handler failed');
282
283 if not fRc:
284 reporter.log('Waiting for Guest Additions to reach run level %s failed' % (eRunLevel));
285 return fRc;
286
287 def testInstallAdditions(self, oSession, oTxsSession, oTestVm):
288 """
289 Tests installing the guest additions
290 """
291 if oTestVm.isWindows():
292 (fRc, oTxsSession) = self.testWindowsInstallAdditions(oSession, oTxsSession, oTestVm);
293 elif oTestVm.isLinux():
294 (fRc, oTxsSession) = self.testLinuxInstallAdditions(oSession, oTxsSession, oTestVm);
295 else:
296 reporter.error('Guest Additions installation not implemented for %s yet! (%s)' %
297 (oTestVm.sKind, oTestVm.sVmName,));
298 fRc = False;
299
300 #
301 # Verify installation of Guest Additions using commmon bits.
302 #
303 if fRc:
304 #
305 # Check if the additions are operational.
306 #
307 try: oGuest = oSession.o.console.guest;
308 except:
309 reporter.errorXcpt('Getting IGuest failed.');
310 return (False, oTxsSession);
311
312 # Wait for the GAs to come up.
313 reporter.testStart('IGuest::additionsRunLevel');
314 fRc = self.testIGuest_additionsRunLevel(oSession, oTestVm, oGuest);
315 reporter.testDone();
316
317 # Check the additionsVersion attribute. It must not be empty.
318 reporter.testStart('IGuest::additionsVersion');
319 fRc = self.testIGuest_additionsVersion(oGuest);
320 reporter.testDone();
321
322 # Check Guest Additions facilities
323 reporter.testStart('IGuest::getFacilityStatus');
324 fRc = self.testIGuest_getFacilityStatus(oTestVm, oGuest);
325 reporter.testDone();
326
327 return (fRc, oTxsSession);
328
329 def testWindowsInstallAdditions(self, oSession, oTxsSession, oTestVm):
330 """
331 Installs the Windows guest additions using the test execution service.
332 Since this involves rebooting the guest, we will have to create a new TXS session.
333 """
334
335 #
336 # Install the public signing key.
337 #
338 if oTestVm.sKind not in ('WindowsNT4', 'Windows2000', 'WindowsXP', 'Windows2003'):
339 fRc = self.txsRunTest(oTxsSession, 'VBoxCertUtil.exe', 1 * 60 * 1000, '${CDROM}/cert/VBoxCertUtil.exe',
340 ('${CDROM}/cert/VBoxCertUtil.exe', 'add-trusted-publisher', '${CDROM}/cert/vbox-sha1.cer'),
341 fCheckSessionStatus = True);
342 if not fRc:
343 reporter.error('Error installing SHA1 certificate');
344 else:
345 fRc = self.txsRunTest(oTxsSession, 'VBoxCertUtil.exe', 1 * 60 * 1000, '${CDROM}/cert/VBoxCertUtil.exe',
346 ('${CDROM}/cert/VBoxCertUtil.exe', 'add-trusted-publisher',
347 '${CDROM}/cert/vbox-sha256.cer'), fCheckSessionStatus = True);
348 if not fRc:
349 reporter.error('Error installing SHA256 certificate');
350
351 #
352 # Delete relevant log files.
353 #
354 # Note! On some guests the files in question still can be locked by the OS, so ignore
355 # deletion errors from the guest side (e.g. sharing violations) and just continue.
356 #
357 asLogFiles = [];
358 fHaveSetupApiDevLog = False;
359 if oTestVm.sKind in ('WindowsNT4',):
360 sWinDir = 'C:/WinNT/';
361 else:
362 sWinDir = 'C:/Windows/';
363 asLogFiles = [sWinDir + 'setupapi.log', sWinDir + 'setupact.log', sWinDir + 'setuperr.log'];
364
365 # Apply The SetupAPI logging level so that we also get the (most verbose) setupapi.dev.log file.
366 ## @todo !!! HACK ALERT !!! Add the value directly into the testing source image. Later.
367 fHaveSetupApiDevLog = self.txsRunTest(oTxsSession, 'Enabling setupapi.dev.log', 30 * 1000,
368 'c:\\Windows\\System32\\reg.exe',
369 ('c:\\Windows\\System32\\reg.exe', 'add',
370 '"HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup"',
371 '/v', 'LogLevel', '/t', 'REG_DWORD', '/d', '0xFF'),
372 fCheckSessionStatus = True);
373
374 for sFile in asLogFiles:
375 self.txsRmFile(oSession, oTxsSession, sFile, 10 * 1000, fIgnoreErrors = True);
376
377 #
378 # The actual install.
379 # Enable installing the optional auto-logon modules (VBoxGINA/VBoxCredProv).
380 # Also tell the installer to produce the appropriate log files.
381 #
382 fRc = self.txsRunTest(oTxsSession, 'VBoxWindowsAdditions.exe', 5 * 60 * 1000, '${CDROM}/VBoxWindowsAdditions.exe',
383 ('${CDROM}/VBoxWindowsAdditions.exe', '/S', '/l', '/with_autologon'), fCheckSessionStatus = True);
384
385 # Add the Windows Guest Additions installer files to the files we want to download
386 # from the guest.
387 sGuestAddsDir = 'C:/Program Files/Oracle/VirtualBox Guest Additions/';
388 asLogFiles.append(sGuestAddsDir + 'install.log');
389 # Note: There won't be a install_ui.log because of the silent installation.
390 asLogFiles.append(sGuestAddsDir + 'install_drivers.log');
391 asLogFiles.append('C:/Windows/setupapi.log');
392
393 # Note: setupapi.dev.log only is available since Windows 2000.
394 if fHaveSetupApiDevLog:
395 asLogFiles.append('C:/Windows/setupapi.dev.log');
396
397 #
398 # Download log files.
399 # Ignore errors as all files above might not be present (or in different locations)
400 # on different Windows guests.
401 #
402 self.txsDownloadFiles(oSession, oTxsSession, asLogFiles, fIgnoreErrors = True);
403
404 #
405 # Reboot the VM and reconnect the TXS session.
406 #
407 if fRc:
408 reporter.testStart('Rebooting guest w/ updated Guest Additions active');
409 (fRc, oTxsSession) = self.txsRebootAndReconnectViaTcp(oSession, oTxsSession, cMsTimeout = 15 * 60 * 1000);
410 if fRc:
411 pass;
412 else:
413 reporter.testFailure('Rebooting and reconnecting to TXS service failed');
414 reporter.testDone();
415 else:
416 reporter.error('Error installing Windows Guest Additions (installer returned with exit code <> 0)')
417
418 return (fRc, oTxsSession);
419
420 def getAdditionsInstallerResult(self, oTxsSession):
421 """
422 Extracts the Guest Additions installer exit code from a run before.
423 Assumes that nothing else has been run on the same TXS session in the meantime.
424 """
425 iRc = 0;
426 (_, sOpcode, abPayload) = oTxsSession.getLastReply();
427 if sOpcode.startswith('PROC NOK '): # Extract process rc
428 iRc = abPayload[0]; # ASSUMES 8-bit rc for now.
429 ## @todo Parse more statuses here.
430 return iRc;
431
432 def testLinuxInstallAdditions(self, oSession, oTxsSession, oTestVm):
433 _ = oSession;
434 _ = oTestVm;
435
436 fRc = False;
437
438 #
439 # The actual install.
440 # Also tell the installer to produce the appropriate log files.
441 #
442 # Make sure to add "--nox11" to the makeself wrapper in order to not getting any blocking
443 # xterm window spawned.
444 fRc = self.txsRunTest(oTxsSession, 'VBoxLinuxAdditions.run', 30 * 60 * 1000,
445 '/bin/sh', ('/bin/sh', '${CDROM}/VBoxLinuxAdditions.run', '--nox11'));
446 if not fRc:
447 iRc = self.getAdditionsInstallerResult(oTxsSession);
448 # Check for rc == 0 just for completeness.
449 if iRc in (0, 2): # Can happen if the GA installer has detected older VBox kernel modules running and needs a reboot.
450 reporter.log('Guest has old(er) VBox kernel modules still running; requires a reboot');
451 fRc = True;
452
453 if not fRc:
454 reporter.error('Installing Linux Additions failed (isSuccess=%s, lastReply=%s, see log file for details)'
455 % (oTxsSession.isSuccess(), oTxsSession.getLastReply()));
456
457 #
458 # Download log files.
459 # Ignore errors as all files above might not be present for whatever reason.
460 #
461 asLogFile = [];
462 asLogFile.append('/var/log/vboxadd-install.log');
463 self.txsDownloadFiles(oSession, oTxsSession, asLogFile, fIgnoreErrors = True);
464
465 # Do the final reboot to get the just installed Guest Additions up and running.
466 if fRc:
467 reporter.testStart('Rebooting guest w/ updated Guest Additions active');
468 (fRc, oTxsSession) = self.txsRebootAndReconnectViaTcp(oSession, oTxsSession, cMsTimeout = 15 * 60 * 1000);
469 if fRc:
470 pass
471 else:
472 reporter.testFailure('Rebooting and reconnecting to TXS service failed');
473 reporter.testDone();
474
475 return (fRc, oTxsSession);
476
477 def testIGuest_additionsRunLevel(self, oSession, oTestVm, oGuest):
478 """
479 Do run level tests.
480 """
481 if oTestVm.isWindows():
482 if oTestVm.isLoggedOntoDesktop():
483 eExpectedRunLevel = vboxcon.AdditionsRunLevelType_Desktop;
484 else:
485 eExpectedRunLevel = vboxcon.AdditionsRunLevelType_Userland;
486 else:
487 ## @todo VBoxClient does not have facility statuses implemented yet.
488 eExpectedRunLevel = vboxcon.AdditionsRunLevelType_Userland;
489
490 return self.waitForGuestAdditionsRunLevel(oSession, oGuest, 60 * 1000, eExpectedRunLevel);
491
492 def testIGuest_additionsVersion(self, oGuest):
493 """
494 Returns False if no version string could be obtained, otherwise True
495 even though errors are logged.
496 """
497 try:
498 sVer = oGuest.additionsVersion;
499 except:
500 reporter.errorXcpt('Getting the additions version failed.');
501 return False;
502 reporter.log('IGuest::additionsVersion="%s"' % (sVer,));
503
504 if sVer.strip() == '':
505 reporter.error('IGuest::additionsVersion is empty.');
506 return False;
507
508 if sVer != sVer.strip():
509 reporter.error('IGuest::additionsVersion is contains spaces: "%s".' % (sVer,));
510
511 asBits = sVer.split('.');
512 if len(asBits) < 3:
513 reporter.error('IGuest::additionsVersion does not contain at least tree dot separated fields: "%s" (%d).'
514 % (sVer, len(asBits)));
515
516 ## @todo verify the format.
517 return True;
518
519 def checkFacilityStatus(self, oGuest, eFacilityType, sDesc, fMustSucceed = True):
520 """
521 Prints the current status of a Guest Additions facility.
522
523 Return success status.
524 """
525
526 fRc = True;
527
528 try:
529 eStatus, _ = oGuest.getFacilityStatus(eFacilityType);
530 reporter.log3('%s -> %s' % (sDesc, eStatus,));
531 except:
532 if fMustSucceed:
533 reporter.errorXcpt('Getting facility status for %s failed' % (eFacilityType,));
534 fRc = False;
535 else:
536 if eStatus == vboxcon.AdditionsFacilityStatus_Inactive:
537 sStatus = "INACTIVE";
538 elif eStatus == vboxcon.AdditionsFacilityStatus_Paused:
539 sStatus = "PAUSED";
540 elif eStatus == vboxcon.AdditionsFacilityStatus_PreInit:
541 sStatus = "PREINIT";
542 elif eStatus == vboxcon.AdditionsFacilityStatus_Init:
543 sStatus = "INIT";
544 elif eStatus == vboxcon.AdditionsFacilityStatus_Active:
545 sStatus = "ACTIVE";
546 elif eStatus == vboxcon.AdditionsFacilityStatus_Terminating:
547 sStatus = "TERMINATING";
548 fRc = not fMustSucceed;
549 elif eStatus == vboxcon.AdditionsFacilityStatus_Terminated:
550 sStatus = "TERMINATED";
551 fRc = not fMustSucceed;
552 elif eStatus == vboxcon.AdditionsFacilityStatus_Failed:
553 sStatus = "FAILED";
554 fRc = not fMustSucceed;
555 else:
556 sStatus = "UNKNOWN";
557 fRc = not fMustSucceed;
558
559 reporter.log('Guest Additions facility "%s": %s' % (sDesc, sStatus));
560 if fMustSucceed \
561 and not fRc:
562 reporter.error('Guest Additions facility "%s" did not report expected status (is "%s")' % (sDesc, sStatus));
563
564 return fRc;
565
566 def testIGuest_getFacilityStatus(self, oTestVm, oGuest):
567 """
568 Checks Guest Additions facilities for their status.
569
570 Returns success status.
571 """
572
573 reporter.testStart('Status VBoxGuest Driver');
574 fRc = self.checkFacilityStatus(oGuest, vboxcon.AdditionsFacilityType_VBoxGuestDriver, "VBoxGuest Driver");
575 reporter.testDone();
576
577 reporter.testStart('Status VBoxService');
578 fRc = self.checkFacilityStatus(oGuest, vboxcon.AdditionsFacilityType_VBoxService, "VBoxService") and fRc;
579 reporter.testDone();
580
581 if oTestVm.isWindows():
582 if oTestVm.isLoggedOntoDesktop():
583 ## @todo VBoxClient does not have facility statuses implemented yet.
584 reporter.testStart('Status VBoxTray / VBoxClient');
585 fRc = self.checkFacilityStatus(oGuest, vboxcon.AdditionsFacilityType_VBoxTrayClient,
586 "VBoxTray / VBoxClient") and fRc;
587 reporter.testDone();
588 ## @todo Add more.
589
590 return fRc;
591
592 def testGuestProperties(self, oSession, oTxsSession, oTestVm):
593 """
594 Test guest properties.
595 """
596 _ = oSession; _ = oTxsSession; _ = oTestVm;
597 return True;
598
599if __name__ == '__main__':
600 sys.exit(tdAddBasic1().main(sys.argv));
Note: See TracBrowser for help on using the repository browser.

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