VirtualBox

Changeset 27655 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Mar 23, 2010 11:30:55 PM (15 years ago)
Author:
vboxsync
Message:

Make testing forward and backwards merges easier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/testcase/tstVDSnap.cpp

    r27187 r27655  
    6060    /** Numer of allocated blocks in the base image in percent */
    6161    uint32_t    uAllocatedBlocks;
     62    /** Merge direction */
     63    bool        fForward;
    6264} VDSNAPTEST, *PVDSNAPTEST;
    6365
     
    338340                     uStartMerge,
    339341                     uEndMerge);
    340             rc = VDMerge(pVD, uStartMerge, uEndMerge, NULL);
     342            if (pTest->fForward)
     343                rc = VDMerge(pVD, uStartMerge, uEndMerge, NULL);
     344            else
     345                rc = VDMerge(pVD, uEndMerge, uStartMerge, NULL);
    341346            CHECK("VDMerge()");
    342347
     
    409414    Test.uChangeSegChance     = 50; /* % */
    410415    Test.uAllocatedBlocks     = 50; /* 50% allocated */
     416    Test.fForward             = true;
     417    tstVDOpenCreateWriteMerge(&Test);
     418
     419    /* Same test with backwards merge */
     420    Test.fForward             = false;
    411421    tstVDOpenCreateWriteMerge(&Test);
    412422
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