VirtualBox

Changeset 92015 in vbox for trunk


Ignore:
Timestamp:
Oct 22, 2021 8:56:25 PM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Also use the new driver helpers to not make VKAT crash because of missing stubs (see bugref:10074). ​bugref:10008

File:
1 edited

Legend:

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

    r91842 r92015  
    6262/** @name Driver Fakes/Stubs
    6363 *
    64  * @note The VMM functions defined here will turn into driver helpers before
    65  *       long, as the drivers aren't supposed to import directly from the VMM in
    66  *       the future.
    67  *
    6864 * @{  */
    6965
    70 VMMR3DECL(PCFGMNODE) CFGMR3GetChild(PCFGMNODE pNode, const char *pszPath)
     66VMMR3DECL(PCFGMNODE) audioTestDrvHlp_CFGMR3GetChild(PCFGMNODE pNode, const char *pszPath)
    7167{
    7268    RT_NOREF(pNode, pszPath);
     
    7571
    7672
    77 VMMR3DECL(int) CFGMR3QueryString(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString)
     73VMMR3DECL(int) audioTestDrvHlp_CFGMR3QueryString(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString)
    7874{
    7975    if (pNode != NULL)
     
    9995
    10096
    101 VMMR3DECL(int) CFGMR3QueryStringAlloc(PCFGMNODE pNode, const char *pszName, char **ppszString)
     97VMMR3DECL(int) audioTestDrvHlp_CFGMR3QueryStringAlloc(PCFGMNODE pNode, const char *pszName, char **ppszString)
    10298{
    10399    char szStr[128];
    104     int rc = CFGMR3QueryString(pNode, pszName, szStr, sizeof(szStr));
     100    int rc = audioTestDrvHlp_CFGMR3QueryString(pNode, pszName, szStr, sizeof(szStr));
    105101    if (RT_SUCCESS(rc))
    106102        *ppszString = RTStrDup(szStr);
     
    110106
    111107
    112 VMMR3DECL(void) MMR3HeapFree(void *pv)
    113 {
     108VMMR3DECL(void) audioTestDrvHlp_MMR3HeapFree(PPDMDRVINS pDrvIns, void *pv)
     109{
     110    RT_NOREF(pDrvIns);
     111
    114112    /* counterpart to CFGMR3QueryStringAlloc */
    115113    RTStrFree((char *)pv);
     
    117115
    118116
    119 VMMR3DECL(int) CFGMR3QueryStringDef(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString, const char *pszDef)
     117VMMR3DECL(int) audioTestDrvHlp_CFGMR3QueryStringDef(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString, const char *pszDef)
    120118{
    121119    PCPDMDRVREG pDrvReg = (PCPDMDRVREG)pNode;
     
    142140
    143141
    144 VMMR3DECL(int) CFGMR3QueryBoolDef(PCFGMNODE pNode, const char *pszName, bool *pf, bool fDef)
     142VMMR3DECL(int) audioTestDrvHlp_CFGMR3QueryBoolDef(PCFGMNODE pNode, const char *pszName, bool *pf, bool fDef)
    145143{
    146144    PCPDMDRVREG pDrvReg = (PCPDMDRVREG)pNode;
     
    161159
    162160
    163 VMMR3DECL(int) CFGMR3QueryU8(PCFGMNODE pNode, const char *pszName, uint8_t *pu8)
     161VMMR3DECL(int) audioTestDrvHlp_CFGMR3QueryU8(PCFGMNODE pNode, const char *pszName, uint8_t *pu8)
    164162{
    165163    RT_NOREF(pNode, pszName, pu8);
     
    168166
    169167
    170 VMMR3DECL(int) CFGMR3QueryU32(PCFGMNODE pNode, const char *pszName, uint32_t *pu32)
     168VMMR3DECL(int) audioTestDrvHlp_CFGMR3QueryU32(PCFGMNODE pNode, const char *pszName, uint32_t *pu32)
    171169{
    172170    RT_NOREF(pNode, pszName, pu32);
     
    175173
    176174
    177 VMMR3DECL(int) CFGMR3ValidateConfig(PCFGMNODE pNode, const char *pszNode,
    178                                     const char *pszValidValues, const char *pszValidNodes,
    179                                     const char *pszWho, uint32_t uInstance)
     175VMMR3DECL(int) audioTestDrvHlp_CFGMR3ValidateConfig(PCFGMNODE pNode, const char *pszNode,
     176                                                    const char *pszValidValues, const char *pszValidNodes,
     177                                                    const char *pszWho, uint32_t uInstance)
    180178{
    181179    RT_NOREF(pNode, pszNode, pszValidValues, pszValidNodes, pszWho, uInstance);
     
    273271        s_DrvHlp.pfnSTAMDeregister              = audioTestDrvHlp_STAMDeregister;
    274272        s_DrvHlp.pfnSTAMDeregisterByPrefix      = audioTestDrvHlp_STAMDeregisterByPrefix;
     273        s_DrvHlp.pfnCFGMGetChild                = audioTestDrvHlp_CFGMR3GetChild;
     274        s_DrvHlp.pfnCFGMQueryString             = audioTestDrvHlp_CFGMR3QueryString;
     275        s_DrvHlp.pfnCFGMQueryStringAlloc        = audioTestDrvHlp_CFGMR3QueryStringAlloc;
     276        s_DrvHlp.pfnMMHeapFree                  = audioTestDrvHlp_MMR3HeapFree;
     277        s_DrvHlp.pfnCFGMQueryStringDef          = audioTestDrvHlp_CFGMR3QueryStringDef;
     278        s_DrvHlp.pfnCFGMQueryBoolDef            = audioTestDrvHlp_CFGMR3QueryBoolDef;
     279        s_DrvHlp.pfnCFGMQueryU8                 = audioTestDrvHlp_CFGMR3QueryU8;
     280        s_DrvHlp.pfnCFGMQueryU32                = audioTestDrvHlp_CFGMR3QueryU32;
     281        s_DrvHlp.pfnCFGMValidateConfig          = audioTestDrvHlp_CFGMR3ValidateConfig;
    275282    }
    276283    return &s_DrvHlp;
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