VirtualBox

Changeset 39543 in vbox


Ignore:
Timestamp:
Dec 6, 2011 5:00:23 PM (13 years ago)
Author:
vboxsync
Message:

HostServices/SharedFolders: starter unit test, try to make Windows happy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp

    r39542 r39543  
    117117extern int testRTDirClose(PRTDIR pDir)
    118118{
    119  /* RTPrintf("%s: pDir=%p\n", __func__, pDir); */
     119 /* RTPrintf("%s: pDir=%p\n", __PRETTY_FUNCTION__, pDir); */
    120120    testRTDirClosepDir = pDir;
    121121    return VINF_SUCCESS;
     
    127127extern int testRTDirCreate(const char *pszPath, RTFMODE fMode)
    128128{
    129  /* RTPrintf("%s: pszPath=%s, fMode=0x%llx\n", __func__, pszPath,
     129 /* RTPrintf("%s: pszPath=%s, fMode=0x%llx\n", __PRETTY_FUNCTION__, pszPath,
    130130             LLUIFY(fMode)); */
    131131    ARRAY_FROM_PATH(testRTDirCreatePath, pszPath);
     
    138138extern int testRTDirOpen(PRTDIR *ppDir, const char *pszPath)
    139139{
    140  /* RTPrintf("%s: pszPath=%s\n", __func__, pszPath); */
     140 /* RTPrintf("%s: pszPath=%s\n", __PRETTY_FUNCTION__, pszPath); */
    141141    ARRAY_FROM_PATH(testRTDirOpenName, pszPath);
    142142    *ppDir = testRTDirOpenpDir;
     
    151151                               RTFSOBJATTRADD enmAdditionalAttribs)
    152152{
    153  /* RTPrintf("%s: pDir=%p, enmAdditionalAttribs=0x%llx\n", __func__, pDir,
    154              LLUIFY(enmAdditionalAttribs)); */
     153 /* RTPrintf("%s: pDir=%p, enmAdditionalAttribs=0x%llx\n", __PRETTY_FUNCTION__,
     154             pDir, LLUIFY(enmAdditionalAttribs)); */
    155155    testRTDirQueryInfoDir = pDir;
    156156    RT_ZERO(*pObjInfo);
     
    160160}
    161161
    162 extern int testRTDirRemove(const char *pszPath) { RTPrintf("%s\n", __func__); return 0; }
     162extern int testRTDirRemove(const char *pszPath) { RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
    163163
    164164static PRTDIR testRTDirReadExDir;
     
    170170{
    171171 /* RTPrintf("%s: pDir=%p, pcbDirEntry=%d, enmAdditionalAttribs=%llu, fFlags=0x%llx\n",
    172              __func__, pDir, pcbDirEntry ? (int) *pcbDirEntry : -1,
     172             __PRETTY_FUNCTION__, pDir, pcbDirEntry ? (int) *pcbDirEntry : -1,
    173173             LLUIFY(enmAdditionalAttribs), LLUIFY(fFlags)); */
    174174    testRTDirReadExDir = pDir;
     
    178178static RTTIMESPEC testRTDirSetTimesATime;
    179179
    180 RTR3DECL(int) testRTDirSetTimes(PRTDIR pDir, PCRTTIMESPEC pAccessTime,
     180extern int testRTDirSetTimes(PRTDIR pDir, PCRTTIMESPEC pAccessTime,
    181181                                PCRTTIMESPEC pModificationTime,
    182182                                PCRTTIMESPEC pChangeTime,
     
    184184{
    185185 /* RTPrintf("%s: pDir=%p, *pAccessTime=%lli, *pModificationTime=%lli, *pChangeTime=%lli, *pBirthTime=%lli\n",
    186              __func__, pDir,
     186             __PRETTY_FUNCTION__, pDir,
    187187             pAccessTime ? (long long)RTTimeSpecGetNano(pAccessTime) : -1,
    188188               pModificationTime
     
    201201extern int  testRTFileClose(RTFILE File)
    202202{
    203  /* RTPrintf("%s: File=%p\n", __func__, File); */
     203 /* RTPrintf("%s: File=%p\n", __PRETTY_FUNCTION__, File); */
    204204    testRTFileCloseFile = File;
    205205    return 0;
    206206}
    207207
    208 extern int  testRTFileDelete(const char *pszFilename) { RTPrintf("%s\n", __func__); return 0; }
     208extern int  testRTFileDelete(const char *pszFilename) { RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
    209209
    210210static RTFILE testRTFileFlushFile;
     
    212212extern int  testRTFileFlush(RTFILE File)
    213213{
    214  /* RTPrintf("%s: File=%p\n", __func__, File); */
     214 /* RTPrintf("%s: File=%p\n", __PRETTY_FUNCTION__, File); */
    215215    testRTFileFlushFile = File;
    216216    return VINF_SUCCESS;
     
    225225                            uint64_t cbLock)
    226226{
    227  /* RTPrintf("%s: hFile=%p, fLock=%u, offLock=%lli, cbLock=%llu\n", __func__,
    228              hFile, fLock, (long long) offLock, LLUIFY(cbLock)); */
     227 /* RTPrintf("%s: hFile=%p, fLock=%u, offLock=%lli, cbLock=%llu\n",
     228             __PRETTY_FUNCTION__, hFile, fLock, (long long) offLock,
     229             LLUIFY(cbLock)); */
    229230    testRTFileLockFile = hFile;
    230231    testRTFileLockfLock = fLock;
     
    241242                            uint64_t fOpen)
    242243{
    243  /* RTPrintf("%s, pszFilename=%s, fOpen=0x%llx\n", __func__, pszFilename,
    244              LLUIFY(fOpen)); */
     244 /* RTPrintf("%s, pszFilename=%s, fOpen=0x%llx\n", __PRETTY_FUNCTION__,
     245             pszFilename, LLUIFY(fOpen)); */
    245246    ARRAY_FROM_PATH(testRTFileOpenName, pszFilename);
    246247    testRTFileOpenFlags = fOpen;
     
    256257extern int  testRTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs)
    257258{
    258  /* RTPrintf("%s, hFile=%p, enmAdditionalAttribs=0x%llx\n", __func__,
    259              hFile, LLUIFY(enmAdditionalAttribs)); */
     259 /* RTPrintf("%s, hFile=%p, enmAdditionalAttribs=0x%llx\n",
     260             __PRETTY_FUNCTION__, hFile, LLUIFY(enmAdditionalAttribs)); */
    260261    testRTFileQueryInfoFile = hFile;
    261262    RT_ZERO(*pObjInfo);
     
    272273                            size_t *pcbRead)
    273274{
    274  /* RTPrintf("%s : File=%p, cbToRead=%llu\n", __func__, File,
     275 /* RTPrintf("%s : File=%p, cbToRead=%llu\n", __PRETTY_FUNCTION__, File,
    275276             LLUIFY(cbToRead)); */
    276277    bufferFromPath(pvBuf, cbToRead, testRTFileReadData);
     
    284285                           uint64_t *poffActual)
    285286{
    286  /* RTPrintf("%s : hFile=%p, offSeek=%llu, uMethod=%u\n", __func__, hFile,
    287              LLUIFY(offSeek), uMethod); */
     287 /* RTPrintf("%s : hFile=%p, offSeek=%llu, uMethod=%u\n", __PRETTY_FUNCTION__,
     288             hFile, LLUIFY(offSeek), uMethod); */
    288289    if (poffActual)
    289290        *poffActual = 0;
     
    295296extern int testRTFileSetMode(RTFILE File, RTFMODE fMode)
    296297{
    297  /* RTPrintf("%s: fMode=%llu\n", __func__, LLUIFY(fMode)); */
     298 /* RTPrintf("%s: fMode=%llu\n", __PRETTY_FUNCTION__, LLUIFY(fMode)); */
    298299    testRTFileSetFMode = fMode;
    299300    return VINF_SUCCESS;
     
    305306extern int  testRTFileSetSize(RTFILE File, uint64_t cbSize)
    306307{
    307  /* RTPrintf("%s: File=%llu, cbSize=%llu\n", __func__, LLUIFY(File),
     308 /* RTPrintf("%s: File=%llu, cbSize=%llu\n", __PRETTY_FUNCTION__, LLUIFY(File),
    308309             LLUIFY(cbSize)); */
    309310    testRTFileSetSizeFile = File;
     
    320321{
    321322 /* RTPrintf("%s: pFile=%p, *pAccessTime=%lli, *pModificationTime=%lli, *pChangeTime=%lli, *pBirthTime=%lli\n",
    322              __func__,
     323             __PRETTY_FUNCTION__,
    323324             pAccessTime ? (long long)RTTimeSpecGetNano(pAccessTime) : -1,
    324325               pModificationTime
     
    339340extern int  testRTFileUnlock(RTFILE File, int64_t offLock, uint64_t cbLock)
    340341{
    341  /* RTPrintf("%s: hFile=%p, ofLock=%lli, cbLock=%llu\n", __func__,
     342 /* RTPrintf("%s: hFile=%p, ofLock=%lli, cbLock=%llu\n", __PRETTY_FUNCTION__,
    342343             File, (long long) offLock, LLUIFY(cbLock)); */
    343344    testRTFileUnlockFile = File;
     
    352353                             size_t *pcbWritten)
    353354{
    354  /* RTPrintf("%s: File=%p, pvBuf=%.*s, cbToWrite=%llu\n", __func__, File,
    355              cbToWrite, (const char *)pvBuf, LLUIFY(cbToWrite)); */
     355 /* RTPrintf("%s: File=%p, pvBuf=%.*s, cbToWrite=%llu\n", __PRETTY_FUNCTION__,
     356             File, cbToWrite, (const char *)pvBuf, LLUIFY(cbToWrite)); */
    356357    ARRAY_FROM_PATH(testRTFileWriteData, (const char *)pvBuf);
    357358    if (pcbWritten)
     
    360361}
    361362                             
    362 RTR3DECL(int) testRTFsQueryProperties(const char *pszFsPath,
     363extern int testRTFsQueryProperties(const char *pszFsPath,
    363364                                      PRTFSPROPERTIES pProperties)
    364365{
    365  /* RTPrintf("%s, pszFsPath=%s\n", __func__, pszFsPath);
     366 /* RTPrintf("%s, pszFsPath=%s\n", __PRETTY_FUNCTION__, pszFsPath);
    366367    RT_ZERO(*pProperties); */
    367368    pProperties->cbMaxComponent = 256;
     
    370371}
    371372
    372 RTR3DECL(int) testRTFsQuerySerial(const char *pszFsPath, uint32_t *pu32Serial)
    373 { RTPrintf("%s\n", __func__); return 0; }
    374 RTR3DECL(int) testRTFsQuerySizes(const char *pszFsPath, PRTFOFF pcbTotal,
     373extern int testRTFsQuerySerial(const char *pszFsPath, uint32_t *pu32Serial)
     374{ RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
     375extern int testRTFsQuerySizes(const char *pszFsPath, PRTFOFF pcbTotal,
    375376                                 RTFOFF *pcbFree, uint32_t *pcbBlock,
    376                                  uint32_t *pcbSector) { RTPrintf("%s\n", __func__); return 0; }
    377 
    378 RTR3DECL(int) testRTPathQueryInfoEx(const char *pszPath,
     377                                 uint32_t *pcbSector) { RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
     378
     379extern int testRTPathQueryInfoEx(const char *pszPath,
    379380                                    PRTFSOBJINFO pObjInfo,
    380381                                    RTFSOBJATTRADD enmAdditionalAttribs,
     
    382383{
    383384 /* RTPrintf("%s: pszPath=%s, enmAdditionalAttribs=0x%x, fFlags=0x%x\n",
    384              __func__, pszPath, (unsigned) enmAdditionalAttribs,
     385             __PRETTY_FUNCTION__, pszPath, (unsigned) enmAdditionalAttribs,
    385386             (unsigned) fFlags); */
    386387    RT_ZERO(*pObjInfo);
     
    388389}
    389390
    390 extern int testRTSymlinkDelete(const char *pszSymlink) { RTPrintf("%s\n", __func__); return 0; }
     391extern int testRTSymlinkDelete(const char *pszSymlink) { RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
    391392extern int testRTSymlinkRead(const char *pszSymlink, char *pszTarget,
    392                               size_t cbTarget) { RTPrintf("%s\n", __func__); return 0; }
     393                              size_t cbTarget) { RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
    393394
    394395/******************************************************************************
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