VirtualBox

Ignore:
Timestamp:
Jul 9, 2008 2:09:02 PM (16 years ago)
Author:
vboxsync
Message:

Extended the testcase with the RTGetCur/MaxFrequency APIs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstMp-1.cpp

    r10419 r10426  
    8282        for (int iCpu = 0; iCpu < RTCPUSET_MAX_CPUS; iCpu++)
    8383        {
     84            RTCPUID idCpu = RTMpCpuIdFromSetIndex(iCpu);
    8485            if (RTCpuSetIsMemberByIndex(&Set, iCpu))
    8586            {
    86                 RTPrintf("tstMp-1: %2d - id %d\n", iCpu, RTMpCpuIdFromSetIndex(iCpu));
    87                 if (!RTMpIsCpuPossible(RTMpCpuIdFromSetIndex(iCpu)))
     87                RTPrintf("tstMp-1: %2d - id %d: %u/%u MHz\n", iCpu, idCpu, RTMpGetCurFrequency(idCpu), RTMpGetMaxFrequency(idCpu));
     88                if (!RTMpIsCpuPossible(idCpu))
    8889                {
    8990                    RTPrintf("tstMp-1: FAILURE: Cpu with index %d is returned by RTCpuSet but not RTMpIsCpuPossible!\n", iCpu);
     
    9192                }
    9293            }
    93             else if (RTMpIsCpuPossible(RTMpCpuIdFromSetIndex(iCpu)))
     94            else if (RTMpIsCpuPossible(idCpu))
    9495            {
    9596                RTPrintf("tstMp-1: FAILURE: Cpu with index %d is returned by RTMpIsCpuPossible but not RTCpuSet!\n", iCpu);
     97                g_cErrors++;
     98            }
     99            else if (RTMpGetCurFrequency(idCpu) != 0)
     100            {
     101                RTPrintf("tstMp-1: FAILURE: RTMpGetCurFrequency(%d[idx=%d]) didn't return 0 as it should\n", (int)idCpu, iCpu);
     102                g_cErrors++;
     103            }
     104            else if (RTMpGetMaxFrequency(idCpu) != 0)
     105            {
     106                RTPrintf("tstMp-1: FAILURE: RTMpGetCurFrequency(%d[idx=%d]) didn't return 0 as it should\n", (int)idCpu, iCpu);
    96107                g_cErrors++;
    97108            }
     
    147158            if (RTCpuSetIsMemberByIndex(&SetOnline, iCpu))
    148159            {
    149                 RTPrintf("tstMp-1: %2d - id %d\n", iCpu, RTMpCpuIdFromSetIndex(iCpu));
     160                RTCPUID idCpu = RTMpCpuIdFromSetIndex(iCpu);
     161                RTPrintf("tstMp-1: %2d - id %d: %u/%u MHz\n", iCpu, idCpu, RTMpGetCurFrequency(idCpu), RTMpGetMaxFrequency(idCpu));
    150162                if (!RTCpuSetIsMemberByIndex(&Set, iCpu))
    151163                {
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