?? readme
字號(hào):
****************************************************************** * Copyright (c) 2002, Intel Corporation. All rights reserved. * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com * This file is licensed under the GPL license. For the full content * of this license, see the COPYING file at the top level of this * source tree. Addapted by J. Vidal <jvidal@disca.upv.es> to RTLinux 10-12-02. ******************************************************************TEST: 1-1.c * Test that timer_settime() sets the time until the next timer * expiration to value.it_value and arms the timer. * Test is identical to timer_create() 1-1.c. * Steps: * 1. Set up sigevent structure to send signal SIGTOTEST on timer * expiration. * 2. Set up sigaction structure to catch signal SIGTOTEST on timer * expiration * 3. Create timer using timer_create(). * 4. Activate timer using timer_settime() and then sleep. * 5. If signal handler is called, continue. Otherwise, fail. * 6. If signal handler was called and the time left in sleep ~= the * delta between the timer time and sleep time, then PASS. * Otherwise, FAIL. * * For this test, signal SIGTOTEST will be used, clock CLOCK_REALTIME * will be used.******************************************************************TEST: 12-1.c * * Test that timer_settime() sets errno = EINVAL if no timers have been * created yet.******************************************************************TEST: 13-1.c * * Test that timer_settime() sets errno = EINVAL if: * - value.it_value is not = 0 (so disabled) * AND * - value.*.it_nsec < 0 * or * - value.*.it_nsec >= 1000 million * This includes standard boundary tests. * * Signal SIGTOTEST is used. * Clock CLOCK_REALTIME is used. * Each test listed in the multidimensional array. * element 0 - value.it_value.tv_sec * element 1 - value.it_value.tv_nsec * element 2 - value.it_interval.tv_sec * element 3 - value.it_interval.tv_nsec******************************************************************TEST: 3-1.c * Test that if value.it_value = 0, the timer is disarmed. * Steps: * 1. Set up sigevent structure to send signal SIGTOTEST on timer * expiration. * 2. Set up sigaction structure to catch signal SIGTOTEST on timer * expiration * 3. Create timer using timer_create(). * 4. Activate timer using timer_settime() and then sleep. * 5. Fail if signal handler is called. * 6. If signal handler is not called, then PASS. * * For this test, signal SIGTOTEST will be used, clock CLOCK_REALTIME * will be used. * value.it_value = 0******************************************************************TEST: 5-1.c * Test that timer_settime() uses an absolute clock if TIMER_ABSTIME is * set in flags. * * Uses the same steps as 1-1.c to determine how long the timer lasted. * In order to use an absolute clock, the timer time is determined by: * - Get current time. * - Set the timer to TIMERSEC+current time. * - After the timer goes off, ensure that the timer went off within * ACCEPTABLEDELTA of TIMERSEC seconds. * * For this test, signal SIGTOTEST will be used, clock CLOCK_REALTIME * will be used.******************************************************************TEST: 5-2.c * Test that if timer_settime() is using an absolute clock and the * time has already taken place when the test is running that * timer_settime() succeeds and the expiration notification is made. * * Steps: * - Setup and then call timer_settime() with date in past. * - If timer_settime() returns -1 fail. * - If signal handler is not called after a sufficient amount of sleeping, * fail. * *** There is a potential false failure if timer_settime() does not * return before the signal is sent. TBD if this _should_ happen in * reality, though. * For this test, signal SIGTOTEST will be used, clock CLOCK_REALTIME * will be used.******************************************************************TEST: 5-3.c * Test that if timer_settime() is using an absolute clock and the * time has already taken place when the test is running that * timer_settime() succeeds and the expiration notification is made. * * Test for a variety of times which keep getting SUBTRACTAMOUNT * of time away from the time at the start of the test. * Note: This test was made in response to a bug seen where timers * would return -1 intermittently on time values generally * > 9000 seconds before the current time.******************************************************************TEST: 8-1.c * * Test that timer_settime() will return ovalue.it_value = 0 * and ovalue.it_interval = 0 if the timer was previously disarmed * because it had just been created. * * For this test, signal SIGCONT will be used so that the test will * not abort. Clock CLOCK_REALTIME will be used.******************************************************************TEST: 8-2.c * * Test that timer_settime() will return ovalue.it_value = 0 * and ovalue.it_interval = 0 if * the timer was previously disarmed because it had just expired with * no repeating interval. * * For this test, signal SIGCONT will be used so that the test will * not abort. Clock CLOCK_REALTIME will be used. * set up timer that will expire * let timer expire (just call sleep()) * assign oits parameters so they _must_ be reset******************************************************************TEST: 8-3.c * * Test that timer_settime() will return ovalue.it_value = the previous * amount of time before the timer would have expired. * - set up a timer to expire in TIMERSEC seconds * - sleep for TIMERSEC-TIMELEFT seconds * - set up a new timer * - compare TIMELEFT and the value in ovalue.it_value and ensure they * are within ACCEPTABLEDELTA of each other * * For this test, signal SIGCONT will be used so that the test will * not abort. Clock CLOCK_REALTIME will be used.******************************************************************TEST: 9-1.c * * Test that timers are not allowed to expire before their scheduled * time. * * Test for a variety of timer values on relative timers. * * For this test, signal SIGTOTEST will be used, clock CLOCK_REALTIME * will be used. * set up signal set containing SIGTOTEST that will be used * in call to sigwait immediately after timer is set * set up timer to perform action SIGTOTEST on expiration
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -