Index: /trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
===================================================================
--- /trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py	(revision 84562)
+++ /trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py	(revision 84563)
@@ -60,4 +60,13 @@
     xrange = range; # pylint: disable=redefined-builtin,invalid-name
 
+def limitString(sString, cLimit = 32):
+    """
+    Returns a string with ellipsis ("...") when exceeding the specified limit.
+    Useful for toning down logging. By default strings will be shortened at 32 characters.
+    """
+    if not isinstance(sString, str):
+        return "";
+    cLen = len(sString);
+    return (sString[:cLimit] + '...[%d more]' % (cLen - cLimit)) if cLen > cLimit else sString;
 
 class GuestStream(bytearray):
@@ -386,5 +395,5 @@
 
     def execute(self, oSubTstDrv):
-        reporter.log2('Deleting file "%s" ...' % (self.sPath,));
+        reporter.log2('Deleting file "%s" ...' % (limitString(self.sPath),));
         try:
             if oSubTstDrv.oTstDrv.fpApiVer >= 5.0:
@@ -409,5 +418,5 @@
     def execute(self, oSubTstDrv):
         _ = oSubTstDrv;
-        reporter.log2('Deleting directory "%s" ...' % (self.sPath,));
+        reporter.log2('Deleting directory "%s" ...' % (limitString(self.sPath),));
         try:
             self.oGuestSession.directoryRemove(self.sPath);
@@ -430,5 +439,5 @@
 
     def execute(self, oSubTstDrv):
-        reporter.log2('Deleting tree "%s" ...' % (self.sPath,));
+        reporter.log2('Deleting tree "%s" ...' % (limitString(self.sPath),));
         try:
             oProgress = self.oGuestSession.directoryRemoveRecursive(self.sPath, self.afFlags);
@@ -1121,5 +1130,5 @@
         """
         reporter.log2('tdStepStat: sPath=%s enmType=%s hrcExpected=%s fFound=%s fFollowLinks=%s'
-                      % (self.sPath, self.enmType, self.hrcExpected, self.fFound, self.fFollowLinks,));
+                      % (limitString(self.sPath), self.enmType, self.hrcExpected, self.fFound, self.fFollowLinks,));
 
         # Don't execute non-file tests on older VBox version.
@@ -1671,5 +1680,5 @@
         # Do the copying.
         #
-        reporter.log2('Copying guest file "%s" to host "%s"' % (oTest.sSrc, oTest.sDst));
+        reporter.log2('Copying guest file "%s" to host "%s"' % (limitString(oTest.sSrc), limitString(oTest.sDst)));
         try:
             if self.oTstDrv.fpApiVer >= 5.0:
@@ -1767,5 +1776,5 @@
         # Do the copying.
         #
-        reporter.log2('Copying guest dir "%s" to host "%s"' % (oTest.sSrc, oTest.sDst));
+        reporter.log2('Copying guest dir "%s" to host "%s"' % (limitString(oTest.sSrc), limitString(oTest.sDst)));
         try:
             oCurProgress = oGuestSession.directoryCopyFromGuest(oTest.sSrc, oTest.sDst, oTest.afFlags);
@@ -1800,5 +1809,5 @@
         Helper function to copy a single file from the host to the guest.
         """
-        reporter.log2('Copying host file "%s" to guest "%s" (flags %s)' % (sSrc, sDst, afFlags));
+        reporter.log2('Copying host file "%s" to guest "%s" (flags %s)' % (limitString(sSrc), limitString(sDst), afFlags));
         try:
             if self.oTstDrv.fpApiVer >= 5.0:
@@ -1828,5 +1837,5 @@
         Helper function to copy a directory tree from the host to the guest.
         """
-        reporter.log2('Copying host directory "%s" to guest "%s" (flags %s)' % (sSrc, sDst, afFlags));
+        reporter.log2('Copying host directory "%s" to guest "%s" (flags %s)' % (limitString(sSrc), limitString(sDst), afFlags));
         try:
             oCurProgress = oGuestSession.directoryCopyToGuest(sSrc, sDst, afFlags);
@@ -1853,5 +1862,5 @@
         Helper function to create a guest directory specified in the current test.
         """
-        reporter.log2('Creating directory "%s"' % (oTest.sDirectory,));
+        reporter.log2('Creating directory "%s"' % (limitString(oTest.sDirectory),));
         try:
             oGuestSession.directoryCreate(oTest.sDirectory, oTest.fMode, oTest.afFlags);
@@ -1892,5 +1901,5 @@
 
         # Open the directory:
-        reporter.log2('Directory="%s", filter="%s", afFlags="%s"' % (sCurDir, sFilter, afFlags));
+        reporter.log2('Directory="%s", filter="%s", afFlags="%s"' % (limitString(sCurDir), sFilter, afFlags));
         try:
             oCurDir = oGuestSession.directoryOpen(sCurDir, sFilter, afFlags);
@@ -1912,5 +1921,5 @@
                     fRc = False;
                 else:
-                    reporter.log2('\tNo more directory entries for "%s"' % (sCurDir,));
+                    reporter.log2('\tNo more directory entries for "%s"' % (limitString(sCurDir),));
                 break;
 
@@ -1927,5 +1936,5 @@
                                          % (sName, eType, vboxcon.FsObjType_Directory));
             elif eType == vboxcon.FsObjType_Directory:
-                reporter.log2('  Directory "%s"' % oFsObjInfo.name);
+                reporter.log2('  Directory "%s"' % limitString(oFsObjInfo.name));
                 aSubResult = self.gctrlReadDirTree(oTest, oGuestSession, fIsError,
                                                    oTestVm.pathJoin(sSubDir, sName) if sSubDir else sName);
@@ -2125,13 +2134,6 @@
         # Start the process:
         #
-        reporter.log2('Executing sCmd=%s, afFlags=%s, timeoutMS=%d, asEnv=%s'
-                      % (oTest.sCmd, oTest.afFlags, oTest.timeoutMS, oTest.aEnv,));
-
-        # Don't be too noisy by default when testing reeeeeeally long arguments.
-        if len(oTest.asArgs) <= 64:
-            reporter.log2('asArgs=%s' % (oTest.asArgs,));
-        else:
-            reporter.log4('asArgs=%s' % (oTest.asArgs,));
-
+        reporter.log2('Executing sCmd=%s, afFlags=%s, timeoutMS=%d, asArgs=%s, asEnv=%s'
+                      % (oTest.sCmd, oTest.afFlags, oTest.timeoutMS, limitString(oTest.asArgs), limitString(oTest.aEnv),));
         try:
             oProcess = oGuestSession.processCreate(oTest.sCmd,
@@ -3450,5 +3452,5 @@
                     reporter.logXcpt('Creating temp directory "%s" failed expectedly, skipping:' % (oCurTest.sDirectory,));
             else:
-                reporter.log2('Temporary directory is: "%s"' % (sDirTemp,));
+                reporter.log2('Temporary directory is: "%s"' % (limitString(sDirTemp),));
                 if not sDirTemp:
                     fRc = reporter.error('Resulting directory is empty!');
@@ -3472,5 +3474,5 @@
                         fRc = reporter.errorXcpt('sDirTemp="%s"' % (sDirTemp,));
                     else:
-                        reporter.log2('%s: eType=%s (dir=%d)' % (sDirTemp, eType, vboxcon.FsObjType_Directory,));
+                        reporter.log2('%s: eType=%s (dir=%d)' % (limitString(sDirTemp), eType, vboxcon.FsObjType_Directory,));
                         if eType != vboxcon.FsObjType_Directory:
                             fRc = reporter.error('Temporary directory "%s" not created as a directory: eType=%d'
@@ -3681,5 +3683,5 @@
                 reporter.log('Deleting the file in "%s" ...' % (self.oTestFiles.oManyDir.sPath,));
                 for oFile in self.oTestFiles.oManyDir.aoChildren:
-                    reporter.log2('"%s"' % (oFile.sPath,));
+                    reporter.log2('"%s"' % (limitString(oFile.sPath),));
                     try:
                         if self.oTstDrv.fpApiVer >= 5.0:
@@ -3795,5 +3797,5 @@
             oFsObj = self.oTestFiles.dPaths[sPath];
             reporter.log2('testGuestCtrlFileStat: %s sPath=%s'
-                          % ('file' if isinstance(oFsObj, testfileset.TestFile) else 'dir ', oFsObj.sPath,));
+                          % ('file' if isinstance(oFsObj, testfileset.TestFile) else 'dir ', limitString(oFsObj.sPath),));
 
             # Query the information:
@@ -4100,5 +4102,5 @@
         #
         for oTestFile in aoExtraFiles + self.oTestFiles.aoFiles: # type: testfileset.TestFile
-            reporter.log2('Test file: %s bytes, "%s" ...' % (oTestFile.cbContent, oTestFile.sPath,));
+            reporter.log2('Test file: %s bytes, "%s" ...' % (oTestFile.cbContent, limitString(oTestFile.sPath),));
 
             #
@@ -4656,5 +4658,6 @@
             oCurTest = tTest[0]; # tdTestCopyTo
             oCurRes  = tTest[1]; # tdTestResult
-            reporter.log('Testing #%d, sSrc=%s, sDst=%s, afFlags=%s ...' % (i, oCurTest.sSrc, oCurTest.sDst, oCurTest.afFlags));
+            reporter.log('Testing #%d, sSrc=%s, sDst=%s, afFlags=%s ...'
+                         % (i, limitString(oCurTest.sSrc), limitString(oCurTest.sDst), oCurTest.afFlags));
 
             oCurTest.setEnvironment(oSession, oTxsSession, oTestVm);
@@ -4831,5 +4834,5 @@
                 reporter.log('Testing #%d, %s: sSrc="%s", sDst="%s", afFlags="%s" ...'
                              % (i, "directory" if isinstance(oCurTest, tdTestCopyFromDir) else "file",
-                                oCurTest.sSrc, oCurTest.sDst, oCurTest.afFlags,));
+                                limitString(oCurTest.sSrc), limitString(oCurTest.sDst), oCurTest.afFlags,));
             else:
                 reporter.log('Testing #%d, tdTestRemoveHostDir "%s"  ...' % (i, oCurTest.sDir,));
