VirtualBox

Changeset 47914 in vbox


Ignore:
Timestamp:
Aug 20, 2013 2:00:24 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
88221
Message:

tstR0ThreadPreemption: Added a approx. 1 minute timeout for the thread-context hooks test.

File:
1 edited

Legend:

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

    r47903 r47914  
    250250     */
    251251    RTTestSub(hTest, "RTThreadCtxHooks");
     252    uint64_t u64StartTS = RTTimeMilliTS();
     253    uint64_t cMsMax     = 60000;        /* ca. 1 minute timeout. */
     254    uint64_t cMsElapsed;
    252255    for (unsigned i = 0; i < 50; i++)
    253256    {
     
    265268        if (!(i % 10))
    266269            RTTestIPrintf(RTTESTLVL_ALWAYS, "RTThreadCtxHooks passed %u iteration(s)\n", i);
     270
     271        /* Check timeout and bail. */
     272        cMsElapsed = RTTimeMilliTS() - u64StartTS;
     273        if (cMsElapsed > cMsMax)
     274        {
     275            RTTestIPrintf(RTTESTLVL_INFO, "RTThreadCtxHooks Stopping iterations. %RU64 ms. for %u iterations.\n",
     276                          cMsElapsed, i);
     277            break;
     278        }
    267279    }
    268280
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