tstRTR0TimerDriver.cpp revision a0ed9c35186427ae0abbd14b1cfdf43bf2dc8659
0120c35c41a827e23a6e04fbd59299a187e0b22cvboxsync * IPRT R0 Testcase - Timers, driver program.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Copyright (C) 2009-2014 Oracle Corporation
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync * available from http://www.virtualbox.org. This file is free software;
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync * you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * The contents of this file may alternatively be used under the terms
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * of the Common Development and Distribution License Version 1.0
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * VirtualBox OSE distribution, in which case the provisions of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * CDDL are applicable instead of those of the GPL.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * You may elect to license modified versions of this file under the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * terms and conditions of either the GPL or the CDDL or both.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync/*******************************************************************************
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync* Header Files *
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync*******************************************************************************/
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync * Entry point.
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsyncextern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTEXITCODE rcExit = RTR3TestR0CommonDriverInit("tstRTR0Timer");
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_LATENCY_OMNI, "Latency omni timer");
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_LATENCY_OMNI_HIRES, "Latency omni hires timer");
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync * Standard timers.
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_BASIC, "Basic one shot");
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_BASIC, "Basic periodic");
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync# ifndef RT_OS_SOLARIS /* Solaris cannot call back into cyclic subsystem from a cyclic callback. */
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_RESTART, "Restart one shot from callback");
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_DESTROY, "Destroy one shot from callback");
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_CSSD_LOOPS, "Create-start-stop-destroy loops");
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTR3TestR0SimpleTestWithArg(TSTRTR0TIMER_PERIODIC_CHANGE_INTERVAL, i, "Change interval from callback, variation %u", i);
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_SPECIFIC, "One shot cpu specific");
0120c35c41a827e23a6e04fbd59299a187e0b22cvboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_SPECIFIC, "Periodic cpu specific");
a119cf803cc51463dc3d1d6c3fb4cd0ca3d34f0evboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_OMNI, "Periodic omni timer");
RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_CSSD_LOOPS_HIRES, "Create-start-stop-destroy loops, hires");
RTR3TestR0SimpleTestWithArg(TSTRTR0TIMER_PERIODIC_CHANGE_INTERVAL, i, "Change interval from callback, hires, variation %u", i);