VirtualBox

Changeset 57070 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 24, 2015 12:01:32 PM (9 years ago)
Author:
vboxsync
Message:

testcase/tstRTR0ThreadPreemption: check for failures for RTThreadCtxHookDisable as well.

File:
1 edited

Legend:

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

    r57069 r57070  
    428428            }
    429429
    430             RTThreadCtxHookDisable(hThreadCtx);
    431 
    432             fRegistered = RTThreadCtxHookIsEnabled(hThreadCtx);
    433             if (fRegistered)
    434             {
    435                 RTThreadCtxHookDestroy(hThreadCtx);
    436                 RTMemFree(pCtxData);
    437                 RTStrPrintf(pszErr, cchErr, "!RTThreadCtxHookIsEnabled return true when hooks are disabled");
    438                 break;
    439             }
     430            rc = RTThreadCtxHookDisable(hThreadCtx);
     431            if (RT_SUCCESS(rc))
     432            {
     433                fRegistered = RTThreadCtxHookIsEnabled(hThreadCtx);
     434                if (fRegistered)
     435                {
     436                    RTThreadCtxHookDestroy(hThreadCtx);
     437                    RTMemFree(pCtxData);
     438                    RTStrPrintf(pszErr, cchErr, "!RTThreadCtxHookIsEnabled return true when hooks are disabled");
     439                    break;
     440                }
     441            }
     442            else
     443                RTStrPrintf(pszErr, cchErr, "!RTThreadCtxHookDisable failed, returns %Rrc!", rc);
    440444
    441445            Assert(RTThreadPreemptIsEnabled(NIL_RTTHREAD));
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