Index: trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp	(revision 90962)
+++ trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp	(revision 90983)
@@ -272,9 +272,9 @@
     PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
 
+    LogRel(("ValKit: Beginning test set '%s'\n", pszTag));
+
     int rc = RTCritSectEnter(&pThis->CritSect);
     if (RT_SUCCESS(rc))
     {
-
-        LogRel(("ValKit: Beginning test set '%s'\n", pszTag));
         rc = AudioTestSetCreate(&pThis->Set, pThis->szPathTemp, pszTag);
 
@@ -294,4 +294,6 @@
 {
     PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
+
+    LogRel(("ValKit: Ending test set '%s'\n", pszTag));
 
     int rc = RTCritSectEnter(&pThis->CritSect);
@@ -309,4 +311,6 @@
                 LogRel(("ValKit: Waiting for runnig test set '%s' to end ...\n", pszTag));
                 rc = RTSemEventWait(pThis->EventSemEnded, RT_MS_30SEC);
+                if (RT_FAILURE(rc))
+                    LogRel(("ValKit: Waiting for runnig test set '%s' failed with %Rrc\n", pszTag, rc));
 
                 int rc2 = RTCritSectEnter(&pThis->CritSect);
@@ -318,5 +322,5 @@
         if (RT_SUCCESS(rc))
         {
-            LogRel(("ValKit: Ending test set '%s'\n", pszTag));
+            LogRel(("ValKit: Closing test set '%s' ...\n", pszTag));
 
             /* Close the test set first. */
@@ -328,5 +332,9 @@
                 rc = AudioTestSetPack(pSet, pThis->szPathOut, pThis->szTestSetArchive, sizeof(pThis->szTestSetArchive));
                 if (RT_SUCCESS(rc))
+                {
                     LogRel(("ValKit: Packed up to '%s'\n", pThis->szTestSetArchive));
+                }
+                else
+                    LogRel(("ValKit: Packing up test set failed with %Rrc\n", rc));
 
                 /* Do some internal housekeeping. */
@@ -339,6 +347,14 @@
 #endif
             }
-
-            AudioTestSetDestroy(pSet);
+            else
+                LogRel(("ValKit: Closing test set failed with %Rrc\n", rc));
+
+            int rc2 = AudioTestSetDestroy(pSet);
+            if (RT_FAILURE(rc2))
+            {
+                LogRel(("ValKit: Destroying test set failed with %Rrc\n", rc));
+                if (RT_SUCCESS(rc))
+                    rc = rc2;
+            }
         }
 
@@ -378,5 +394,5 @@
     if (RT_SUCCESS(rc))
     {
-        LogRel(("ValKit: Registered guest recording test #%RU32 (%RU32ms, %RU64 bytes)\n",
+        LogRel(("ValKit: Registering guest recording test #%RU32 (%RU32ms, %RU64 bytes)\n",
                 pThis->cTestsTotal, pTestData->t.TestTone.Parms.msDuration, pTestData->t.TestTone.u.Rec.cbToWrite));
 
@@ -416,5 +432,5 @@
     if (RT_SUCCESS(rc))
     {
-        LogRel(("ValKit: Registered guest playback test #%RU32 (%RU32ms, %RU64 bytes)\n",
+        LogRel(("ValKit: Registering guest playback test #%RU32 (%RU32ms, %RU64 bytes)\n",
                 pThis->cTestsTotal, pTestData->t.TestTone.Parms.msDuration, pTestData->t.TestTone.u.Play.cbToRead));
 
@@ -435,6 +451,4 @@
 static DECLCALLBACK(int) drvHostValKitTestSetSendBeginCallback(void const *pvUser, const char *pszTag)
 {
-    RT_NOREF(pszTag);
-
     PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
 
@@ -462,5 +476,5 @@
 
     if (RT_FAILURE(rc))
-        LogRel(("ValKit: Beginning to send test set failed with %Rrc\n", rc));
+        LogRel(("ValKit: Beginning to send test set '%s' failed with %Rrc\n", pszTag, rc));
 
     return rc;
@@ -471,6 +485,4 @@
                                                               const char *pszTag, void *pvBuf, size_t cbBuf, size_t *pcbRead)
 {
-    RT_NOREF(pszTag);
-
     PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
 
@@ -480,5 +492,5 @@
         if (RTFileIsValid(pThis->hTestSetArchive))
         {
-            rc =  RTFileRead(pThis->hTestSetArchive, pvBuf, cbBuf, pcbRead);
+            rc = RTFileRead(pThis->hTestSetArchive, pvBuf, cbBuf, pcbRead);
         }
         else
@@ -491,5 +503,5 @@
 
     if (RT_FAILURE(rc))
-        LogRel(("ValKit: Reading from test set failed with %Rrc\n", rc));
+        LogRel(("ValKit: Reading from test set '%s' failed with %Rrc\n", pszTag, rc));
 
     return rc;
@@ -499,6 +511,4 @@
 static DECLCALLBACK(int) drvHostValKitTestSetSendEndCallback(void const *pvUser, const char *pszTag)
 {
-    RT_NOREF(pszTag);
-
     PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
 
@@ -519,5 +529,5 @@
 
     if (RT_FAILURE(rc))
-        LogRel(("ValKit: Ending to send test set failed with %Rrc\n", rc));
+        LogRel(("ValKit: Ending to send test set '%s' failed with %Rrc\n", pszTag, rc));
 
     return rc;
