VirtualBox

Changeset 80585 in vbox for trunk/src/VBox/Runtime/testcase


Ignore:
Timestamp:
Sep 4, 2019 2:05:50 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133105
Message:

Runtime: Some renaming to stay consistent (*Get* always returns what is asked for while *Query* returns a status code and where to store the value on success is given as a pointer)

  • RTVfsFileGetSize -> RTVfsFileQuerySize
  • RTFileQuerySize -> RTFileQuerySizeByPath
  • RTFileGetSize -> RTFileQuerySize
  • RTFileGetSizeMaxEx -> RTFileQuerySizeMaxEx
Location:
trunk/src/VBox/Runtime/testcase
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/Makefile.kmk

    r79891 r80585  
    6767        tstRTFileAio \
    6868        tstRTFileAppend-1 \
    69         tstRTFileGetSize-1 \
     69        tstRTFileQuerySize-1 \
    7070        tstRTFileModeStringToFlags \
    7171        tstFileLock \
     
    362362tstRTFileAppend-1_SOURCES = tstRTFileAppend-1.cpp
    363363
    364 tstRTFileGetSize-1_TEMPLATE = VBOXR3TSTEXE
    365 tstRTFileGetSize-1_SOURCES = tstRTFileGetSize-1.cpp
     364tstRTFileQuerySize-1_TEMPLATE = VBOXR3TSTEXE
     365tstRTFileQuerySize-1_SOURCES = tstRTFileQuerySize-1.cpp
    366366
    367367tstRTFileModeStringToFlags_TEMPLATE = VBOXR3TSTEXE
  • trunk/src/VBox/Runtime/testcase/tstFile.cpp

    r76553 r80585  
    5151
    5252    RTFOFF cbMax = -2;
    53     rc = RTFileGetMaxSizeEx(File, &cbMax);
    54     if (RT_FAILURE(rc))
    55     {
    56         RTPrintf("tstFile: RTFileGetMaxSizeEx failed: %Rrc\n", rc);
     53    rc = RTFileQueryMaxSizeEx(File, &cbMax);
     54    if (RT_FAILURE(rc))
     55    {
     56        RTPrintf("tstFile: RTFileQueryMaxSizeEx failed: %Rrc\n", rc);
    5757        cErrors++;
    5858    }
    5959    else if (cbMax <= 0)
    6060    {
    61         RTPrintf("tstFile: RTFileGetMaxSizeEx failed: cbMax=%RTfoff\n", cbMax);
     61        RTPrintf("tstFile: RTFileQueryMaxSizeEx failed: cbMax=%RTfoff\n", cbMax);
    6262        cErrors++;
    6363    }
     
    8080    {
    8181        uint64_t cb;
    82         rc = RTFileGetSize(File, &cb);
     82        rc = RTFileQuerySize(File, &cb);
    8383        if (RT_FAILURE(rc))
    8484        {
     
    8888        else if (cb != _2G + _1M)
    8989        {
    90             RTPrintf("RTFileGetSize return %RX64 bytes, expected %RX64.\n", cb, _2G + _1M);
     90            RTPrintf("RTFileQuerySize return %RX64 bytes, expected %RX64.\n", cb, _2G + _1M);
    9191            cErrors++;
    9292        }
  • trunk/src/VBox/Runtime/testcase/tstRTDvm.cpp

    r77256 r80585  
    190190
    191191    uint64_t cb = 0;
    192     rc = RTVfsFileGetSize(hVfsDisk, &cb);
     192    rc = RTVfsFileQuerySize(hVfsDisk, &cb);
    193193    if (   RT_FAILURE(rc)
    194194        || cb % 512 != 0) /* Assume 512 byte sector size. */
    195195    {
    196         RTTestIFailed("RTVfsFileGetSize -> %Rrc", rc);
     196        RTTestIFailed("RTVfsFileQuerySize -> %Rrc", rc);
    197197        return RTTestSummaryAndDestroy(hTest);
    198198    }
  • trunk/src/VBox/Runtime/testcase/tstRTFileQuerySize-1.cpp

    r80584 r80585  
    11/* $Id$ */
    22/** @file
    3  * IPRT Testcase - RTFileGetSize.
     3 * IPRT Testcase - RTFileQuerySize.
    44 */
    55
     
    5858
    5959    uint64_t    cbFile = UINT64_MAX - 42;
    60     RTTESTI_CHECK_RC(rc = RTFileGetSize(hFile, &cbFile), VINF_SUCCESS);
     60    RTTESTI_CHECK_RC(rc = RTFileQuerySize(hFile, &cbFile), VINF_SUCCESS);
    6161    if (RT_SUCCESS(rc))
    6262    {
     
    7373{
    7474    RTTEST hTest;
    75     int rc = RTTestInitAndCreate("tstRTFileGetSize-1", &hTest);
     75    int rc = RTTestInitAndCreate("tstRTFileQuerySize-1", &hTest);
    7676    if (rc)
    7777        return rc;
  • trunk/src/VBox/Runtime/testcase/tstRTFilesystem.cpp

    r76553 r80585  
    6060    uint64_t cbFs = 0;
    6161
    62     rc = RTVfsFileGetSize(hVfsFile, &cbFs);
     62    rc = RTVfsFileQuerySize(hVfsFile, &cbFs);
    6363    if (RT_FAILURE(rc))
    6464    {
    65         RTTestIFailed("RTVfsFileGetSize -> %Rrc", rc);
     65        RTTestIFailed("RTVfsFileQuerySize -> %Rrc", rc);
    6666        return rc;
    6767    }
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