mirror of https://github.com/rusefi/ChibiOS.git
Updated test suite.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13964 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
fb5e29f1c8
commit
c7c89b1682
|
@ -1132,7 +1132,7 @@ test_assert(chThdGetPriorityX() == prio, "unexpected priority level");]]></value
|
|||
</tags>
|
||||
<code>
|
||||
<value><![CDATA[prio = chThdGetPriorityX();
|
||||
chThdGetSelfX()->prio += 2;
|
||||
chThdGetSelfX()->hdr.pqueue.prio += 2;
|
||||
test_assert(chThdGetPriorityX() == prio + 2, "unexpected priority level");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
|
@ -1146,7 +1146,7 @@ test_assert(chThdGetPriorityX() == prio + 2, "unexpected priority level");]]></v
|
|||
<code>
|
||||
<value><![CDATA[p1 = chThdSetPriority(prio + 1);
|
||||
test_assert(p1 == prio, "unexpected returned priority level");
|
||||
test_assert(chThdGetSelfX()->prio == prio + 2, "unexpected priority level");
|
||||
test_assert(chThdGetSelfX()->hdr.pqueue.prio == prio + 2, "unexpected priority level");
|
||||
test_assert(chThdGetSelfX()->realprio == prio + 1, "unexpected returned real priority level");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
|
@ -1160,7 +1160,7 @@ test_assert(chThdGetSelfX()->realprio == prio + 1, "unexpected returned real pri
|
|||
<code>
|
||||
<value><![CDATA[p1 = chThdSetPriority(prio + 3);
|
||||
test_assert(p1 == prio + 1, "unexpected returned priority level");
|
||||
test_assert(chThdGetSelfX()->prio == prio + 3, "unexpected priority level");
|
||||
test_assert(chThdGetSelfX()->hdr.pqueue.prio == prio + 3, "unexpected priority level");
|
||||
test_assert(chThdGetSelfX()->realprio == prio + 3, "unexpected real priority level");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
|
@ -1173,7 +1173,7 @@ test_assert(chThdGetSelfX()->realprio == prio + 3, "unexpected real priority lev
|
|||
</tags>
|
||||
<code>
|
||||
<value><![CDATA[chSysLock();
|
||||
chThdGetSelfX()->prio = prio;
|
||||
chThdGetSelfX()->hdr.pqueue.prio = prio;
|
||||
chThdGetSelfX()->realprio = prio;
|
||||
chSysUnlock();]]></value>
|
||||
</code>
|
||||
|
@ -1475,7 +1475,7 @@ msg_t msg;]]></value>
|
|||
<code>
|
||||
<value><![CDATA[msg = chSemWaitTimeout(&sem1, TIME_IMMEDIATE);
|
||||
test_assert(msg == MSG_TIMEOUT, "wrong wake-up message");
|
||||
test_assert(queue_isempty(&sem1.queue), "queue not empty");
|
||||
test_assert(ch_queue_isempty(&sem1.queue), "queue not empty");
|
||||
test_assert(sem1.cnt == 0, "counter not zero");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
|
@ -1492,7 +1492,7 @@ test_assert(sem1.cnt == 0, "counter not zero");]]></value>
|
|||
msg = chSemWaitTimeout(&sem1, TIME_MS2I(500));
|
||||
test_wait_threads();
|
||||
test_assert(msg == MSG_OK, "wrong wake-up message");
|
||||
test_assert(queue_isempty(&sem1.queue), "queue not empty");
|
||||
test_assert(ch_queue_isempty(&sem1.queue), "queue not empty");
|
||||
test_assert(sem1.cnt == 0, "counter not zero");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
|
@ -1509,7 +1509,7 @@ for (i = 0; i < 5; i++) {
|
|||
test_emit_token('A' + i);
|
||||
msg = chSemWaitTimeout(&sem1, TIME_MS2I(50));
|
||||
test_assert(msg == MSG_TIMEOUT, "wrong wake-up message");
|
||||
test_assert(queue_isempty(&sem1.queue), "queue not empty");
|
||||
test_assert(ch_queue_isempty(&sem1.queue), "queue not empty");
|
||||
test_assert(sem1.cnt == 0, "counter not zero");
|
||||
}
|
||||
test_assert_sequence("ABCDE", "invalid sequence");
|
||||
|
@ -1614,7 +1614,7 @@ test_assert_sequence("A", "invalid sequence");]]></value>
|
|||
</tags>
|
||||
<code>
|
||||
<value><![CDATA[chSemSignalWait(&sem1, &sem1);
|
||||
test_assert(queue_isempty(&sem1.queue), "queue not empty");
|
||||
test_assert(ch_queue_isempty(&sem1.queue), "queue not empty");
|
||||
test_assert(sem1.cnt == 0, "counter not zero");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
|
@ -1627,7 +1627,7 @@ test_assert(sem1.cnt == 0, "counter not zero");]]></value>
|
|||
</tags>
|
||||
<code>
|
||||
<value><![CDATA[chSemSignalWait(&sem1, &sem1);
|
||||
test_assert(queue_isempty(&sem1.queue), "queue not empty");
|
||||
test_assert(ch_queue_isempty(&sem1.queue), "queue not empty");
|
||||
test_assert(sem1.cnt == 0, "counter not zero");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
|
@ -2319,7 +2319,7 @@ test_assert(!b, "not locked");]]></value>
|
|||
<code>
|
||||
<value><![CDATA[chMtxUnlock(&m1);
|
||||
test_assert(m1.owner == NULL, "still owned");
|
||||
test_assert(queue_isempty(&m1.queue), "queue not empty");]]></value>
|
||||
test_assert(ch_queue_isempty(&m1.queue), "queue not empty");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
<step>
|
||||
|
@ -2348,7 +2348,7 @@ test_assert(!b, "not locked");
|
|||
|
||||
chMtxUnlockAll();
|
||||
test_assert(m1.owner == NULL, "still owned");
|
||||
test_assert(queue_isempty(&m1.queue), "queue not empty");]]></value>
|
||||
test_assert(ch_queue_isempty(&m1.queue), "queue not empty");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
<step>
|
||||
|
@ -2444,7 +2444,7 @@ test_assert(m1.owner != NULL, "not owned");]]></value>
|
|||
<code>
|
||||
<value><![CDATA[chMtxUnlock(&m1);
|
||||
test_assert(m1.owner == NULL, "still owned");
|
||||
test_assert(queue_isempty(&m1.queue), "queue not empty");]]></value>
|
||||
test_assert(ch_queue_isempty(&m1.queue), "queue not empty");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
<step>
|
||||
|
@ -2477,7 +2477,7 @@ chSysLock();
|
|||
chMtxUnlockAllS();
|
||||
chSysUnlock();
|
||||
test_assert(m1.owner == NULL, "still owned");
|
||||
test_assert(queue_isempty(&m1.queue), "queue not empty");
|
||||
test_assert(ch_queue_isempty(&m1.queue), "queue not empty");
|
||||
test_assert(m1.cnt == 0, "invalid recursion counter");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
|
@ -2498,7 +2498,7 @@ test_assert(m1.owner != NULL, "not owned");
|
|||
test_assert(m1.cnt == 2, "invalid recursion counter");
|
||||
chMtxUnlockAll();
|
||||
test_assert(m1.owner == NULL, "still owned");
|
||||
test_assert(queue_isempty(&m1.queue), "queue not empty");
|
||||
test_assert(ch_queue_isempty(&m1.queue), "queue not empty");
|
||||
test_assert(m1.cnt == 0, "invalid recursion counter");]]></value>
|
||||
</code>
|
||||
</step>
|
||||
|
|
|
@ -770,7 +770,7 @@ static void rt_test_008_006_execute(void) {
|
|||
{
|
||||
chMtxUnlock(&m1);
|
||||
test_assert(m1.owner == NULL, "still owned");
|
||||
test_assert(queue_isempty(&m1.queue), "queue not empty");
|
||||
test_assert(ch_queue_isempty(&m1.queue), "queue not empty");
|
||||
}
|
||||
test_end_step(5);
|
||||
|
||||
|
@ -796,7 +796,7 @@ static void rt_test_008_006_execute(void) {
|
|||
chMtxUnlockAllS();
|
||||
chSysUnlock();
|
||||
test_assert(m1.owner == NULL, "still owned");
|
||||
test_assert(queue_isempty(&m1.queue), "queue not empty");
|
||||
test_assert(ch_queue_isempty(&m1.queue), "queue not empty");
|
||||
test_assert(m1.cnt == 0, "invalid recursion counter");
|
||||
}
|
||||
test_end_step(7);
|
||||
|
@ -814,7 +814,7 @@ static void rt_test_008_006_execute(void) {
|
|||
test_assert(m1.cnt == 2, "invalid recursion counter");
|
||||
chMtxUnlockAll();
|
||||
test_assert(m1.owner == NULL, "still owned");
|
||||
test_assert(queue_isempty(&m1.queue), "queue not empty");
|
||||
test_assert(ch_queue_isempty(&m1.queue), "queue not empty");
|
||||
test_assert(m1.cnt == 0, "invalid recursion counter");
|
||||
}
|
||||
test_end_step(8);
|
||||
|
|
Loading…
Reference in New Issue