Index: /trunk/src/VBox/ValidationKit/tests/api/tdMoveVM1.py
===================================================================
--- /trunk/src/VBox/ValidationKit/tests/api/tdMoveVM1.py	(revision 78459)
+++ /trunk/src/VBox/ValidationKit/tests/api/tdMoveVM1.py	(revision 78460)
@@ -81,5 +81,5 @@
         """
         reporter.log('ValidationKit folder is "%s"' % (g_ksValidationKitDir,))
-        return  self.testVMMove()
+        return self.testVMMove()
 
     #
@@ -244,8 +244,16 @@
         return self.oTstDrv.fpApiVer >= 5.3;
 
+    @staticmethod
+    def __safeListDir(sDir):
+        """ Wrapper around os.listdir that returns empty array instead of exceptions. """
+        try:
+            return os.listdir(sDir);
+        except:
+            return [];
+
     def __getStatesFiles(self, oMachine, fPrint = False):
         asStateFilesList = set()
         sFolder = oMachine.snapshotFolder
-        for sFile in os.listdir(sFolder):
+        for sFile in self.__safeListDir(sFolder):
             if sFile.endswith(".sav"):
                 sFullPath = os.path.join(sFolder, sFile)
@@ -258,5 +266,5 @@
         asSnapshotsFilesList = set()
         sFolder = oMachine.snapshotFolder
-        for sFile in os.listdir(sFolder):
+        for sFile in self.__safeListDir(sFolder):
             if sFile.endswith(".sav") is False:
                 sFullPath = os.path.join(sFolder, sFile)
@@ -269,5 +277,5 @@
         asLogFilesList = set()
         sFolder = oMachine.logFolder
-        for sFile in os.listdir(sFolder):
+        for sFile in self.__safeListDir(sFolder):
             if sFile.endswith(".log"):
                 sFullPath = os.path.join(sFolder, sFile)
@@ -354,5 +362,5 @@
         fRes = oSession.saveSettings()
         if fRes is False:
-            reporter.log('3d scenario: Couldn\'t save machine settings')
+            reporter.log('3rd scenario: Couldn\'t save machine settings')
 
         return fRc
@@ -587,5 +595,7 @@
         # 7. There are shareable disk and immutable disk attached to the VM.
 
-        try:
+        try: ## @todo r=bird: Would be nice to use sub-tests here for each scenario, however
+             ##               this try/catch as well as lots of return points makes that very hard.
+             ##               Big try/catch stuff like this should be avoided.
             # Create test machine.
             oMachine = self.createTestMachine()
@@ -614,4 +624,5 @@
             # In this case only VM setting file should be moved (.vbox file)
             #
+            reporter.log("Scenario #1:");
             for s in self.asImagesNames:
                 reporter.log('"%s"' % (s,))
@@ -642,6 +653,7 @@
             # There are no any snapshots and logs.
             #
+            reporter.log("Scenario #2:");
             sOldLoc = sNewLoc + oMachine.name + os.sep
-            sNewLoc = os.path.join(sOrigLoc, 'moveFolder_2d_scenario')
+            sNewLoc = os.path.join(sOrigLoc, 'moveFolder_2nd_scenario')
             os.mkdir(sNewLoc, 0o775)
 
@@ -655,6 +667,7 @@
             # There are snapshots.
             #
+            reporter.log("Scenario #3:");
             sOldLoc = sNewLoc + oMachine.name + os.sep
-            sNewLoc = os.path.join(sOrigLoc, 'moveFolder_3d_scenario')
+            sNewLoc = os.path.join(sOrigLoc, 'moveFolder_3rd_scenario')
             os.mkdir(sNewLoc, 0o775)
 
@@ -671,4 +684,5 @@
             # And next move VM
             #
+            reporter.log("Scenario #4:");
             sOldLoc = sNewLoc + oMachine.name + os.sep
             sNewLoc = os.path.join(sOrigLoc, 'moveFolder_4th_scenario')
@@ -692,4 +706,5 @@
             # Prerequisites - there is IDE Controller and there are no any images attached to it.
             #
+            reporter.log("Scenario #5:");
             sOldLoc = sNewLoc + os.sep + oMachine.name
             sNewLoc = os.path.join(sOrigLoc, 'moveFolder_5th_scenario')
@@ -705,4 +720,5 @@
             # Prerequisites - there is Floppy Controller and there are no any images attached to it.
             #
+            reporter.log("Scenario #6:");
             sOldLoc = sNewLoc + os.sep + oMachine.name
             sNewLoc = os.path.join(sOrigLoc, 'moveFolder_6th_scenario')
@@ -712,12 +728,13 @@
                 return reporter.testDone()[1] == 0
 
-#           #
-#           # 7. case:
-#           #
-#           # There are shareable disk and immutable disk attached to the VM.
-#           #
-#           fRc = fRc and oSession.saveSettings()
-#           if fRc is False:
-#               reporter.log('Couldn\'t save machine settings')
+#            #
+#            # 7. case:
+#            #
+#            # There are shareable disk and immutable disk attached to the VM.
+#            #
+#            reporter.log("Scenario #7:");
+#            fRc = fRc and oSession.saveSettings()
+#            if fRc is False:
+#                reporter.log('Couldn\'t save machine settings')
 #
 
