VirtualBox

Changeset 90983 in vbox


Ignore:
Timestamp:
Aug 29, 2021 2:24:31 PM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: More logging for the Validation Kit audio driver. ​bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp

    r90918 r90983  
    272272    PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
    273273
     274    LogRel(("ValKit: Beginning test set '%s'\n", pszTag));
     275
    274276    int rc = RTCritSectEnter(&pThis->CritSect);
    275277    if (RT_SUCCESS(rc))
    276278    {
    277 
    278         LogRel(("ValKit: Beginning test set '%s'\n", pszTag));
    279279        rc = AudioTestSetCreate(&pThis->Set, pThis->szPathTemp, pszTag);
    280280
     
    294294{
    295295    PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
     296
     297    LogRel(("ValKit: Ending test set '%s'\n", pszTag));
    296298
    297299    int rc = RTCritSectEnter(&pThis->CritSect);
     
    309311                LogRel(("ValKit: Waiting for runnig test set '%s' to end ...\n", pszTag));
    310312                rc = RTSemEventWait(pThis->EventSemEnded, RT_MS_30SEC);
     313                if (RT_FAILURE(rc))
     314                    LogRel(("ValKit: Waiting for runnig test set '%s' failed with %Rrc\n", pszTag, rc));
    311315
    312316                int rc2 = RTCritSectEnter(&pThis->CritSect);
     
    318322        if (RT_SUCCESS(rc))
    319323        {
    320             LogRel(("ValKit: Ending test set '%s'\n", pszTag));
     324            LogRel(("ValKit: Closing test set '%s' ...\n", pszTag));
    321325
    322326            /* Close the test set first. */
     
    328332                rc = AudioTestSetPack(pSet, pThis->szPathOut, pThis->szTestSetArchive, sizeof(pThis->szTestSetArchive));
    329333                if (RT_SUCCESS(rc))
     334                {
    330335                    LogRel(("ValKit: Packed up to '%s'\n", pThis->szTestSetArchive));
     336                }
     337                else
     338                    LogRel(("ValKit: Packing up test set failed with %Rrc\n", rc));
    331339
    332340                /* Do some internal housekeeping. */
     
    339347#endif
    340348            }
    341 
    342             AudioTestSetDestroy(pSet);
     349            else
     350                LogRel(("ValKit: Closing test set failed with %Rrc\n", rc));
     351
     352            int rc2 = AudioTestSetDestroy(pSet);
     353            if (RT_FAILURE(rc2))
     354            {
     355                LogRel(("ValKit: Destroying test set failed with %Rrc\n", rc));
     356                if (RT_SUCCESS(rc))
     357                    rc = rc2;
     358            }
    343359        }
    344360
     
    378394    if (RT_SUCCESS(rc))
    379395    {
    380         LogRel(("ValKit: Registered guest recording test #%RU32 (%RU32ms, %RU64 bytes)\n",
     396        LogRel(("ValKit: Registering guest recording test #%RU32 (%RU32ms, %RU64 bytes)\n",
    381397                pThis->cTestsTotal, pTestData->t.TestTone.Parms.msDuration, pTestData->t.TestTone.u.Rec.cbToWrite));
    382398
     
    416432    if (RT_SUCCESS(rc))
    417433    {
    418         LogRel(("ValKit: Registered guest playback test #%RU32 (%RU32ms, %RU64 bytes)\n",
     434        LogRel(("ValKit: Registering guest playback test #%RU32 (%RU32ms, %RU64 bytes)\n",
    419435                pThis->cTestsTotal, pTestData->t.TestTone.Parms.msDuration, pTestData->t.TestTone.u.Play.cbToRead));
    420436
     
    435451static DECLCALLBACK(int) drvHostValKitTestSetSendBeginCallback(void const *pvUser, const char *pszTag)
    436452{
    437     RT_NOREF(pszTag);
    438 
    439453    PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
    440454
     
    462476
    463477    if (RT_FAILURE(rc))
    464         LogRel(("ValKit: Beginning to send test set failed with %Rrc\n", rc));
     478        LogRel(("ValKit: Beginning to send test set '%s' failed with %Rrc\n", pszTag, rc));
    465479
    466480    return rc;
     
    471485                                                              const char *pszTag, void *pvBuf, size_t cbBuf, size_t *pcbRead)
    472486{
    473     RT_NOREF(pszTag);
    474 
    475487    PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
    476488
     
    480492        if (RTFileIsValid(pThis->hTestSetArchive))
    481493        {
    482             rc =  RTFileRead(pThis->hTestSetArchive, pvBuf, cbBuf, pcbRead);
     494            rc = RTFileRead(pThis->hTestSetArchive, pvBuf, cbBuf, pcbRead);
    483495        }
    484496        else
     
    491503
    492504    if (RT_FAILURE(rc))
    493         LogRel(("ValKit: Reading from test set failed with %Rrc\n", rc));
     505        LogRel(("ValKit: Reading from test set '%s' failed with %Rrc\n", pszTag, rc));
    494506
    495507    return rc;
     
    499511static DECLCALLBACK(int) drvHostValKitTestSetSendEndCallback(void const *pvUser, const char *pszTag)
    500512{
    501     RT_NOREF(pszTag);
    502 
    503513    PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser;
    504514
     
    519529
    520530    if (RT_FAILURE(rc))
    521         LogRel(("ValKit: Ending to send test set failed with %Rrc\n", rc));
     531        LogRel(("ValKit: Ending to send test set '%s' failed with %Rrc\n", pszTag, rc));
    522532
    523533    return rc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette