Index: /trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
===================================================================
--- /trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py	(revision 79329)
+++ /trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py	(revision 79330)
@@ -109,7 +109,7 @@
           were installed and running on the guest to be tested.
     """
-    def __init__(self):
+    def __init__(self, oCreds = None):
         self.oGuest    = None;      ##< IGuest.
-        self.oCreds    = None       ##< type: tdCtxCreds
+        self.oCreds    = oCreds     ##< type: tdCtxCreds
         self.timeoutMS = 30 * 1000; ##< 30s timeout
         self.oGuestSession = None;  ##< IGuestSession reference or None.
@@ -224,7 +224,6 @@
     Test for copying files from the guest to the host.
     """
-    def __init__(self, sSrc = "", sDst = "", sUser = None, sPassword = None, fFlags = None, oSrc = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sSrc = "", sDst = "", oCreds = None, fFlags = None, oSrc = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sSrc = sSrc;
         self.sDst = sDst;
@@ -236,6 +235,6 @@
 class tdTestCopyFromDir(tdTestCopyFrom):
 
-    def __init__(self, sSrc = "", sDst = "", sUser = None, sPassword = None, fFlags = None, oSrc = None, fIntoDst = False):
-        tdTestCopyFrom.__init__(self, sSrc, sDst, sUser, sPassword, fFlags, oSrc);
+    def __init__(self, sSrc = "", sDst = "", oCreds = None, fFlags = None, oSrc = None, fIntoDst = False):
+        tdTestCopyFrom.__init__(self, sSrc, sDst, oCreds, fFlags, oSrc);
         self.fIntoDst = fIntoDst; # hint to the verification code that sDst == oSrc, rather than sDst+oSrc.sNAme == oSrc.
 
@@ -267,7 +266,6 @@
     Test for copying files from the host to the guest.
     """
-    def __init__(self, sSrc = "", sDst = "", sUser = None, sPassword = None, fFlags = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sSrc = "", sDst = "", oCreds = None, fFlags = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sSrc = sSrc;
         self.sDst = sDst;
@@ -284,7 +282,6 @@
     Test for directoryCreate call.
     """
-    def __init__(self, sDirectory = "", sUser = None, sPassword = None, fMode = 0, fFlags = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sDirectory = "", oCreds = None, fMode = 0, fFlags = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sDirectory = sDirectory;
         self.fMode = fMode;
@@ -295,7 +292,6 @@
     Test for the directoryCreateTemp call.
     """
-    def __init__(self, sDirectory = "", sTemplate = "", sUser = None, sPassword = None, fMode = 0, fSecure = False):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sDirectory = "", sTemplate = "", oCreds = None, fMode = 0, fSecure = False):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sDirectory = sDirectory;
         self.sTemplate = sTemplate;
@@ -307,7 +303,6 @@
     Test for the directoryOpen call.
     """
-    def __init__(self, sDirectory = "", sUser = None, sPassword = None, sFilter = "", fFlags = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sDirectory = "", oCreds = None, sFilter = "", fFlags = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sDirectory = sDirectory;
         self.sFilter = sFilter;
@@ -318,7 +313,6 @@
     Test for the opening, reading and closing a certain directory.
     """
-    def __init__(self, sDirectory = "", sUser = None, sPassword = None,
-                 sFilter = "", fFlags = None):
-        tdTestDirOpen.__init__(self, sDirectory, sUser, sPassword, sFilter, fFlags);
+    def __init__(self, sDirectory = "", oCreds = None, sFilter = "", fFlags = None):
+        tdTestDirOpen.__init__(self, sDirectory, oCreds, sFilter, fFlags);
 
 class tdTestExec(tdTestGuestCtrlBase):
@@ -328,7 +322,6 @@
     """
     def __init__(self, sCmd = "", asArgs = None, aEnv = None, fFlags = None,             # pylint: disable=too-many-arguments
-                 timeoutMS = 5 * 60 * 1000, sUser = None, sPassword = None, sDomain = None, fWaitForExit = True):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain);
+                 timeoutMS = 5 * 60 * 1000, oCreds = None, fWaitForExit = True):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sCmd = sCmd;
         self.asArgs = asArgs if asArgs is not None else [sCmd,];
@@ -347,7 +340,6 @@
     Test for the file exists API call (fileExists).
     """
-    def __init__(self, sFile = "", sUser = None, sPassword = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sFile = "", oCreds = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sFile = sFile;
 
@@ -356,7 +348,6 @@
     Test querying guest file information.
     """
-    def __init__(self, sFile = "", sUser = None, sPassword = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sFile = "", oCreds = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sFile = sFile;
 
@@ -365,7 +356,6 @@
     Removal base.
     """
-    def __init__(self, sPath, fRcExpect = True, sUser = None, sPassword = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds    = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sPath, fRcExpect = True, oCreds = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sPath     = sPath;
         self.fRcExpect = fRcExpect;
@@ -392,6 +382,6 @@
     Remove a single file.
     """
-    def __init__(self, sPath, fRcExpect = True, sUser = None, sPassword = None):
-        tdTestRemoveBase.__init__(self, sPath, fRcExpect, sUser, sPassword);
+    def __init__(self, sPath, fRcExpect = True, oCreds = None):
+        tdTestRemoveBase.__init__(self, sPath, fRcExpect, oCreds);
 
     def execute(self, oSubTstDrv):
@@ -414,6 +404,6 @@
     Remove a single directory if empty.
     """
-    def __init__(self, sPath, fRcExpect = True, sUser = None, sPassword = None):
-        tdTestRemoveBase.__init__(self, sPath, fRcExpect, sUser, sPassword);
+    def __init__(self, sPath, fRcExpect = True, oCreds = None):
+        tdTestRemoveBase.__init__(self, sPath, fRcExpect, oCreds);
 
     def execute(self, oSubTstDrv):
@@ -434,6 +424,6 @@
     Recursively remove a directory tree.
     """
-    def __init__(self, sPath, afFlags = None, fRcExpect = True, fNotExist = False, sUser = None, sPassword = None):
-        tdTestRemoveBase.__init__(self, sPath, fRcExpect, sUser, sPassword);
+    def __init__(self, sPath, afFlags = None, fRcExpect = True, fNotExist = False, oCreds = None):
+        tdTestRemoveBase.__init__(self, sPath, fRcExpect, oCreds = None);
         self.afFlags = afFlags if afFlags is not None else [];
         self.fNotExist = fNotExist; # Hack for the ContentOnly scenario where the dir does not exist.
@@ -479,7 +469,6 @@
     Test querying guest file information.
     """
-    def __init__(self, sFile = "", sUser = None, sPassword = None, cbSize = 0, eFileType = 0):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sFile = "", oCreds = None, cbSize = 0, eFileType = 0):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sFile = sFile;
         self.cbSize = cbSize;
@@ -490,7 +479,6 @@
     Test for the IGuestFile object.
     """
-    def __init__(self, sFile = "", sUser = None, sPassword = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sFile = "", oCreds = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sFile = sFile;
 
@@ -499,7 +487,6 @@
     Test for the file size query API call (fileQuerySize).
     """
-    def __init__(self, sFile = "", sUser = None, sPassword = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None);
+    def __init__(self, sFile = "", oCreds = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sFile = sFile;
 
@@ -509,7 +496,6 @@
     """
     def __init__(self, sFile = "", eAccessMode = None, eAction = None, eSharing = None,
-                 fCreationMode = 0o660, sUser = None, sPassword = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds         = tdCtxCreds(sUser, sPassword, sDomain = None);
+                 fCreationMode = 0o660, oCreds = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sFile          = sFile;
         self.eAccessMode    = eAccessMode if eAccessMode is not None else vboxcon.FileAccessMode_ReadOnly;
@@ -570,6 +556,6 @@
     """
     def __init__(self, sFile = "", eAccessMode = None, eAction = None, eSharing = None,
-                 fCreationMode = 0o660, cbOpenExpected = 0, sUser = None, sPassword = None):
-        tdTestFileOpen.__init__(self, sFile, eAccessMode, eAction, eSharing, fCreationMode, sUser, sPassword);
+                 fCreationMode = 0o660, cbOpenExpected = 0, oCreds = None):
+        tdTestFileOpen.__init__(self, sFile, eAccessMode, eAction, eSharing, fCreationMode, oCreds);
         self.cbOpenExpected = cbOpenExpected;
 
@@ -624,7 +610,7 @@
     """
     def __init__(self, sFile = "", eAccessMode = None, eAction = None, eSharing = None, # pylint: disable=too-many-arguments
-                 fCreationMode = 0o660, atChunks = None, fUseAtApi = False, abContent = None, sUser = None, sPassword = None):
+                 fCreationMode = 0o660, atChunks = None, fUseAtApi = False, abContent = None, oCreds = None):
         tdTestFileOpen.__init__(self, sFile, eAccessMode if eAccessMode is not None else vboxcon.FileAccessMode_WriteOnly,
-                                eAction, eSharing, fCreationMode, sUser, sPassword);
+                                eAction, eSharing, fCreationMode, oCreds);
         assert atChunks is not None;
         self.atChunks  = atChunks   # type: list(tuple(int,bytearray))
@@ -767,6 +753,6 @@
     Opens the file and checks the content using the read API.
     """
-    def __init__(self, sFile = "", eSharing = None, abContent = None, cbContentExpected = None, sUser = None, sPassword = None):
-        tdTestFileOpen.__init__(self, sFile = sFile, eSharing = eSharing, sUser = sUser, sPassword = sPassword);
+    def __init__(self, sFile = "", eSharing = None, abContent = None, cbContentExpected = None, oCreds = None):
+        tdTestFileOpen.__init__(self, sFile = sFile, eSharing = eSharing, oCreds = oCreds);
         self.abContent = abContent  # type: bytearray
         self.cbContentExpected = cbContentExpected;
@@ -818,7 +804,6 @@
     """
     def __init__(self, sUser = None, sPassword = None, sDomain = None, sSessionName = ""):
-        tdTestGuestCtrlBase.__init__(self);
+        tdTestGuestCtrlBase.__init__(self, oCreds = tdCtxCreds(sUser, sPassword, sDomain));
         self.sSessionName = sSessionName;
-        self.oCreds       = tdCtxCreds(sUser, sPassword, sDomain);
 
     def getSessionCount(self, oVBoxMgr):
@@ -1264,8 +1249,6 @@
     Test updating the Guest Additions inside the guest.
     """
-    def __init__(self, sSrc = "", asArgs = None, fFlags = None,
-                 sUser = None, sPassword = None, sDomain = None):
-        tdTestGuestCtrlBase.__init__(self);
-        self.oCreds = tdCtxCreds(sUser, sPassword, sDomain);
+    def __init__(self, sSrc = "", asArgs = None, fFlags = None, oCreds = None):
+        tdTestGuestCtrlBase.__init__(self, oCreds = oCreds);
         self.sSrc = sSrc;
         self.asArgs = asArgs;
