VirtualBox

Changeset 89889 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 24, 2021 1:11:47 PM (3 years ago)
Author:
vboxsync
Message:

Audio/Test: Added AudioTestSetTestIsRunning(). bugref:10008

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

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

    r89842 r89889  
    12171217
    12181218    memcpy(&pEntry->Parms, pParms, sizeof(AUDIOTESTPARMS));
     1219
    12191220    pEntry->pParent = pSet;
     1221    pEntry->rc      = VERR_IPE_UNINITIALIZED_STATUS;
    12201222
    12211223    rc = audioTestManifestWrite(pSet, "\n");
     
    12721274
    12731275    RTListAppend(&pSet->lstTest, &pEntry->Node);
     1276
    12741277    pSet->cTests++;
    12751278    pSet->cTestsRunning++;
     
    12911294int AudioTestSetTestFailed(PAUDIOTESTENTRY pEntry, int rc, const char *pszErr)
    12921295{
    1293     AssertReturn(pEntry->pParent->cTestsRunning == 1,            VERR_WRONG_ORDER); /* No test nesting allowed. */
    1294     AssertReturn(pEntry->rc                     == VINF_SUCCESS, VERR_WRONG_ORDER);
     1296    AssertReturn(pEntry->pParent->cTestsRunning == 1,                             VERR_WRONG_ORDER); /* No test nesting allowed. */
     1297    AssertReturn(pEntry->rc                     == VERR_IPE_UNINITIALIZED_STATUS, VERR_WRONG_ORDER);
    12951298
    12961299    pEntry->rc = rc;
     
    13151318int AudioTestSetTestDone(PAUDIOTESTENTRY pEntry)
    13161319{
    1317     AssertReturn(pEntry->pParent->cTestsRunning == 1,            VERR_WRONG_ORDER); /* No test nesting allowed. */
    1318     AssertReturn(pEntry->rc                     == VINF_SUCCESS, VERR_WRONG_ORDER);
     1320    AssertReturn(pEntry->pParent->cTestsRunning == 1,                             VERR_WRONG_ORDER); /* No test nesting allowed. */
     1321    AssertReturn(pEntry->rc                     == VERR_IPE_UNINITIALIZED_STATUS, VERR_WRONG_ORDER);
     1322
     1323    pEntry->rc = VINF_SUCCESS;
    13191324
    13201325    int rc2 = audioTestManifestWrite(pEntry->pParent, "error_rc=%RI32\n", VINF_SUCCESS);
     
    13251330
    13261331    return rc2;
     1332}
     1333
     1334/**
     1335 * Returns whether a test is still running or not.
     1336 *
     1337 * @returns \c true if test is still running, or \c false if not.
     1338 * @param   pEntry              Test to get running status for.
     1339 */
     1340bool AudioTestSetTestIsRunning(PAUDIOTESTENTRY pEntry)
     1341{
     1342    return (pEntry->rc == VERR_IPE_UNINITIALIZED_STATUS);
    13271343}
    13281344
  • trunk/src/VBox/Devices/Audio/AudioTest.h

    r89747 r89889  
    358358int    AudioTestSetTestFailed(PAUDIOTESTENTRY pEntry, int rc, const char *pszErr);
    359359int    AudioTestSetTestDone(PAUDIOTESTENTRY pEntry);
     360bool   AudioTestSetTestIsRunning(PAUDIOTESTENTRY pEntry);
    360361
    361362int    AudioTestSetCreate(PAUDIOTESTSET pSet, const char *pszPath, const char *pszTag);
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