VirtualBox

Ignore:
Timestamp:
May 1, 2019 1:00:32 PM (6 years ago)
Author:
vboxsync
Message:

FsPerf: More tests of host<->guest interaction. bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/fs/FsPerf.cpp

    r78361 r78362  
    706706            rc = rc2;
    707707        }
     708        if (RT_SUCCESS(rc) && g_uVerbosity >= 3)
     709            RTMsgInfo("comms: wrote '%s'\n", g_szCommsDir);
    708710        if (RT_FAILURE(rc))
    709711            RTFileDelete(g_szCommsDir);
     
    734736    {
    735737        rc = RTFileRename(g_szCommsDir, InCommsSubDir(pszFilename, cchFilename), RTPATHRENAME_FLAGS_REPLACE);
     738        if (RT_SUCCESS(rc) && g_uVerbosity >= 3)
     739            RTMsgInfo("comms: placed '%s'\n", g_szCommsSubDir);
    736740        if (RT_FAILURE(rc))
    737741        {
     
    938942
    939943                /* Display or return the text? */
     944                if (RT_SUCCESS(rc) && g_uVerbosity >= 2)
     945                    RTMsgInfo("comms: order #%u: %Rrc%s%s\n",
     946                              g_iSeqNoMaster - 1, rcRemote, *pszErrorText ? " - " : "", pszErrorText);
    940947
    941948                RTMemFree(pszContent);
    942949                return rcRemote;
    943 
    944950            }
    945951
     
    950956            if (RTTimeMilliTS() - msStart > msTimeout)
    951957            {
     958                if (RT_SUCCESS(rc) && g_uVerbosity >= 2)
     959                    RTMsgInfo("comms: timed out waiting for order #%u'\n", g_iSeqNoMaster - 1);
     960
    952961                rc = RTFileDelete(InCommsSubDir(szSendNm, cchSendNm));
    953962                if (RT_SUCCESS(rc))
     
    54835492    AssertCompile(RT_ELEMENTS(g_abPattern0) == 1);
    54845493    RTTESTI_CHECK(ASMMemIsAllU8(abBuf, 4096, g_abPattern0[0]));
     5494    RTTESTI_CHECK_RC(RTFileRead(hFile0, abBuf, 1, NULL), VERR_EOF);
     5495
     5496    /*
     5497     * Append a little to it on the host and see that we can read it.
     5498     */
     5499    RTTESTI_CHECK_RC(FsPerfCommsSend("writepattern 0 4096 1 1024\n" FSPERF_EOF_STR), VINF_SUCCESS);
     5500    AssertCompile(RT_ELEMENTS(g_abPattern1) == 1);
     5501    RTTESTI_CHECK_RC(RTFileRead(hFile0, abBuf, 1024, NULL), VINF_SUCCESS);
     5502    RTTESTI_CHECK(ASMMemIsAllU8(abBuf, 1024, g_abPattern1[0]));
     5503    RTTESTI_CHECK_RC(RTFileRead(hFile0, abBuf, 1, NULL), VERR_EOF);
     5504
     5505    /*
     5506     * Have the host truncate the file.
     5507     */
     5508    RTTESTI_CHECK_RC(FsPerfCommsSend("truncate 0 1024" FSPERF_EOF_STR), VINF_SUCCESS);
     5509    RTTESTI_CHECK_RC(RTFileRead(hFile0, abBuf, 1, NULL), VERR_EOF);
     5510    RTTESTI_CHECK_RC(RTFileSeek(hFile0, 0, RTFILE_SEEK_BEGIN, NULL), VINF_SUCCESS);
     5511    RTTESTI_CHECK_RC(RTFileRead(hFile0, abBuf, 1024, NULL), VINF_SUCCESS);
     5512    AssertCompile(RT_ELEMENTS(g_abPattern0) == 1);
     5513    RTTESTI_CHECK(ASMMemIsAllU8(abBuf, 4096, g_abPattern0[0]));
     5514    RTTESTI_CHECK_RC(RTFileRead(hFile0, abBuf, 1, NULL), VERR_EOF);
    54855515
    54865516    RTTESTI_CHECK_RC(RTFileClose(hFile0), VINF_SUCCESS);
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