VirtualBox

vbox的更動 26338 路徑 trunk/src/VBox/VMM/testcase


忽略:
時間撮記:
2010-2-9 上午12:54:20 (15 年 以前)
作者:
vboxsync
訊息:

AsyncCompletion: Introduce range locks to prevent concurrent access to the same file range. Fixes inconsistent data for tasks with unaligned tasks where we have to use bounce buffers (i.e block table updates when a VDI file grows)

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/testcase/tstPDMAsyncCompletionStress.cpp

    r26240 r26338  
    4949#include <iprt/thread.h>
    5050#include <iprt/param.h>
     51#include <iprt/message.h>
    5152
    5253#define TESTCASE "tstPDMAsyncCompletionStress"
     
    179180
    180181        if (memcmp(pbBuf, pbTestPattern, cbCompare))
    181             AssertMsgFailed(("Unexpected data for off=%RTfoff size=%u\n", pTestTask->off, pTestTask->DataSeg.cbSeg));
     182        {
     183            unsigned idx = 0;
     184
     185            while (   (pbBuf[idx] == pbTestPattern[idx])
     186                   && (idx < cbCompare))
     187                idx++;
     188
     189            RTMsgError("Unexpected data for off=%RTfoff size=%u\n"
     190                       "Expected %c got %c\n",
     191                       pTestTask->off + idx, pTestTask->DataSeg.cbSeg,
     192                       pbTestPattern[idx], pbBuf[idx]);
     193            RTAssertDebugBreak();
     194        }
    182195
    183196        pbBuf  += cbCompare;
     
    315328    int uRnd = RTRandU32Ex(0, 100);
    316329
    317     return (uRnd < iPercentage); /* This should be enough for our purpose */
     330    return (uRnd <= iPercentage); /* This should be enough for our purpose */
    318331}
    319332
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette