VirtualBox

Changeset 63166 in vbox


Ignore:
Timestamp:
Aug 8, 2016 2:05:43 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109784
Message:

tstRTDirCreateUniqueNumbered.cpp: fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTDirCreateUniqueNumbered.cpp

    r62819 r63166  
    6969        if (RT_FAILURE(rc))
    7070        {
    71             RTTestIFailed("RTDirCreateUniqueNumbered(%s) call #%u -> %Rrc\n", szName, i, rc);
     71            /* Random selection (system) isn't 100% predictable, so we must give a little
     72               leeway for the 2+ digit tests.  (Using random is essential for performance.) */
     73            if (cchDigits == 1 || rc != VERR_ALREADY_EXISTS || i < cTimes - 1)
     74                RTTestIFailed("RTDirCreateUniqueNumbered(%s) call #%u -> %Rrc\n", szName, i, rc);
    7275            break;
    7376        }
     
    8184
    8285    /* Try to create one more, which shouldn't be possible. */
    83     if (RT_SUCCESS(rc))
     86    if (RT_SUCCESS(rc) && i == cTimes + 1)
    8487    {
    8588        char szName[RTPATH_MAX];
Note: See TracChangeset for help on using the changeset viewer.

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