VirtualBox

Changeset 32753 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Sep 24, 2010 9:57:49 AM (14 years ago)
Author:
vboxsync
Message:

tstRTR0Timer: fixes, works on linux now.

Location:
trunk/src/VBox/Runtime/testcase
Files:
2 edited

Legend:

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

    r32749 r32753  
    182182        pState->aShotNsTSes[iShot] = RTTimeSystemNanoTS();
    183183    if (pState->fPeriodic)
    184         RTR0TESTR0_CHECK_MSG(iShot == iTick, ("iShot=%u iTick=%u\n", iShot, iTick));
     184        RTR0TESTR0_CHECK_MSG(iShot + 1 == iTick, ("iShot=%u iTick=%u\n", iShot, iTick));
    185185    else
    186186        RTR0TESTR0_CHECK_MSG(iTick == 1, ("iShot=%u iTick=%u\n", iShot, iTick));
     
    716716                /* reset the state */
    717717                for (uint32_t iCpu = 0; iCpu < RTCPUSET_MAX_CPUS; iCpu++)
     718                {
     719                    paStates[iCpu].u64Start = 0;
     720                    paStates[iCpu].u64Last  = 0;
    718721                    ASMAtomicWriteU32(&paStates[iCpu].cTicks, 0);
     722                }
    719723
    720724                /* run it for 1 second. */
     
    757761                        RTR0TESTR0_CHECK_MSG(RTCpuSetIsMemberByIndex(&OnlineSet, iCpu), ("%d\n", iCpu));
    758762                        RTR0TESTR0_CHECK_MSG(paStates[iCpu].cTicks <= cMaxTicks && paStates[iCpu].cTicks >= cMinTicks,
    759                                              ("min=%u, ticks=%u, avg=%u max=%u, iCpu=%u, interval=%'u, elapsed=%'u/%'u\n",
     763                                             ("min=%u, ticks=%u, avg=%u max=%u, iCpu=%u, interval=%'u, elapsed=%'llu/%'llu\n",
    760764                                              cMinTicks, paStates[iCpu].cTicks, cAvgTicks, cMaxTicks, iCpu,
    761765                                              cNsInterval, cNsElapsed, cNsElapsedX));
  • trunk/src/VBox/Runtime/testcase/tstRTR0TimerDriver.cpp

    r32736 r32753  
    6565    if (RTTestErrorCount(g_hTest) == 0)
    6666    {
    67 #  if 0
     67#  if 1
    6868        RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_RESTART, "Restart one shot from callback");
    6969        RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_DESTROY, "Destroy one shot from callback");
     
    7474        RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_SPECIFIC, "One shot cpu specific");
    7575        RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_SPECIFIC, "Periodic cpu specific");
     76        RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_OMNI, "Periodic omni timer");
    7677    }
    7778# endif
     
    8586    if (RTTestErrorCount(g_hTest) == 0)
    8687    {
    87 #  if 0
     88#  if 1
    8889        RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_RESTART_HIRES, "Restart hires one shot from callback");
    8990        RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_DESTROY_HIRES, "Destroy hires one shot from callback");
     
    9495        RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_SPECIFIC_HIRES, "One shot hires cpu specific");
    9596        RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_SPECIFIC_HIRES, "Periodic hires cpu specific");
     97        RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_OMNI, "Periodic omni hires timer");
    9698    }
    9799# endif
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