VirtualBox

Changeset 45199 in vbox for trunk/src/VBox/Storage


Ignore:
Timestamp:
Mar 27, 2013 9:33:28 AM (12 years ago)
Author:
vboxsync
Message:

Storage/testcase/tstVDSnap: Delete leftover images from a previous run

File:
1 edited

Legend:

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

    r44529 r45199  
    230230    unsigned   idDiff = 0; /* Diff ID counter for the filename */
    231231
     232    /* Delete all images from a previous run. */
     233    RTFileDelete(pTest->pcszBaseImage);
     234    for (unsigned i = 0; i < pTest->cIterations; i++)
     235    {
     236        char *pszDiffFilename = NULL;
     237
     238        rc = RTStrAPrintf(&pszDiffFilename, "tstVDSnapDiff%u.%s", i, pTest->pcszDiffSuff);
     239        if (RT_SUCCESS(rc))
     240        {
     241            if (RTFileExists(pszDiffFilename))
     242                RTFileDelete(pszDiffFilename);
     243            RTStrFree(pszDiffFilename);
     244        }
     245    }
     246
    232247    /* Create the virtual disk test data */
    233248    pbTestPattern = (uint8_t *)RTMemAlloc(pTest->cbTestPattern);
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