VirtualBox

Ignore:
Timestamp:
Oct 25, 2021 5:40:49 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147860
Message:

Audio/Validation Kit: Use the RTTEST macros in selftest mode. ​bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkatCmdSelfTest.cpp

    r91947 r92051  
    134134    int rc = audioTestDriverStackProbe(&DrvStack, pDrvReg,
    135135                                       true /* fEnabledIn */, true /* fEnabledOut */, false /* fWithDrvAudio */);
    136     AssertRCReturn(rc, rc);
     136    RTTEST_CHECK_RC_OK_RET(g_hTest, rc, rc);
    137137
    138138    AUDIOTESTIOOPTS IoOpts;
     
    147147
    148148    rc = audioTestDriverStackStreamEnable(&DrvStack, pStream);
    149     AssertRCReturn(rc, rc);
    150 
    151     AssertReturn(audioTestDriverStackStreamIsOkay(&DrvStack, pStream), VERR_AUDIO_STREAM_NOT_READY);
     149    RTTEST_CHECK_RC_OK_RET(g_hTest, rc, rc);
     150
     151    RTTEST_CHECK_RET(g_hTest, audioTestDriverStackStreamIsOkay(&DrvStack, pStream), VERR_AUDIO_STREAM_NOT_READY);
    152152
    153153    uint8_t abBuf[_4K];
     
    156156    uint32_t cbWritten;
    157157    rc = audioTestDriverStackStreamPlay(&DrvStack, pStream, abBuf, sizeof(abBuf), &cbWritten);
    158     AssertRCReturn(rc, rc);
    159     AssertReturn(cbWritten == sizeof(abBuf), VERR_AUDIO_STREAM_NOT_READY);
     158    RTTEST_CHECK_RC_OK_RET(g_hTest, rc, rc);
     159    RTTEST_CHECK_RET(g_hTest, cbWritten == sizeof(abBuf), VERR_AUDIO_STREAM_NOT_READY);
    160160
    161161    audioTestDriverStackStreamDrain(&DrvStack, pStream, true /* fSync */);
     
    199199    /* Generate tag for guest side. */
    200200    int rc = RTStrCopy(pTstEnvGst->szTag, sizeof(pTstEnvGst->szTag), pCtx->szTag);
    201     AssertRCReturn(rc, rc);
     201    RTTEST_CHECK_RC_OK_RET(g_hTest, rc, rc);
    202202
    203203    rc = AudioTestPathCreateTemp(pTstEnvGst->szPathTemp, sizeof(pTstEnvGst->szPathTemp), "selftest-guest");
    204     AssertRCReturn(rc, rc);
     204    RTTEST_CHECK_RC_OK_RET(g_hTest, rc, rc);
    205205
    206206    rc = AudioTestPathCreateTemp(pTstEnvGst->szPathOut, sizeof(pTstEnvGst->szPathOut), "selftest-out");
    207     AssertRCReturn(rc, rc);
     207    RTTEST_CHECK_RC_OK_RET(g_hTest, rc, rc);
    208208
    209209    pTstEnvGst->enmMode = AUDIOTESTMODE_GUEST;
     
    214214        RTThreadUserSignal(hThread);
    215215
    216         audioTestWorker(pTstEnvGst);
     216        rc = audioTestWorker(pTstEnvGst);
     217        RTTEST_CHECK_RC_OK_RET(g_hTest, rc, rc);
     218
    217219        audioTestEnvDestroy(pTstEnvGst);
    218220    }
     
    233235    /* Generate a common tag for guest and host side. */
    234236    int rc = AudioTestGenTag(pCtx->szTag, sizeof(pCtx->szTag));
    235     AssertRCReturn(rc, RTEXITCODE_FAILURE);
     237    RTTEST_CHECK_RC_OK_RET(g_hTest, rc, RTEXITCODE_FAILURE);
    236238
    237239    PAUDIOTESTENV pTstEnvHst = &pCtx->Host.TstEnv;
     
    248250    /* Generate tag for host side. */
    249251    rc = RTStrCopy(pTstEnvHst->szTag, sizeof(pTstEnvHst->szTag), pCtx->szTag);
    250     AssertRCReturn(rc, RTEXITCODE_FAILURE);
     252    RTTEST_CHECK_RC_OK_RET(g_hTest, rc, RTEXITCODE_FAILURE);
    251253
    252254    rc = AudioTestPathCreateTemp(pTstEnvHst->szPathTemp, sizeof(pTstEnvHst->szPathTemp), "selftest-tmp");
    253     AssertRCReturn(rc, RTEXITCODE_FAILURE);
     255    RTTEST_CHECK_RC_OK_RET(g_hTest, rc, RTEXITCODE_FAILURE);
    254256
    255257    rc = AudioTestPathCreateTemp(pTstEnvHst->szPathOut, sizeof(pTstEnvHst->szPathOut), "selftest-out");
    256     AssertRCReturn(rc, RTEXITCODE_FAILURE);
     258    RTTEST_CHECK_RC_OK_RET(g_hTest, rc, RTEXITCODE_FAILURE);
    257259
    258260    /*
     
    287289             */
    288290            rc = audioTestWorker(pTstEnvHst);
    289             if (RT_SUCCESS(rc))
    290             {
    291 
    292             }
     291            RTTEST_CHECK_RC_OK(g_hTest, rc);
    293292
    294293            audioTestEnvDestroy(pTstEnvHst);
Note: See TracChangeset for help on using the changeset viewer.

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