Fixed another test case failing with 16bits system time.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15895 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
6438ebc7e1
commit
baf05fcff5
|
@ -1323,10 +1323,10 @@ test_wait_threads();]]></value>
|
|||
<code>
|
||||
<value><![CDATA[chSysLock();
|
||||
time = chVTGetSystemTimeX();
|
||||
msg = chThdSuspendTimeoutS(&tr1, TIME_MS2I(1000));
|
||||
msg = chThdSuspendTimeoutS(&tr1, TIME_MS2I(10));
|
||||
chSysUnlock();
|
||||
test_assert_time_window(chTimeAddX(time, TIME_MS2I(1000)),
|
||||
chTimeAddX(time, TIME_MS2I(1000) + CH_CFG_ST_TIMEDELTA + 1),
|
||||
test_assert_time_window(chTimeAddX(time, TIME_MS2I(10)),
|
||||
chTimeAddX(time, TIME_MS2I(10) + CH_CFG_ST_TIMEDELTA + 1),
|
||||
"out of time window");
|
||||
test_assert(NULL == tr1, "not NULL");
|
||||
test_assert(MSG_TIMEOUT == msg, "wrong returned message");]]></value>
|
||||
|
@ -1879,7 +1879,7 @@ static CONDVAR_DECL(c1);
|
|||
*
|
||||
* @param[in] duration CPU pulse duration in milliseconds
|
||||
*/
|
||||
void test_cpu_pulse(unsigned duration) {
|
||||
void test_cpu_pulse(time_msecs_t duration) {
|
||||
systime_t start, end, now;
|
||||
|
||||
start = chThdGetTicksX(chThdGetSelfX());
|
||||
|
|
|
@ -100,10 +100,10 @@ static void rt_test_006_001_execute(void) {
|
|||
{
|
||||
chSysLock();
|
||||
time = chVTGetSystemTimeX();
|
||||
msg = chThdSuspendTimeoutS(&tr1, TIME_MS2I(1000));
|
||||
msg = chThdSuspendTimeoutS(&tr1, TIME_MS2I(10));
|
||||
chSysUnlock();
|
||||
test_assert_time_window(chTimeAddX(time, TIME_MS2I(1000)),
|
||||
chTimeAddX(time, TIME_MS2I(1000) + CH_CFG_ST_TIMEDELTA + 1),
|
||||
test_assert_time_window(chTimeAddX(time, TIME_MS2I(10)),
|
||||
chTimeAddX(time, TIME_MS2I(10) + CH_CFG_ST_TIMEDELTA + 1),
|
||||
"out of time window");
|
||||
test_assert(NULL == tr1, "not NULL");
|
||||
test_assert(MSG_TIMEOUT == msg, "wrong returned message");
|
||||
|
|
|
@ -67,7 +67,7 @@ static CONDVAR_DECL(c1);
|
|||
*
|
||||
* @param[in] duration CPU pulse duration in milliseconds
|
||||
*/
|
||||
void test_cpu_pulse(unsigned duration) {
|
||||
void test_cpu_pulse(time_msecs_t duration) {
|
||||
systime_t start, end, now;
|
||||
|
||||
start = chThdGetTicksX(chThdGetSelfX());
|
||||
|
|
Loading…
Reference in New Issue