VirtualBox

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


Ignore:
Timestamp:
Apr 14, 2013 1:21:56 AM (12 years ago)
Author:
vboxsync
Message:

tstR0ThreadPreemption: Added a RTThreadPreemptIsPendingTrusty test.

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

Legend:

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

    r44529 r45538  
    9292        }
    9393
     94        case TSTR0THREADPREMEPTION_IS_TRUSTY:
     95            if (RTThreadPreemptIsPendingTrusty())
     96                RTStrPrintf(pszErr, cchErr, "!Untrusty");
     97            break;
     98
    9499        case TSTR0THREADPREMEPTION_IS_PENDING:
    95100        {
  • trunk/src/VBox/Runtime/testcase/tstR0ThreadPreemption.h

    r44529 r45538  
    3737    TSTR0THREADPREMEPTION_SANITY_FAILURE,
    3838    TSTR0THREADPREMEPTION_BASIC,
     39    TSTR0THREADPREMEPTION_IS_TRUSTY,
    3940    TSTR0THREADPREMEPTION_IS_PENDING,
    4041    TSTR0THREADPREMEPTION_NESTED
  • trunk/src/VBox/Runtime/testcase/tstR0ThreadPreemptionDriver.cpp

    r45264 r45538  
    163163
    164164    /*
     165     * Is it trusty.
     166     */
     167    RTTestSub(hTest, "RTThreadPreemptIsPendingTrusty");
     168    Req.Hdr.u32Magic = SUPR0SERVICEREQHDR_MAGIC;
     169    Req.Hdr.cbReq = sizeof(Req);
     170    Req.szMsg[0] = '\0';
     171    RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstR0ThreadPreemption", sizeof("tstR0ThreadPreemption") - 1,
     172                                             TSTR0THREADPREMEPTION_IS_TRUSTY, 0, &Req.Hdr), VINF_SUCCESS);
     173    if (RT_FAILURE(rc))
     174        return RTTestSummaryAndDestroy(hTest);
     175    if (Req.szMsg[0] == '!')
     176        RTTestIFailed("%s", &Req.szMsg[1]);
     177    else if (Req.szMsg[0])
     178        RTTestIPrintf(RTTESTLVL_ALWAYS, "%s", Req.szMsg);
     179
     180    /*
    165181     * Stay in ring-0 until preemption is pending.
    166182     */
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