VirtualBox

Changeset 48147 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 29, 2013 12:03:25 PM (11 years ago)
Author:
vboxsync
Message:

tstRTR0Timer: Fix testcase to skip one-shot timers when it's not supported.

File:
1 edited

Legend:

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

    r47745 r48147  
    395395            PRTTIMER pTimer;
    396396            uint32_t fFlags = TSTRTR0TIMER_IS_HIRES(uOperation) ? RTTIMER_FLAGS_HIGH_RES : 0;
    397             RTR0TESTR0_CHECK_RC_BREAK(RTTimerCreateEx(&pTimer, 0, fFlags, tstRTR0TimerCallbackU32Counter, &State),
    398                                       VINF_SUCCESS);
     397            int rc = RTTimerCreateEx(&pTimer, 0, fFlags, tstRTR0TimerCallbackU32Counter, &State);
     398            if (rc == VERR_NOT_SUPPORTED)
     399            {
     400                RTR0TestR0Info("one-shot timer are not supported, skipping\n");
     401                break;
     402            }
     403            RTR0TESTR0_CHECK_RC_BREAK(rc, VINF_SUCCESS);
    399404
    400405            do /* break loop */
     
    443448            for (uint32_t iTest = 0; iTest < 2; iTest++)
    444449            {
    445                 RTR0TESTR0_CHECK_RC_BREAK(RTTimerCreateEx(&pTimer, 0, fFlags, tstRTR0TimerCallbackRestartOnce, &State),
    446                                           VINF_SUCCESS);
     450                int rc = RTTimerCreateEx(&pTimer, 0, fFlags, tstRTR0TimerCallbackRestartOnce, &State);
     451                if (rc == VERR_NOT_SUPPORTED)
     452                {
     453                    RTR0TestR0Info("one-shot timer are not supported, skipping\n");
     454                    break;
     455                }
     456                RTR0TESTR0_CHECK_RC_BREAK(rc, VINF_SUCCESS);
    447457
    448458                RT_ZERO(State);
     
    471481            for (uint32_t iTest = 0; iTest < 2; iTest++)
    472482            {
    473                 RTR0TESTR0_CHECK_RC_BREAK(RTTimerCreateEx(&pTimer, 0, fFlags, tstRTR0TimerCallbackDestroyOnce, &State),
    474                                           VINF_SUCCESS);
     483                int rc = RTTimerCreateEx(&pTimer, 0, fFlags, tstRTR0TimerCallbackDestroyOnce, &State);
     484                if (rc == VERR_NOT_SUPPORTED)
     485                {
     486                    RTR0TestR0Info("one-shot timer are not supported, skipping\n");
     487                    break;
     488                }
     489                RTR0TESTR0_CHECK_RC_BREAK(rc, VINF_SUCCESS);
    475490
    476491                RT_ZERO(State);
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