VirtualBox

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


Ignore:
Timestamp:
Oct 2, 2013 7:48:29 AM (11 years ago)
Author:
vboxsync
Message:

testcase/tstRTMp-1: Added sanity test for RTMpGetOnlineCoreCount().

File:
1 edited

Legend:

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

    r46638 r48808  
    130130    }
    131131
     132    RTCPUID cCoresOnline = RTMpGetOnlineCoreCount();
     133    if (cCoresOnline > 0)
     134        RTTestIPrintf(RTTESTLVL_ALWAYS, "RTMpGetOnlineCoreCount -> %d\n", (int)cCoresOnline);
     135    else
     136    {
     137        RTTestIFailed("RTMpGetOnlineCoreCount -> %d, expected <= %d\n", (int)cCoresOnline, (int)cCpusOnline);
     138        cCoresOnline = 1;
     139    }
     140    RTTESTI_CHECK(cCoresOnline <= cCpusOnline);
     141
    132142    RTCPUSET SetOnline;
    133143    pSet = RTMpGetOnlineSet(&SetOnline);
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