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>
|
<code>
|
||||||
<value><![CDATA[chSysLock();
|
<value><![CDATA[chSysLock();
|
||||||
time = chVTGetSystemTimeX();
|
time = chVTGetSystemTimeX();
|
||||||
msg = chThdSuspendTimeoutS(&tr1, TIME_MS2I(1000));
|
msg = chThdSuspendTimeoutS(&tr1, TIME_MS2I(10));
|
||||||
chSysUnlock();
|
chSysUnlock();
|
||||||
test_assert_time_window(chTimeAddX(time, TIME_MS2I(1000)),
|
test_assert_time_window(chTimeAddX(time, TIME_MS2I(10)),
|
||||||
chTimeAddX(time, TIME_MS2I(1000) + CH_CFG_ST_TIMEDELTA + 1),
|
chTimeAddX(time, TIME_MS2I(10) + CH_CFG_ST_TIMEDELTA + 1),
|
||||||
"out of time window");
|
"out of time window");
|
||||||
test_assert(NULL == tr1, "not NULL");
|
test_assert(NULL == tr1, "not NULL");
|
||||||
test_assert(MSG_TIMEOUT == msg, "wrong returned message");]]></value>
|
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
|
* @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;
|
systime_t start, end, now;
|
||||||
|
|
||||||
start = chThdGetTicksX(chThdGetSelfX());
|
start = chThdGetTicksX(chThdGetSelfX());
|
||||||
|
|
|
@ -100,10 +100,10 @@ static void rt_test_006_001_execute(void) {
|
||||||
{
|
{
|
||||||
chSysLock();
|
chSysLock();
|
||||||
time = chVTGetSystemTimeX();
|
time = chVTGetSystemTimeX();
|
||||||
msg = chThdSuspendTimeoutS(&tr1, TIME_MS2I(1000));
|
msg = chThdSuspendTimeoutS(&tr1, TIME_MS2I(10));
|
||||||
chSysUnlock();
|
chSysUnlock();
|
||||||
test_assert_time_window(chTimeAddX(time, TIME_MS2I(1000)),
|
test_assert_time_window(chTimeAddX(time, TIME_MS2I(10)),
|
||||||
chTimeAddX(time, TIME_MS2I(1000) + CH_CFG_ST_TIMEDELTA + 1),
|
chTimeAddX(time, TIME_MS2I(10) + CH_CFG_ST_TIMEDELTA + 1),
|
||||||
"out of time window");
|
"out of time window");
|
||||||
test_assert(NULL == tr1, "not NULL");
|
test_assert(NULL == tr1, "not NULL");
|
||||||
test_assert(MSG_TIMEOUT == msg, "wrong returned message");
|
test_assert(MSG_TIMEOUT == msg, "wrong returned message");
|
||||||
|
|
|
@ -67,7 +67,7 @@ static CONDVAR_DECL(c1);
|
||||||
*
|
*
|
||||||
* @param[in] duration CPU pulse duration in milliseconds
|
* @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;
|
systime_t start, end, now;
|
||||||
|
|
||||||
start = chThdGetTicksX(chThdGetSelfX());
|
start = chThdGetTicksX(chThdGetSelfX());
|
||||||
|
|
Loading…
Reference in New Issue