tstRTR0TimerDriver.cpp revision 22ca45c3863de72dfa6ed4c31b712de13d61aa23
2675fd1e482998dd3a2e947b1aa7484317dd094evboxsync * IPRT R0 Testcase - Timers, driver program.
ce00b469e756b0f651b7aa020c9440e991d3442dvboxsync * Copyright (C) 2009-2014 Oracle Corporation
ce00b469e756b0f651b7aa020c9440e991d3442dvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
ce00b469e756b0f651b7aa020c9440e991d3442dvboxsync * available from http://www.virtualbox.org. This file is free software;
ce00b469e756b0f651b7aa020c9440e991d3442dvboxsync * you can redistribute it and/or modify it under the terms of the GNU
ce00b469e756b0f651b7aa020c9440e991d3442dvboxsync * General Public License (GPL) as published by the Free Software
2909d70e58e87e2111fdc5265d1ab32a08d557a3vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
2909d70e58e87e2111fdc5265d1ab32a08d557a3vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
2909d70e58e87e2111fdc5265d1ab32a08d557a3vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
2909d70e58e87e2111fdc5265d1ab32a08d557a3vboxsync * The contents of this file may alternatively be used under the terms
2909d70e58e87e2111fdc5265d1ab32a08d557a3vboxsync * of the Common Development and Distribution License Version 1.0
9875b4d1f31a47c8c0f71430b7c9e0113104d064vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
9875b4d1f31a47c8c0f71430b7c9e0113104d064vboxsync * VirtualBox OSE distribution, in which case the provisions of the
9875b4d1f31a47c8c0f71430b7c9e0113104d064vboxsync * CDDL are applicable instead of those of the GPL.
9875b4d1f31a47c8c0f71430b7c9e0113104d064vboxsync * You may elect to license modified versions of this file under the
9875b4d1f31a47c8c0f71430b7c9e0113104d064vboxsync * terms and conditions of either the GPL or the CDDL or both.
3d8242e90019d302159795040e410b3d774a4b0bvboxsync/*******************************************************************************
3d8242e90019d302159795040e410b3d774a4b0bvboxsync* Header Files *
3d8242e90019d302159795040e410b3d774a4b0bvboxsync*******************************************************************************/
f5840fca26963de38533fd43c951758c386ed60avboxsync RTEXITCODE rcExit = RTR3TestR0CommonDriverInit("tstRTR0Timer");
1400154bf298b7208c611e81321e0c82b721afd7vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_LATENCY_OMNI, "Latency omni timer");
1400154bf298b7208c611e81321e0c82b721afd7vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_LATENCY_OMNI_HIRES, "Latency omni hires timer");
af66a95ff0d75da2d50719eb14a686a9de7bff76vboxsync * Standard timers.
af66a95ff0d75da2d50719eb14a686a9de7bff76vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_BASIC, "Basic one shot");
af66a95ff0d75da2d50719eb14a686a9de7bff76vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_BASIC, "Basic periodic");
8d56e4d4be56ac2cbe2c03ce678432c6d8d1d7d3vboxsync# ifndef RT_OS_SOLARIS /* Solaris cannot call back into cyclic subsystem from a cyclic callback. */
8d56e4d4be56ac2cbe2c03ce678432c6d8d1d7d3vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_RESTART, "Restart one shot from callback");
8d56e4d4be56ac2cbe2c03ce678432c6d8d1d7d3vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_DESTROY, "Destroy one shot from callback");
5a1e64cee1eec57da3361ccda90351bd9c2e97a6vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_CSSD_LOOPS, "Create-start-stop-destroy loops");
5a1e64cee1eec57da3361ccda90351bd9c2e97a6vboxsync RTR3TestR0SimpleTestWithArg(TSTRTR0TIMER_PERIODIC_CHANGE_INTERVAL, i, "Change interval from callback, variation %u", i);
5a1e64cee1eec57da3361ccda90351bd9c2e97a6vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_SPECIFIC, "One shot cpu specific");
5a1e64cee1eec57da3361ccda90351bd9c2e97a6vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_SPECIFIC, "Periodic cpu specific");
fdb7d72fbf00de23e58088243b932f48684e83davboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_OMNI, "Periodic omni timer");
0a45dc6fc6692b57703e7e251f63b36476cc3435vboxsync * High resolution timers.
0a45dc6fc6692b57703e7e251f63b36476cc3435vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_BASIC_HIRES, "Basic hires one shot");
0a45dc6fc6692b57703e7e251f63b36476cc3435vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_BASIC_HIRES, "Basic hires periodic");
0a45dc6fc6692b57703e7e251f63b36476cc3435vboxsync# ifndef RT_OS_SOLARIS /* Solaris cannot call back into cyclic subsystem from a cyclic callback. */
0a45dc6fc6692b57703e7e251f63b36476cc3435vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_RESTART_HIRES, "Restart hires one shot from callback");
0a45dc6fc6692b57703e7e251f63b36476cc3435vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_DESTROY_HIRES, "Destroy hires one shot from callback");
0a45dc6fc6692b57703e7e251f63b36476cc3435vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_CSSD_LOOPS_HIRES, "Create-start-stop-destroy loops, hires");
e5ece1e2eda83c3ac47fc02dc4d343e430009381vboxsync RTR3TestR0SimpleTestWithArg(TSTRTR0TIMER_PERIODIC_CHANGE_INTERVAL, i, "Change interval from callback, hires, variation %u", i);
e5ece1e2eda83c3ac47fc02dc4d343e430009381vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_ONE_SHOT_SPECIFIC_HIRES, "One shot hires cpu specific");
4148135d7797d294ed20b17713f3792aedb4426dvboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_SPECIFIC_HIRES, "Periodic hires cpu specific");
e5ece1e2eda83c3ac47fc02dc4d343e430009381vboxsync RTR3TestR0SimpleTest(TSTRTR0TIMER_PERIODIC_OMNI, "Periodic omni hires timer");