Index: /trunk/src/VBox/Devices/Audio/AudioTest.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/AudioTest.cpp	(revision 92395)
+++ /trunk/src/VBox/Devices/Audio/AudioTest.cpp	(revision 92396)
@@ -2411,8 +2411,9 @@
  * @returns VBox status code.
  * @param   pBeacon             Audio test beacon to (re-)initialize.
+ * @param   uTest               Test number to set beacon to.
  * @param   enmType             Beacon type to set.
  * @param   pProps              PCM properties to use for producing audio beacon data.
  */
-void AudioTestBeaconInit(PAUDIOTESTTONEBEACON pBeacon, AUDIOTESTTONEBEACONTYPE enmType, PPDMAUDIOPCMPROPS pProps)
+void AudioTestBeaconInit(PAUDIOTESTTONEBEACON pBeacon, uint8_t uTest, AUDIOTESTTONEBEACONTYPE enmType, PPDMAUDIOPCMPROPS pProps)
 {
     AssertReturnVoid(PDMAudioPropsFrameSize(pProps) == 4); /** @todo Make this more dynamic. */
@@ -2420,4 +2421,5 @@
     RT_BZERO(pBeacon, sizeof(AUDIOTESTTONEBEACON));
 
+    pBeacon->uTest   = uTest;
     pBeacon->enmType = enmType;
     memcpy(&pBeacon->Props, pProps, sizeof(PDMAUDIOPCMPROPS));
@@ -2430,14 +2432,15 @@
  *
  * @returns Beacon byte if found, 0 otherwise.
+ * @param   uTest               Test number to get beacon byte for.
  * @param   enmType             Beacon type to get beacon byte for.
  */
-DECLINLINE(uint8_t) AudioTestBeaconByteFromType(AUDIOTESTTONEBEACONTYPE enmType)
+DECLINLINE(uint8_t) AudioTestBeaconByteFromType(uint8_t uTest, AUDIOTESTTONEBEACONTYPE enmType)
 {
     switch (enmType)
     {
-        case AUDIOTESTTONEBEACONTYPE_PLAY_PRE:  return AUDIOTEST_BEACON_BYTE_PLAY_PRE;
-        case AUDIOTESTTONEBEACONTYPE_PLAY_POST: return AUDIOTEST_BEACON_BYTE_PLAY_POST;
-        case AUDIOTESTTONEBEACONTYPE_REC_PRE:   return AUDIOTEST_BEACON_BYTE_REC_PRE;
-        case AUDIOTESTTONEBEACONTYPE_REC_POST:  return AUDIOTEST_BEACON_BYTE_REC_POST;
+        case AUDIOTESTTONEBEACONTYPE_PLAY_PRE:  return AUDIOTEST_BEACON_MAKE_PRE(uTest);
+        case AUDIOTESTTONEBEACONTYPE_PLAY_POST: return AUDIOTEST_BEACON_MAKE_POST(uTest);
+        case AUDIOTESTTONEBEACONTYPE_REC_PRE:   return AUDIOTEST_BEACON_MAKE_PRE(uTest);
+        case AUDIOTESTTONEBEACONTYPE_REC_POST:  return AUDIOTEST_BEACON_MAKE_POST(uTest);
         default:                                break;
     }
@@ -2503,5 +2506,5 @@
     AssertReturn(pBeacon->cbUsed + cbBuf <= pBeacon->cbSize, VERR_BUFFER_OVERFLOW);
 
-    memset(pvBuf, AudioTestBeaconByteFromType(pBeacon->enmType), cbBuf);
+    memset(pvBuf, AudioTestBeaconByteFromType(pBeacon->uTest, pBeacon->enmType), cbBuf);
 
     pBeacon->cbUsed += cbBuf;
@@ -2552,5 +2555,5 @@
     uint32_t const cbFrameSize = PDMAudioPropsFrameSize(&pBeacon->Props); /* Use the audio frame size as chunk size. */
 
-    uint8_t  const byBeacon      = AudioTestBeaconByteFromType(pBeacon->enmType);
+    uint8_t  const byBeacon      = AudioTestBeaconByteFromType(pBeacon->uTest, pBeacon->enmType);
     unsigned const cbStep        = cbFrameSize;
 
@@ -2624,5 +2627,5 @@
 
     AUDIOTESTTONEBEACON Beacon;
-    AudioTestBeaconInit(&Beacon,
+    AudioTestBeaconInit(&Beacon, pVerJob->idxTest,
                           fIn
                         ? (fPre ? AUDIOTESTTONEBEACONTYPE_PLAY_PRE : AUDIOTESTTONEBEACONTYPE_PLAY_POST)
Index: /trunk/src/VBox/Devices/Audio/AudioTest.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/AudioTest.h	(revision 92395)
+++ /trunk/src/VBox/Devices/Audio/AudioTest.h	(revision 92396)
@@ -32,12 +32,23 @@
 /** Prefix for audio test (set) directories. */
 #define AUDIOTEST_PATH_PREFIX_STR       "vkat"
-/** Audio beacon data (single byte) to use for the playback pre beacon (intro). */
-#define AUDIOTEST_BEACON_BYTE_PLAY_PRE  0x42
-/** Audio beacon data (single byte) to use for the playback post beacon (outro). */
-#define AUDIOTEST_BEACON_BYTE_PLAY_POST 0x24
-/** Audio beacon data (single byte) to use for the recording pre beacon (intro). */
-#define AUDIOTEST_BEACON_BYTE_REC_PRE   0x75
-/** Audio beacon data (single byte) to use for the recording post beacon (outro). */
-#define AUDIOTEST_BEACON_BYTE_REC_POST  0x57
+/** Maximum tests a beacon can have.
+ *  Maximum number of tests is 240 (so it can fit into 8-bit mono channels). */
+#define AUDIOTEST_BEACON_TESTS_MAX      240
+/** Returns a pre-beacon for a given test number.
+ *  Maximum number of tests is 240 (so it can fit into 8-bit mono channels).
+ *
+ *  That way it's easy to visually inspect beacon data in a hex editor --
+ *  e.g. for test #5 a pre-beacon would be 0x5A + post-beacon 0x5B. */
+#define AUDIOTEST_BEACON_MAKE_PRE(a_TstNum) \
+    (  (uint8_t)((a_TstNum) & 0xf) << 4 \
+     | (uint8_t)(0xA))
+/** Returns a post-beacon for a given test number.
+ *  Maximum number of tests is 250 (so it can fit into 8-bit mono channels).
+ *
+ *  That way it's easy to visually inspect beacon data in a hex editor --
+ *  e.g. for test #2 a pre-beacon would be 0x2A + post-beacon 0x2B. */
+#define AUDIOTEST_BEACON_MAKE_POST(a_TstNum) \
+    (  (uint8_t)((a_TstNum) & 0xf) << 4 \
+     | (uint8_t)(0xB))
 /** Pre / post audio beacon size (in audio frames). */
 #define AUDIOTEST_BEACON_SIZE_FRAMES    1024
@@ -86,8 +97,7 @@
 typedef struct AUDIOTESTPARMSHDR
 {
-    /** Index in some defined sequence this test has. Can be freely used / assigned
-     *  and depends on the actual implementation.
+    /** Test index these test parameters belong to.
      *  Set to UINT32_MAX if not being used. */
-    uint32_t idxSeq;
+    uint32_t idxTest;
     /** Time of the caller when this test was being created. */
     RTTIME   tsCreated;
@@ -147,4 +157,6 @@
 typedef struct AUDIOTESTTONEBEACON
 {
+    /** Test number this beacon is for. */
+    uint8_t                 uTest;
     /** The beacon type. */
     AUDIOTESTTONEBEACONTYPE enmType;
@@ -200,8 +212,4 @@
 typedef struct AUDIOTESTPARMS
 {
-    /** Specifies the current test iteration. */
-    uint32_t                idxCurrent;
-    /** How many iterations the test should be executed. */
-    uint32_t                cIterations;
     /** Audio device to use. */
     PDMAUDIOHOSTDEV         Dev;
@@ -377,5 +385,5 @@
 int    AudioTestToneGenerate(PAUDIOTESTTONE pTone, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten);
 
-void   AudioTestBeaconInit(PAUDIOTESTTONEBEACON pBeacon, AUDIOTESTTONEBEACONTYPE enmType, PPDMAUDIOPCMPROPS pProps);
+void   AudioTestBeaconInit(PAUDIOTESTTONEBEACON pBeacon,  uint8_t uTest, AUDIOTESTTONEBEACONTYPE enmType, PPDMAUDIOPCMPROPS pProps);
 int    AudioTestBeaconAddConsecutive(PAUDIOTESTTONEBEACON pBeacon, const uint8_t *auBuf, size_t cbBuf, size_t *pOff);
 int    AudioTestBeaconWrite(PAUDIOTESTTONEBEACON pBeacon, void *pvBuf, uint32_t cbBuf);
Index: /trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp	(revision 92395)
+++ /trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp	(revision 92396)
@@ -157,6 +157,4 @@
     /** Number of total tests in \a lstTestsRec and \a lstTestsPlay. */
     uint32_t            cTestsTotal;
-    /** Increasing number to identify tests. */
-    uint32_t            idxTest;
     /** Number of tests in \a lstTestsRec. */
     uint32_t            cTestsRec;
@@ -503,24 +501,24 @@
     PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
 
-    PVALKITTESTDATA pTestData = (PVALKITTESTDATA)RTMemAllocZ(sizeof(VALKITTESTDATA));
-    AssertPtrReturn(pTestData, VERR_NO_MEMORY);
-
-    pTestData->enmState = AUDIOTESTSTATE_INIT;
-
-    memcpy(&pTestData->t.TestTone.Parms, pToneParms, sizeof(AUDIOTESTTONEPARMS));
-
-    PPDMAUDIOPCMPROPS const pProps = &pTestData->t.TestTone.Parms.Props;
-
-    AssertReturn(pTestData->t.TestTone.Parms.msDuration, VERR_INVALID_PARAMETER);
+    PVALKITTESTDATA pTst = (PVALKITTESTDATA)RTMemAllocZ(sizeof(VALKITTESTDATA));
+    AssertPtrReturn(pTst, VERR_NO_MEMORY);
+
+    pTst->enmState = AUDIOTESTSTATE_INIT;
+
+    memcpy(&pTst->t.TestTone.Parms, pToneParms, sizeof(AUDIOTESTTONEPARMS));
+
+    PPDMAUDIOPCMPROPS const pProps = &pTst->t.TestTone.Parms.Props;
+
+    AssertReturn(pTst->t.TestTone.Parms.msDuration, VERR_INVALID_PARAMETER);
     AssertReturn(PDMAudioPropsAreValid(pProps), VERR_INVALID_PARAMETER);
 
-    AudioTestToneInit(&pTestData->t.TestTone.Tone, pProps, pTestData->t.TestTone.Parms.dbFreqHz);
-
-    pTestData->t.TestTone.u.Rec.cbToWrite = PDMAudioPropsMilliToBytes(pProps,
-                                                                      pTestData->t.TestTone.Parms.msDuration);
+    AudioTestToneInit(&pTst->t.TestTone.Tone, pProps, pTst->t.TestTone.Parms.dbFreqHz);
+
+    pTst->t.TestTone.u.Rec.cbToWrite = PDMAudioPropsMilliToBytes(pProps,
+                                                                      pTst->t.TestTone.Parms.msDuration);
 
     /* We inject a pre + post beacon before + after the actual test tone.
      * We always start with the pre beacon. */
-    AudioTestBeaconInit(&pTestData->t.TestTone.Beacon, AUDIOTESTTONEBEACONTYPE_PLAY_PRE, pProps);
+    AudioTestBeaconInit(&pTst->t.TestTone.Beacon, pToneParms->Hdr.idxTest, AUDIOTESTTONEBEACONTYPE_PLAY_PRE, pProps);
 
     int rc = RTCritSectEnter(&pThis->CritSect);
@@ -528,16 +526,16 @@
     {
         LogRel(("ValKit: Registering guest recording test #%RU32 (%RU32ms, %RU64 bytes, host test #%RU32)\n",
-                pThis->idxTest, pTestData->t.TestTone.Parms.msDuration, pTestData->t.TestTone.u.Rec.cbToWrite,
-                pToneParms->Hdr.idxSeq));
-
-        const uint32_t cbBeacon = AudioTestBeaconGetSize(&pTestData->t.TestTone.Beacon);
+                pThis->cTestsRec, pTst->t.TestTone.Parms.msDuration, pTst->t.TestTone.u.Rec.cbToWrite,
+                pToneParms->Hdr.idxTest));
+
+        const uint32_t cbBeacon = AudioTestBeaconGetSize(&pTst->t.TestTone.Beacon);
         if (cbBeacon)
             LogRel2(("ValKit: Guest recording test #%RU32 includes 2 x %RU32 bytes of pre/post beacons\n",
-                     pThis->idxTest, cbBeacon));
-
-        RTListAppend(&pThis->lstTestsRec, &pTestData->Node);
-
-        pTestData->msRegisteredTS = RTTimeMilliTS();
-        pTestData->idxTest        = pThis->idxTest++;
+                     pThis->cTestsRec, cbBeacon));
+
+        RTListAppend(&pThis->lstTestsRec, &pTst->Node);
+
+        pTst->msRegisteredTS = RTTimeMilliTS();
+        pTst->idxTest        = pToneParms->Hdr.idxTest; /* Use the test ID from the host (so that the beacon IDs match). */
 
         pThis->cTestsRec++;
@@ -560,22 +558,22 @@
     PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
 
-    PVALKITTESTDATA pTestData = (PVALKITTESTDATA)RTMemAllocZ(sizeof(VALKITTESTDATA));
-    AssertPtrReturn(pTestData, VERR_NO_MEMORY);
-
-    pTestData->enmState = AUDIOTESTSTATE_INIT;
-
-    memcpy(&pTestData->t.TestTone.Parms, pToneParms, sizeof(AUDIOTESTTONEPARMS));
-
-    PPDMAUDIOPCMPROPS const pProps = &pTestData->t.TestTone.Parms.Props;
-
-    AssertReturn(pTestData->t.TestTone.Parms.msDuration, VERR_INVALID_PARAMETER);
+    PVALKITTESTDATA pTst = (PVALKITTESTDATA)RTMemAllocZ(sizeof(VALKITTESTDATA));
+    AssertPtrReturn(pTst, VERR_NO_MEMORY);
+
+    pTst->enmState = AUDIOTESTSTATE_INIT;
+
+    memcpy(&pTst->t.TestTone.Parms, pToneParms, sizeof(AUDIOTESTTONEPARMS));
+
+    PPDMAUDIOPCMPROPS const pProps = &pTst->t.TestTone.Parms.Props;
+
+    AssertReturn(pTst->t.TestTone.Parms.msDuration, VERR_INVALID_PARAMETER);
     AssertReturn(PDMAudioPropsAreValid(pProps), VERR_INVALID_PARAMETER);
 
-    pTestData->t.TestTone.u.Play.cbToRead  = PDMAudioPropsMilliToBytes(pProps,
-                                                                       pTestData->t.TestTone.Parms.msDuration);
+    pTst->t.TestTone.u.Play.cbToRead  = PDMAudioPropsMilliToBytes(pProps,
+                                                                       pTst->t.TestTone.Parms.msDuration);
 
     /* We play a pre + post beacon before + after the actual test tone.
      * We always start with the pre beacon. */
-    AudioTestBeaconInit(&pTestData->t.TestTone.Beacon, AUDIOTESTTONEBEACONTYPE_PLAY_PRE, pProps);
+    AudioTestBeaconInit(&pTst->t.TestTone.Beacon, pToneParms->Hdr.idxTest, AUDIOTESTTONEBEACONTYPE_PLAY_PRE, pProps);
 
     int rc = RTCritSectEnter(&pThis->CritSect);
@@ -583,16 +581,16 @@
     {
         LogRel(("ValKit: Registering guest playback test #%RU32 (%RU32ms, %RU64 bytes, host test #%RU32)\n",
-                pThis->idxTest, pTestData->t.TestTone.Parms.msDuration, pTestData->t.TestTone.u.Play.cbToRead,
-                pToneParms->Hdr.idxSeq));
-
-        const uint32_t cbBeacon = AudioTestBeaconGetSize(&pTestData->t.TestTone.Beacon);
+                pThis->cTestsPlay, pTst->t.TestTone.Parms.msDuration, pTst->t.TestTone.u.Play.cbToRead,
+                pToneParms->Hdr.idxTest));
+
+        const uint32_t cbBeacon = AudioTestBeaconGetSize(&pTst->t.TestTone.Beacon);
         if (cbBeacon)
             LogRel2(("ValKit: Guest playback test #%RU32 includes 2 x %RU32 bytes of pre/post beacons\n",
-                     pThis->idxTest, cbBeacon));
-
-        RTListAppend(&pThis->lstTestsPlay, &pTestData->Node);
-
-        pTestData->msRegisteredTS = RTTimeMilliTS();
-        pTestData->idxTest        = pThis->idxTest++;
+                     pThis->cTestsPlay, cbBeacon));
+
+        RTListAppend(&pThis->lstTestsPlay, &pTst->Node);
+
+        pTst->msRegisteredTS = RTTimeMilliTS();
+        pTst->idxTest        = pToneParms->Hdr.idxTest; /* Use the test ID from the host (so that the beacon IDs match). */
 
         pThis->cTestsTotal++;
@@ -876,5 +874,5 @@
                     pTst->idxTest, (uint16_t)pTst->t.TestTone.Tone.rdFreqHz,
                     pTst->t.TestTone.Parms.msDuration, pTst->t.TestTone.u.Rec.cbToWrite,
-                    Parms.TestTone.Hdr.idxSeq, RTTimeMilliTS() - pTst->msRegisteredTS));
+                    Parms.TestTone.Hdr.idxTest, RTTimeMilliTS() - pTst->msRegisteredTS));
 
             char szTimeCreated[RTTIME_STR_LEN];
@@ -1081,5 +1079,5 @@
             LogRel(("ValKit: Test #%RU32: Recording audio data (%RU16Hz, %RU32ms) for host test #%RU32 started (delay is %RU32ms)\n",
                     pTst->idxTest, (uint16_t)Parms.TestTone.dbFreqHz, Parms.TestTone.msDuration,
-                    Parms.TestTone.Hdr.idxSeq, RTTimeMilliTS() - pTst->msRegisteredTS));
+                    Parms.TestTone.Hdr.idxTest, RTTimeMilliTS() - pTst->msRegisteredTS));
 
             char szTimeCreated[RTTIME_STR_LEN];
@@ -1182,5 +1180,6 @@
 
                     /* Re-use the beacon object, but this time it's the post beacon. */
-                    AudioTestBeaconInit(&pTst->t.TestTone.Beacon, AUDIOTESTTONEBEACONTYPE_PLAY_POST, &pTst->t.TestTone.Parms.Props);
+                    AudioTestBeaconInit(&pTst->t.TestTone.Beacon, pTst->idxTest, AUDIOTESTTONEBEACONTYPE_PLAY_POST,
+                                        &pTst->t.TestTone.Parms.Props);
                 }
                 break;
@@ -1373,6 +1372,9 @@
 
                 pTst->enmState = AUDIOTESTSTATE_POST;
+
                 /* Re-use the beacon object, but this time it's the post beacon. */
-                AudioTestBeaconInit(&pTst->t.TestTone.Beacon, AUDIOTESTTONEBEACONTYPE_PLAY_POST, &pTst->t.TestTone.Parms.Props);
+                AudioTestBeaconInit(&pTst->t.TestTone.Beacon, pTst->idxTest, AUDIOTESTTONEBEACONTYPE_PLAY_POST,
+                                    &pTst->t.TestTone.Parms.Props);
+
                 pStrmValKit->cbAvail += AudioTestBeaconGetSize(&pTst->t.TestTone.Beacon);
             }
Index: /trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
===================================================================
--- /trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp	(revision 92395)
+++ /trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp	(revision 92396)
@@ -282,9 +282,9 @@
     pTstParmsAcq->enmType     = AUDIOTESTTYPE_TESTTONE_PLAY;
     pTstParmsAcq->enmDir      = PDMAUDIODIR_OUT;
-    pTstParmsAcq->cIterations = pTstEnv->cIterations == 0 ? RTRandU32Ex(1, 10) : pTstEnv->cIterations;
-    pTstParmsAcq->idxCurrent  = 0;
 
     pTstParmsAcq->TestTone    = pTstEnv->ToneParms;
 
+    pTstParmsAcq->TestTone.Hdr.idxTest = pTstEnv->idxTest; /* Assign unique test ID. */
+
     return rc;
 }
@@ -299,54 +299,49 @@
     int rc = VINF_SUCCESS;
 
-    for (uint32_t i = 0; i < pTstParms->cIterations; i++)
-    {
-        PAUDIOTESTTONEPARMS const pToneParms = &pTstParms->TestTone;
-
-        pToneParms->Hdr.idxSeq = i;
-        RTTIMESPEC NowTimeSpec;
-        RTTimeExplode(&pToneParms->Hdr.tsCreated, RTTimeNow(&NowTimeSpec));
-
-        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32 (%RU32/%RU32): Playing test tone (%RU16Hz, %RU32ms)\n",
-                     pTstParms->idxCurrent, i + 1, pTstParms->cIterations, (uint16_t)pToneParms->dbFreqHz, pToneParms->msDuration);
+    PAUDIOTESTTONEPARMS const pToneParms = &pTstParms->TestTone;
+
+    uint32_t const idxTest = pToneParms->Hdr.idxTest;
+
+    RTTIMESPEC NowTimeSpec;
+    RTTimeExplode(&pToneParms->Hdr.tsCreated, RTTimeNow(&NowTimeSpec));
+
+    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32: Playing test tone (%RU16Hz, %RU32ms)\n",
+                 idxTest, (uint16_t)pToneParms->dbFreqHz, pToneParms->msDuration);
+
+    /*
+     * 1. Arm the (host) ValKit ATS with the recording parameters.
+     */
+    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS,
+                 "Test #%RU32: Telling ValKit audio driver on host to record new tone ...\n", idxTest);
+
+    rc = AudioTestSvcClientToneRecord(&pTstEnv->u.Host.AtsClValKit, pToneParms);
+    if (RT_SUCCESS(rc))
+    {
+        /* Give the Validaiton Kit audio driver on the host a bit of time to register / arming the new test. */
+        RTThreadSleep(5000); /* Fudge factor. */
 
         /*
-         * 1. Arm the (host) ValKit ATS with the recording parameters.
+         * 2. Tell VKAT on guest  to start playback.
          */
-        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Telling ValKit audio driver on host to record new tone ...\n");
-        rc = AudioTestSvcClientToneRecord(&pTstEnv->u.Host.AtsClValKit, pToneParms);
-        if (RT_SUCCESS(rc))
-        {
-            /* Give the Validaiton Kit audio driver on the host a bit of time to register / arming the new test. */
-            RTThreadSleep(5000); /* Fudge factor. */
-
-            /*
-             * 2. Tell VKAT on guest  to start playback.
-             */
-            RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Telling VKAT on guest to play tone ...\n");
-            rc = AudioTestSvcClientTonePlay(&pTstEnv->u.Host.AtsClGuest, pToneParms);
-            if (RT_FAILURE(rc))
-                RTTestFailed(g_hTest, "Test #%RU32 (%RU32/%RU32): AudioTestSvcClientTonePlay() failed with %Rrc\n",
-                             pTstParms->idxCurrent, i + 1, pTstParms->cIterations, rc);
-        }
-        else
-            RTTestFailed(g_hTest, "Test #%RU32 (%RU32/%RU32): AudioTestSvcClientToneRecord() failed with %Rrc\n",
-                         pTstParms->idxCurrent, i + 1, pTstParms->cIterations, rc);
-
-        if (RT_SUCCESS(rc))
-        {
-            RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Playing tone done\n");
-
-            /* Give the audio stack a random amount of time for draining data before the next iteration. */
-            if (pTstParms->cIterations > 1)
-                RTThreadSleep(RTRandU32Ex(2000, 5000)); /** @todo Implement some dedicated ATS command for this? */
-        }
-
+        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32: Telling VKAT on guest to play tone ...\n", idxTest);
+
+        rc = AudioTestSvcClientTonePlay(&pTstEnv->u.Host.AtsClGuest, pToneParms);
         if (RT_FAILURE(rc))
-        {
-            RTTestFailed(g_hTest, "Test #%RU32 (%RU32/%RU32): Playing test tone failed with %Rrc\n",
-                         pTstParms->idxCurrent, i + 1, pTstParms->cIterations, rc);
-            break; /* Not worth retrying, bail out. */
-        }
-    }
+            RTTestFailed(g_hTest, "Test #%RU32: AudioTestSvcClientTonePlay() failed with %Rrc\n", idxTest, rc);
+    }
+    else
+        RTTestFailed(g_hTest, "Test #%RU32: AudioTestSvcClientToneRecord() failed with %Rrc\n", idxTest, rc);
+
+    if (RT_SUCCESS(rc))
+    {
+        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32: Playing tone done\n", idxTest);
+
+        /* Give the audio stack a random amount of time for draining data before the next iteration. */
+        if (pTstEnv->cIterations > 1)
+            RTThreadSleep(RTRandU32Ex(2000, 5000)); /** @todo Implement some dedicated ATS command for this? */
+    }
+
+    if (RT_FAILURE(rc))
+        RTTestFailed(g_hTest, "Test #%RU32: Playing test tone failed with %Rrc\n", idxTest, rc);
 
     return rc;
@@ -381,9 +376,9 @@
     pTstParmsAcq->enmType     = AUDIOTESTTYPE_TESTTONE_RECORD;
     pTstParmsAcq->enmDir      = PDMAUDIODIR_IN;
-    pTstParmsAcq->cIterations = pTstEnv->cIterations == 0 ? RTRandU32Ex(1, 10) : pTstEnv->cIterations;
-    pTstParmsAcq->idxCurrent  = 0;
 
     pTstParmsAcq->TestTone    = pTstEnv->ToneParms;
 
+    pTstParmsAcq->TestTone.Hdr.idxTest = pTstEnv->idxTest; /* Assign unique test ID. */
+
     return rc;
 }
@@ -398,49 +393,44 @@
     int rc = VINF_SUCCESS;
 
-    for (uint32_t i = 0; i < pTstParms->cIterations; i++)
-    {
-        PAUDIOTESTTONEPARMS const pToneParms = &pTstParms->TestTone;
-
-        pToneParms->Hdr.idxSeq = i;
-        RTTIMESPEC NowTimeSpec;
-        RTTimeExplode(&pToneParms->Hdr.tsCreated, RTTimeNow(&NowTimeSpec));
-
-        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32 (%RU32/%RU32): Recording test tone (%RU16Hz, %RU32ms)\n",
-                     pTstParms->idxCurrent, i + 1, pTstParms->cIterations, (uint16_t)pToneParms->dbFreqHz, pToneParms->msDuration);
-
+    PAUDIOTESTTONEPARMS const pToneParms = &pTstParms->TestTone;
+
+    uint32_t const idxTest = pToneParms->Hdr.idxTest;
+
+    RTTIMESPEC NowTimeSpec;
+    RTTimeExplode(&pToneParms->Hdr.tsCreated, RTTimeNow(&NowTimeSpec));
+
+    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32: Recording test tone (%RU16Hz, %RU32ms)\n",
+                 idxTest, (uint16_t)pToneParms->dbFreqHz, pToneParms->msDuration);
+
+    /*
+     * 1. Arm the (host) ValKit ATS with the playback parameters.
+     */
+    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS,
+                 "Test #%RU32: Telling ValKit audio driver on host to inject recording data ...\n", idxTest);
+
+    rc = AudioTestSvcClientTonePlay(&pTstEnv->u.Host.AtsClValKit, &pTstParms->TestTone);
+    if (RT_SUCCESS(rc))
+    {
         /*
-         * 1. Arm the (host) ValKit ATS with the playback parameters.
+         * 2. Tell the guest ATS to start recording.
          */
-        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Telling ValKit audio driver on host to inject recording data ...\n");
-        rc = AudioTestSvcClientTonePlay(&pTstEnv->u.Host.AtsClValKit, &pTstParms->TestTone);
-        if (RT_SUCCESS(rc))
-        {
-            /*
-             * 2. Tell the guest ATS to start recording.
-             */
-            RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Telling VKAT on guest to record audio ...\n");
-            rc = AudioTestSvcClientToneRecord(&pTstEnv->u.Host.AtsClGuest, &pTstParms->TestTone);
-            if (RT_FAILURE(rc))
-                RTTestFailed(g_hTest, "Test #%RU32 (%RU32/%RU32): AudioTestSvcClientToneRecord() failed with %Rrc\n",
-                             pTstParms->idxCurrent, i + 1, pTstParms->cIterations, rc);
-        }
-        else
-            RTTestFailed(g_hTest, "Test #%RU32 (%RU32/%RU32): AudioTestSvcClientTonePlay() failed with %Rrc\n",
-                         pTstParms->idxCurrent, i + 1, pTstParms->cIterations, rc);
-
-        if (RT_SUCCESS(rc))
-        {
-            /* Wait a bit to let the left over audio bits being processed. */
-            if (pTstParms->cIterations > 1)
-                RTThreadSleep(RTRandU32Ex(2000, 5000)); /** @todo Implement some dedicated ATS command for this? */
-        }
-
+        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32: Telling VKAT on guest to record audio ...\n", idxTest);
+
+        rc = AudioTestSvcClientToneRecord(&pTstEnv->u.Host.AtsClGuest, &pTstParms->TestTone);
         if (RT_FAILURE(rc))
-        {
-            RTTestFailed(g_hTest, "Test #%RU32 (%RU32/%RU32): Recording test tone failed with %Rrc\n",
-                         pTstParms->idxCurrent, i + 1, pTstParms->cIterations, rc);
-            break; /* Not worth retrying, bail out. */
-        }
-    }
+            RTTestFailed(g_hTest, "Test #%RU32: AudioTestSvcClientToneRecord() failed with %Rrc\n", idxTest, rc);
+    }
+    else
+        RTTestFailed(g_hTest, "Test #%RU32: AudioTestSvcClientTonePlay() failed with %Rrc\n", idxTest, rc);
+
+    if (RT_SUCCESS(rc))
+    {
+        /* Wait a bit to let the left over audio bits being processed. */
+        if (pTstEnv->cIterations > 1)
+            RTThreadSleep(RTRandU32Ex(2000, 5000)); /** @todo Implement some dedicated ATS command for this? */
+    }
+
+    if (RT_FAILURE(rc))
+        RTTestFailed(g_hTest, "Test #%RU32: Recording test tone failed with %Rrc\n", idxTest, rc);
 
     return rc;
@@ -478,11 +468,8 @@
  * @param   pTstEnv             Test environment to use for running the test.
  * @param   pTstDesc            Test to run.
- * @param   uSeq                Test sequence # in case there are more tests.
- */
-static int audioTestOne(PAUDIOTESTENV pTstEnv, PAUDIOTESTDESC pTstDesc, unsigned uSeq)
-{
-    RT_NOREF(uSeq);
-
-    int rc;
+ */
+static int audioTestOne(PAUDIOTESTENV pTstEnv, PAUDIOTESTDESC pTstDesc)
+{
+    int rc = VINF_SUCCESS;
 
     AUDIOTESTPARMS TstParms;
@@ -493,38 +480,51 @@
     if (pTstDesc->fExcluded)
     {
-        RTTestSkipped(g_hTest, "Test #%u is excluded from list, skipping", uSeq);
+        RTTestSkipped(g_hTest, "Test #%RU32 is excluded from list, skipping", pTstEnv->idxTest);
         return VINF_SUCCESS;
     }
 
+    pTstEnv->cIterations = pTstEnv->cIterations == 0 ? RTRandU32Ex(1, 10) : pTstEnv->cIterations;
+
+    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%RU32 (%RU32 iterations total)\n", pTstEnv->idxTest, pTstEnv->cIterations);
+
     void *pvCtx = NULL; /* Test-specific opaque context. Optional and can be NULL. */
 
-    if (pTstDesc->pfnSetup)
-    {
-        rc = pTstDesc->pfnSetup(pTstEnv, pTstDesc, &TstParms, &pvCtx);
-        if (RT_FAILURE(rc))
+    AssertPtr(pTstDesc->pfnExec);
+    for (uint32_t i = 0; i < pTstEnv->cIterations; i++)
+    {
+        int rc2;
+
+        if (pTstDesc->pfnSetup)
         {
-            RTTestFailed(g_hTest, "Test #%u setup failed with %Rrc\n", uSeq, rc);
-            return rc;
+            rc2 = pTstDesc->pfnSetup(pTstEnv, pTstDesc, &TstParms, &pvCtx);
+            if (RT_FAILURE(rc2))
+                RTTestFailed(g_hTest, "Test #%RU32 setup failed with %Rrc\n", pTstEnv->idxTest, rc2);
         }
-    }
-
-    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test #%u (%RU32 iterations total)\n", uSeq, TstParms.cIterations);
-
-    AssertPtr(pTstDesc->pfnExec);
-    rc = pTstDesc->pfnExec(pTstEnv, pvCtx, &TstParms);
-    if (RT_FAILURE(rc))
-        RTTestFailed(g_hTest, "Test #%u failed with %Rrc\n", uSeq, rc);
-
-    RTTestSubDone(g_hTest);
-
-    if (pTstDesc->pfnDestroy)
-    {
-        int rc2 = pTstDesc->pfnDestroy(pTstEnv, pvCtx);
+        else
+            rc2 = VINF_SUCCESS;
+
+        if (RT_SUCCESS(rc2))
+        {
+            AssertPtrBreakStmt(pTstDesc->pfnExec, VERR_INVALID_POINTER);
+            rc2 = pTstDesc->pfnExec(pTstEnv, pvCtx, &TstParms);
+            if (RT_FAILURE(rc2))
+                RTTestFailed(g_hTest, "Test #%RU32 execution failed with %Rrc\n", pTstEnv->idxTest, rc2);
+        }
+
+        if (pTstDesc->pfnDestroy)
+        {
+            rc2 = pTstDesc->pfnDestroy(pTstEnv, pvCtx);
+            if (RT_FAILURE(rc2))
+                RTTestFailed(g_hTest, "Test #%RU32 destruction failed with %Rrc\n", pTstEnv->idxTest, rc2);
+        }
+
         if (RT_SUCCESS(rc))
             rc = rc2;
 
-        if (RT_FAILURE(rc2))
-            RTTestFailed(g_hTest, "Test #%u destruction failed with %Rrc\n", uSeq, rc2);
-    }
+        /* Keep going. */
+        pTstEnv->idxTest++;
+    }
+
+    RTTestSubDone(g_hTest);
 
     audioTestParmsDestroy(&TstParms);
@@ -578,13 +578,9 @@
         if (RT_SUCCESS(rc))
         {
-            unsigned uSeq = 0;
             for (unsigned i = 0; i < RT_ELEMENTS(g_aTests); i++)
             {
-                int rc2 = audioTestOne(pTstEnv, &g_aTests[i], uSeq);
+                int rc2 = audioTestOne(pTstEnv, &g_aTests[i]);
                 if (RT_SUCCESS(rc))
                     rc = rc2;
-
-                if (!g_aTests[i].fExcluded)
-                    uSeq++;
 
                 if (g_fTerminate)
Index: /trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp
===================================================================
--- /trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp	(revision 92395)
+++ /trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp	(revision 92396)
@@ -528,5 +528,5 @@
          * We always start with the pre beacon. */
         AUDIOTESTTONEBEACON Beacon;
-        AudioTestBeaconInit(&Beacon, AUDIOTESTTONEBEACONTYPE_PLAY_PRE, &pStream->Cfg.Props);
+        AudioTestBeaconInit(&Beacon, (uint8_t)pParms->Hdr.idxTest, AUDIOTESTTONEBEACONTYPE_PLAY_PRE, &pStream->Cfg.Props);
 
         uint32_t const cbBeacon = AudioTestBeaconGetSize(&Beacon);
@@ -537,17 +537,15 @@
         }
 
-        if (pTstEnv)
-        {
-            AudioTestObjAddMetadataStr(Obj, "beacon_type=%RU32\n", (uint32_t)AudioTestBeaconGetType(&Beacon));
-            AudioTestObjAddMetadataStr(Obj, "beacon_pre_bytes=%RU32\n", cbBeacon);
-            AudioTestObjAddMetadataStr(Obj, "beacon_post_bytes=%RU32\n", cbBeacon);
-            AudioTestObjAddMetadataStr(Obj, "stream_to_play_bytes=%RU32\n",      cbToPlayTotal);
-            AudioTestObjAddMetadataStr(Obj, "stream_period_size_frames=%RU32\n", pStream->Cfg.Backend.cFramesPeriod);
-            AudioTestObjAddMetadataStr(Obj, "stream_buffer_size_frames=%RU32\n", pStream->Cfg.Backend.cFramesBufferSize);
-            AudioTestObjAddMetadataStr(Obj, "stream_prebuf_size_frames=%RU32\n", pStream->Cfg.Backend.cFramesPreBuffering);
-            /* Note: This mostly is provided by backend (e.g. PulseAudio / ALSA / ++) and
-             *       has nothing to do with the device emulation scheduling hint. */
-            AudioTestObjAddMetadataStr(Obj, "device_scheduling_hint_ms=%RU32\n", pStream->Cfg.Device.cMsSchedulingHint);
-        }
+        AudioTestObjAddMetadataStr(Obj, "test_id=%04RU32\n", pParms->Hdr.idxTest);
+        AudioTestObjAddMetadataStr(Obj, "beacon_type=%RU32\n", (uint32_t)AudioTestBeaconGetType(&Beacon));
+        AudioTestObjAddMetadataStr(Obj, "beacon_pre_bytes=%RU32\n", cbBeacon);
+        AudioTestObjAddMetadataStr(Obj, "beacon_post_bytes=%RU32\n", cbBeacon);
+        AudioTestObjAddMetadataStr(Obj, "stream_to_play_bytes=%RU32\n",      cbToPlayTotal);
+        AudioTestObjAddMetadataStr(Obj, "stream_period_size_frames=%RU32\n", pStream->Cfg.Backend.cFramesPeriod);
+        AudioTestObjAddMetadataStr(Obj, "stream_buffer_size_frames=%RU32\n", pStream->Cfg.Backend.cFramesBufferSize);
+        AudioTestObjAddMetadataStr(Obj, "stream_prebuf_size_frames=%RU32\n", pStream->Cfg.Backend.cFramesPreBuffering);
+        /* Note: This mostly is provided by backend (e.g. PulseAudio / ALSA / ++) and
+         *       has nothing to do with the device emulation scheduling hint. */
+        AudioTestObjAddMetadataStr(Obj, "device_scheduling_hint_ms=%RU32\n", pStream->Cfg.Device.cMsSchedulingHint);
 
         RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Playing %RU32 bytes total\n", cbToPlayTotal);
@@ -618,5 +616,6 @@
                         if (AudioTestBeaconGetSize(&Beacon)) /* Play the post beacon, if any. */
                         {
-                            AudioTestBeaconInit(&Beacon, AUDIOTESTTONEBEACONTYPE_PLAY_POST, &pStream->Cfg.Props);
+                            AudioTestBeaconInit(&Beacon, (uint8_t)pParms->Hdr.idxTest, AUDIOTESTTONEBEACONTYPE_PLAY_POST,
+                                                &pStream->Cfg.Props);
                             continue;
                         }
@@ -753,5 +752,5 @@
          * We always start with the pre beacon. */
         AUDIOTESTTONEBEACON Beacon;
-        AudioTestBeaconInit(&Beacon, AUDIOTESTTONEBEACONTYPE_PLAY_PRE, &pStream->Cfg.Props);
+        AudioTestBeaconInit(&Beacon, (uint8_t)pParms->Hdr.idxTest, AUDIOTESTTONEBEACONTYPE_PLAY_PRE, &pStream->Cfg.Props);
 
         uint32_t const cbBeacon = AudioTestBeaconGetSize(&Beacon);
@@ -759,4 +758,5 @@
             RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Expecting 2 x %RU32 bytes pre/post beacons\n", cbBeacon);
 
+        AudioTestObjAddMetadataStr(Obj, "test_id=%04RU32\n", pParms->Hdr.idxTest);
         AudioTestObjAddMetadataStr(Obj, "beacon_type=%RU32\n", (uint32_t)AudioTestBeaconGetType(&Beacon));
         AudioTestObjAddMetadataStr(Obj, "beacon_pre_bytes=%RU32\n", cbBeacon);
@@ -870,5 +870,6 @@
                                 enmState = AUDIOTESTSTATE_POST;
                                 /* Re-use the beacon object, but this time it's the post beacon. */
-                                AudioTestBeaconInit(&Beacon, AUDIOTESTTONEBEACONTYPE_PLAY_POST, &pStream->Cfg.Props);
+                                AudioTestBeaconInit(&Beacon, (uint8_t)pParms->Hdr.idxTest, AUDIOTESTTONEBEACONTYPE_PLAY_POST,
+                                                    &pStream->Cfg.Props);
                             }
                         }
@@ -1034,5 +1035,5 @@
 
     RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Got request for playing test tone #%RU32 (%RU16Hz, %RU32ms) ...\n",
-                 pToneParms->Hdr.idxSeq, (uint16_t)pToneParms->dbFreqHz, pToneParms->msDuration);
+                 pToneParms->Hdr.idxTest, (uint16_t)pToneParms->dbFreqHz, pToneParms->msDuration);
 
     char szTimeCreated[RTTIME_STR_LEN];
@@ -1082,5 +1083,5 @@
 
     RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Got request for recording test tone #%RU32 (%RU32ms) ...\n",
-                 pToneParms->Hdr.idxSeq, pToneParms->msDuration);
+                 pToneParms->Hdr.idxTest, pToneParms->msDuration);
 
     char szTimeCreated[RTTIME_STR_LEN];
Index: /trunk/src/VBox/ValidationKit/utils/audio/vkatInternal.h
===================================================================
--- /trunk/src/VBox/ValidationKit/utils/audio/vkatInternal.h	(revision 92395)
+++ /trunk/src/VBox/ValidationKit/utils/audio/vkatInternal.h	(revision 92396)
@@ -238,5 +238,6 @@
 /**
  * Audio test environment parameters.
- * Not necessarily bound to a specific test (can be reused).
+ *
+ * This is global to all tests defined.
  */
 typedef struct AUDIOTESTENV
@@ -251,4 +252,6 @@
      *  If empty the default audio device will be used. */
     char                    szDev[128];
+    /** Zero-based index of current test (will be increased for every run test). */
+    uint32_t                idxTest;
     /** Number of iterations for *all* tests specified.
      *  When set to 0 (default), a random value (see specific test) will be chosen. */
