VirtualBox

Changeset 99393 in vbox


Ignore:
Timestamp:
Apr 13, 2023 5:09:53 PM (23 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156833
Message:

Guest Control: Completely revamped / overhauled the (now legacy) stream output parsing code and added lots of documentation to it. This way it should be a lot clearer what it's supposed to be doing. Also, this now should fix some nasty bugs in that area we had in the past especially with some Linux guests (i.e. OL6), which sometimes send output data in a very unsteady manner. Also overhauled the testcases while at it [build fix].

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp

    r99392 r99393  
    939939    char         *pszParsed    = pszStart; /* Points to data considered as being parsed already. */
    940940
    941     Log4Func(("Current @ %zu/%zu:\n%.*RhXd\n", m_offBuf, m_cbUsed, RT_MIN(cbLeftParsed, _1K), pszStart));
     941    Log4Func(("Current @ %zu/%zu:\n%.*Rhxd\n", m_offBuf, m_cbUsed, RT_MIN(cbLeftParsed, _1K), pszStart));
    942942
    943943    size_t cTerm = 0;
     
    10091009
    10101010        if (cbLeftParsed)
    1011             Log4Func(("Next iteration @ %zu:\n%.*RhXd\n", pszParsed - pszStart, cbLeftParsed, pszParsed));
     1011            Log4Func(("Next iteration @ %zu:\n%.*Rhxd\n", pszParsed - pszStart, cbLeftParsed, pszParsed));
    10121012    }
    10131013
    10141014    if (cbLeftParsed)
    1015         Log4Func(("Done @ %zu:\n%.*RhXd\n", pszParsed - pszStart, cbLeftParsed, pszParsed));
     1015        Log4Func(("Done @ %zu:\n%.*Rhxd\n", pszParsed - pszStart, cbLeftParsed, pszParsed));
    10161016
    10171017    m_offBuf += pszParsed - pszStart; /* Only account really parsed content. */
  • trunk/src/VBox/Main/testcase/tstGuestCtrlParseBuffer.cpp

    r99392 r99393  
    206206    AssertRCReturn(rc, RTEXITCODE_FAILURE);
    207207
    208     size_t cbFileSize;
     208    uint64_t cbFileSize;
    209209    rc = RTFileQuerySize(fh, &cbFileSize);
    210210    AssertRCReturn(rc, RTEXITCODE_FAILURE);
     
    219219    unsigned i = 0;
    220220
    221     size_t cbToRead = cbFileSize;
     221    uint64_t cbToRead = cbFileSize;
    222222
    223223    for (unsigned a = 0; a < 32; a++)
     
    320320    for (unsigned iTest = 0; iTest < RT_ELEMENTS(g_aTestBlocks); iTest++)
    321321    {
    322         RTTestIPrintf(RTTESTLVL_DEBUG, "=> Block test #%u:\n'%.*RhXd\n", iTest, g_aTestBlocks[iTest].cbData, g_aTestBlocks[iTest].pbData);
     322        RTTestIPrintf(RTTESTLVL_DEBUG, "=> Block test #%u:\n'%.*Rhxd\n", iTest, g_aTestBlocks[iTest].cbData, g_aTestBlocks[iTest].pbData);
    323323
    324324        GuestToolboxStream stream;
     
    365365    for (unsigned iTest = 0; iTest < RT_ELEMENTS(g_aTestStream); iTest++)
    366366    {
    367         RTTestIPrintf(RTTESTLVL_DEBUG, "=> Stream test #%u\n%.*RhXd\n",
     367        RTTestIPrintf(RTTESTLVL_DEBUG, "=> Stream test #%u\n%.*Rhxd\n",
    368368                      iTest, g_aTestStream[iTest].cbData, g_aTestStream[iTest].pbData);
    369369
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