Index: /trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
===================================================================
--- /trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py	(revision 79331)
+++ /trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py	(revision 79332)
@@ -1249,9 +1249,9 @@
     Test updating the Guest Additions inside the guest.
     """
-    def __init__(self, sSrc = "", asArgs = None, fFlags = None, oCreds = None):
+    def __init__(self, sSrc = "", asArgs = None, afFlags = None, oCreds = None):
         tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sSrc = sSrc;
         self.asArgs = asArgs;
-        self.fFlags = fFlags;
+        self.afFlags = afFlags;
 
 class tdTestResult(object):
@@ -4695,4 +4695,9 @@
         """
 
+        ## @todo currently disabled everywhere.
+        if self.oTstDrv.fpApiVer < 100.0:
+            reporter.log("Skipping updating GAs everywhere for now...");
+            return None;
+
         # Skip test for updating Guest Additions if we run on a too old (Windows) guest.
         ##
@@ -4706,23 +4711,7 @@
             return (None, oTxsSession);
 
-        # Some stupid trickery to guess the location of the iso.
-        sVBoxValidationKitISO = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../VBoxValidationKit.iso'));
-        if not os.path.isfile(sVBoxValidationKitISO):
-            sVBoxValidationKitISO = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../VBoxTestSuite.iso'));
-        if not os.path.isfile(sVBoxValidationKitISO):
-            sCur = os.getcwd();
-            for i in xrange(0, 10):
-                sVBoxValidationKitISO = os.path.join(sCur, 'validationkit/VBoxValidationKit.iso');
-                if os.path.isfile(sVBoxValidationKitISO):
-                    break;
-                sVBoxValidationKitISO = os.path.join(sCur, 'testsuite/VBoxTestSuite.iso');
-                if os.path.isfile(sVBoxValidationKitISO):
-                    break;
-                sCur = os.path.abspath(os.path.join(sCur, '..'));
-                if i is None: pass; # shut up pychecker/pylint.
-        if os.path.isfile(sVBoxValidationKitISO):
-            reporter.log('Validation Kit .ISO found at: %s' % (sVBoxValidationKitISO,));
-        else:
-            reporter.log('Warning: Validation Kit .ISO not found -- some tests might fail');
+        sVBoxValidationKitIso = self.oTstDrv.sVBoxValidationKitIso;
+        if not os.path.isfile(sVBoxValidationKitIso):
+            return reporter.log('Validation Kit .ISO not found at "%s"' % (sVBoxValidationKitIso,));
 
         sScratch = os.path.join(self.oTstDrv.sScratchPath, "testGctrlUpdateAdditions");
@@ -4731,6 +4720,5 @@
         except OSError as e:
             if e.errno != errno.EEXIST:
-                reporter.error('Failed: Unable to create scratch directory \"%s\"' % (sScratch,));
-                return (False, oTxsSession);
+                return reporter.error('Failed: Unable to create scratch directory \"%s\"' % (sScratch,));
         reporter.log('Scratch path is: %s' % (sScratch,));
 
@@ -4741,7 +4729,7 @@
                 [ tdTestUpdateAdditions(sSrc = ''), tdTestResultFailure() ],
 
-                # Wrong fFlags.
+                # Wrong flags.
                 [ tdTestUpdateAdditions(sSrc = self.oTstDrv.getGuestAdditionsIso(),
-                                        fFlags = [ 1234 ]), tdTestResultFailure() ],
+                                        afFlags = [ 1234 ]), tdTestResultFailure() ],
 
                 # Non-existing .ISO.
@@ -4749,5 +4737,5 @@
 
                 # Wrong .ISO.
-                [ tdTestUpdateAdditions(sSrc = sVBoxValidationKitISO), tdTestResultFailure() ],
+                [ tdTestUpdateAdditions(sSrc = sVBoxValidationKitIso), tdTestResultFailure() ],
 
                 # The real thing.
@@ -4768,42 +4756,41 @@
 
         fRc = True;
-        for (i, aTest) in enumerate(atTests):
-            oCurTest = aTest[0]; # tdTestExec, use an index, later.
-            oCurRes  = aTest[1]; # tdTestResult
-            reporter.log('Testing #%d, sSrc="%s", fFlags="%s" ...' % \
-                         (i, oCurTest.sSrc, oCurTest.fFlags));
+        for (i, tTest) in enumerate(atTests):
+            oCurTest = tTest[0]  # type: tdTestUpdateAdditions
+            oCurRes  = tTest[1]  # type: tdTestResult
+            reporter.log('Testing #%d, sSrc="%s", afFlags="%s" ...' % (i, oCurTest.sSrc, oCurTest.afFlags,));
+
             oCurTest.setEnvironment(oSession, oTxsSession, oTestVm);
             fRc, _ = oCurTest.createSession('Test #%d' % (i,));
-            if fRc is False:
-                reporter.error('Test #%d failed: Could not create session' % (i,));
+            if fRc is not True:
+                fRc = reporter.error('Test #%d failed: Could not create session' % (i,));
                 break;
-            try:
-                oCurProgress = oCurTest.oGuest.updateGuestAdditions(oCurTest.sSrc, oCurTest.asArgs, oCurTest.fFlags);
+
+            try:
+                oCurProgress = oCurTest.oGuest.updateGuestAdditions(oCurTest.sSrc, oCurTest.asArgs, oCurTest.afFlags);
+            except:
+                reporter.maybeErrXcpt(oCurRes.fRc, 'Updating Guest Additions exception for sSrc="%s", afFlags="%s":'
+                                      % (oCurTest.sSrc, oCurTest.afFlags,));
+                fRc = False;
+            else:
                 if oCurProgress is not None:
-                    oProgress = vboxwrappers.ProgressWrapper(oCurProgress, self.oTstDrv.oVBoxMgr, self.oTstDrv, "gctrlUpGA");
-                    try:
-                        oProgress.wait();
-                        if not oProgress.isSuccess():
-                            oProgress.logResult(fIgnoreErrors = True);
-                            fRc = False;
-                    except:
-                        reporter.logXcpt('Waiting exception for updating Guest Additions:');
+                    oWrapperProgress = vboxwrappers.ProgressWrapper(oCurProgress, self.oTstDrv.oVBoxMgr,
+                                                                    self.oTstDrv, "gctrlUpGA");
+                    oWrapperProgress.wait();
+                    if not oWrapperProgress.isSuccess():
+                        oWrapperProgress.logResult(fIgnoreErrors = not oCurRes.fRc);
                         fRc = False;
                 else:
-                    reporter.error('No progress object returned');
-                    fRc = False;
-            except:
-                # Just log, don't assume an error here (will be done in the main loop then).
-                reporter.logXcpt('Updating Guest Additions exception for sSrc="%s", fFlags="%s":' \
-                                 % (oCurTest.sSrc, oCurTest.fFlags));
-                fRc = False;
+                    fRc = reporter.error('No progress object returned');
+
             oCurTest.closeSession();
             if fRc is oCurRes.fRc:
                 if fRc:
                     ## @todo Verify if Guest Additions were really updated (build, revision, ...).
+                    ## @todo r=bird: Not possible since you're installing the same GAs as before...
+                    ##               Maybe check creation dates on certain .sys/.dll/.exe files?
                     pass;
             else:
-                reporter.error('Test #%d failed: Got %s, expected %s' % (i, fRc, oCurRes.fRc));
-                fRc = False;
+                fRc = reporter.error('Test #%d failed: Got %s, expected %s' % (i, fRc, oCurRes.fRc));
                 break;
 
@@ -4941,9 +4928,9 @@
         asArgs = [ sCmd, '/C', 'dir', '/S', 'c:\\windows' ];
         aEnv = [];
-        fFlags = [];
+        afFlags = [];
 
         for _ in xrange(100):
             oProc = oGuestSession.processCreate(sCmd, asArgs if self.fpApiVer >= 5.0 else asArgs[1:],
-                                                aEnv, fFlags, 30 * 1000);
+                                                aEnv, afFlags, 30 * 1000);
 
             aWaitFor = [ vboxcon.ProcessWaitForFlag_Terminate ];
