VirtualBox

Changeset 6750 in vbox for trunk/src/VBox/Runtime/testcase


Ignore:
Timestamp:
Feb 2, 2008 1:32:01 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27832
Message:

Added a optimization testcase mode.

File:
1 edited

Legend:

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

    r6749 r6750  
    202202
    203203
    204 int main()
     204int main(int argc, char **argv)
    205205{
    206206    int rc = RTR3Init(false, 0);
     
    212212    RTPrintf("tstSemMutex: TESTING...\n");
    213213
    214     /* threads, seconds, yield, quiet */
    215     Test1(1, 1, true, false);
    216     Test1(2, 1, true, false);
    217     Test1(10, 1, true, false);
    218     Test1(10, 10, false, false);
    219 
    220     RTPrintf("tstSemMutex: benchmarking... \n");
    221     for (unsigned cThreads = 1; cThreads < 32; cThreads++)
    222         Test1(cThreads, 2, false, true);
     214    if (argc == 1)
     215    {
     216        /*    threads, seconds,  yield,  quiet */
     217        Test1(      1,       1,   true,  false);
     218        Test1(      2,       1,   true,  false);
     219        Test1(     10,       1,   true,  false);
     220        Test1(     10,      10,  false,  false);
     221
     222        RTPrintf("tstSemMutex: benchmarking...\n");
     223        for (unsigned cThreads = 1; cThreads < 32; cThreads++)
     224            Test1(cThreads,  2,  false,   true);
     225
     226        /** @todo add a testcase where some stuff times out. */
     227    }
     228    else
     229    {
     230        /*    threads, seconds,  yield,  quiet */
     231        RTPrintf("tstSemMutex: benchmarking...\n");
     232        Test1(      1,       3,  false,   true);
     233        Test1(      1,       3,  false,   true);
     234        Test1(      1,       3,  false,   true);
     235        Test1(      2,       3,  false,   true);
     236        Test1(      2,       3,  false,   true);
     237        Test1(      2,       3,  false,   true);
     238        Test1(      3,       3,  false,   true);
     239        Test1(      3,       3,  false,   true);
     240        Test1(      3,       3,  false,   true);
     241    }
    223242
    224243    if (!g_cErrors)
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