diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-17 11:52:50 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-17 11:52:50 +0000 |
commit | 155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1 (patch) | |
tree | cb27035ab0b6a7c157f992d9edb6a2c7c5d669e9 /test | |
parent | 120b97e07051b35a67be2a173b51b7edc2a0ae19 (diff) | |
download | ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.tar.gz ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.tar.bz2 ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6169 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r-- | test/testbmk.c | 12 | ||||
-rw-r--r-- | test/testmbox.c | 46 | ||||
-rw-r--r-- | test/testsem.c | 6 |
3 files changed, 32 insertions, 32 deletions
diff --git a/test/testbmk.c b/test/testbmk.c index 5149323a6..fe43c6aff 100644 --- a/test/testbmk.c +++ b/test/testbmk.c @@ -209,7 +209,7 @@ msg_t thread4(void *p) { do {
chSchGoSleepS(CH_STATE_SUSPENDED);
msg = self->p_u.rdymsg;
- } while (msg == RDY_OK);
+ } while (msg == MSG_OK);
chSysUnlock();
return 0;
}
@@ -225,10 +225,10 @@ static void bmk4_execute(void) { test_start_timer(1000);
do {
chSysLock();
- chSchWakeupS(tp, RDY_OK);
- chSchWakeupS(tp, RDY_OK);
- chSchWakeupS(tp, RDY_OK);
- chSchWakeupS(tp, RDY_OK);
+ chSchWakeupS(tp, MSG_OK);
+ chSchWakeupS(tp, MSG_OK);
+ chSchWakeupS(tp, MSG_OK);
+ chSchWakeupS(tp, MSG_OK);
chSysUnlock();
n += 4;
#if defined(SIMULATOR)
@@ -236,7 +236,7 @@ static void bmk4_execute(void) { #endif
} while (!test_timer_done);
chSysLock();
- chSchWakeupS(tp, RDY_TIMEOUT);
+ chSchWakeupS(tp, MSG_TIMEOUT);
chSysUnlock();
test_wait_threads();
diff --git a/test/testmbox.c b/test/testmbox.c index 1ca34dadc..a9f57e961 100644 --- a/test/testmbox.c +++ b/test/testmbox.c @@ -87,26 +87,26 @@ static void mbox1_execute(void) { */
for (i = 0; i < MB_SIZE - 1; i++) {
msg1 = chMBPost(&mb1, 'B' + i, TIME_INFINITE);
- test_assert(2, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(2, msg1 == MSG_OK, "wrong wake-up message");
}
msg1 = chMBPostAhead(&mb1, 'A', TIME_INFINITE);
- test_assert(3, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(3, msg1 == MSG_OK, "wrong wake-up message");
/*
* Testing post timeout.
*/
msg1 = chMBPost(&mb1, 'X', 1);
- test_assert(4, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(4, msg1 == MSG_TIMEOUT, "wrong wake-up message");
chSysLock();
msg1 = chMBPostI(&mb1, 'X');
chSysUnlock();
- test_assert(5, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(5, msg1 == MSG_TIMEOUT, "wrong wake-up message");
msg1 = chMBPostAhead(&mb1, 'X', 1);
- test_assert(6, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(6, msg1 == MSG_TIMEOUT, "wrong wake-up message");
chSysLock();
msg1 = chMBPostAheadI(&mb1, 'X');
chSysUnlock();
- test_assert(7, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(7, msg1 == MSG_TIMEOUT, "wrong wake-up message");
/*
* Testing final conditions.
@@ -120,7 +120,7 @@ static void mbox1_execute(void) { */
for (i = 0; i < MB_SIZE; i++) {
msg1 = chMBFetch(&mb1, &msg2, TIME_INFINITE);
- test_assert(11, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(11, msg1 == MSG_OK, "wrong wake-up message");
test_emit_token(msg2);
}
test_assert_sequence(12, "ABCDE");
@@ -129,9 +129,9 @@ static void mbox1_execute(void) { * Testing buffer circularity.
*/
msg1 = chMBPost(&mb1, 'B' + i, TIME_INFINITE);
- test_assert(13, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(13, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBFetch(&mb1, &msg2, TIME_INFINITE);
- test_assert(14, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(14, msg1 == MSG_OK, "wrong wake-up message");
test_assert(15, mb1.mb_buffer == mb1.mb_wrptr, "write pointer not aligned to base");
test_assert(16, mb1.mb_buffer == mb1.mb_rdptr, "read pointer not aligned to base");
@@ -139,11 +139,11 @@ static void mbox1_execute(void) { * Testing fetch timeout.
*/
msg1 = chMBFetch(&mb1, &msg2, 1);
- test_assert(17, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(17, msg1 == MSG_TIMEOUT, "wrong wake-up message");
chSysLock();
msg1 = chMBFetchI(&mb1, &msg2);
chSysUnlock();
- test_assert(18, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(18, msg1 == MSG_TIMEOUT, "wrong wake-up message");
/*
* Testing final conditions.
@@ -157,22 +157,22 @@ static void mbox1_execute(void) { */
chSysLock();
msg1 = chMBPostI(&mb1, 'A');
- test_assert(22, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(22, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostI(&mb1, 'B');
- test_assert(23, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(23, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostI(&mb1, 'C');
- test_assert(24, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(24, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostI(&mb1, 'D');
- test_assert(25, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(25, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostI(&mb1, 'E');
chSysUnlock();
- test_assert(26, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(26, msg1 == MSG_OK, "wrong wake-up message");
test_assert(27, mb1.mb_rdptr == mb1.mb_wrptr, "pointers not aligned");
for (i = 0; i < MB_SIZE; i++) {
chSysLock();
msg1 = chMBFetchI(&mb1, &msg2);
chSysUnlock();
- test_assert(28, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(28, msg1 == MSG_OK, "wrong wake-up message");
test_emit_token(msg2);
}
test_assert_sequence(29, "ABCDE");
@@ -182,22 +182,22 @@ static void mbox1_execute(void) { chSysLock();
msg1 = chMBPostAheadI(&mb1, 'E');
- test_assert(33, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(33, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostAheadI(&mb1, 'D');
- test_assert(34, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(34, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostAheadI(&mb1, 'C');
- test_assert(35, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(35, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostAheadI(&mb1, 'B');
- test_assert(36, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(36, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostAheadI(&mb1, 'A');
chSysUnlock();
- test_assert(37, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(37, msg1 == MSG_OK, "wrong wake-up message");
test_assert(38, mb1.mb_rdptr == mb1.mb_wrptr, "pointers not aligned");
for (i = 0; i < MB_SIZE; i++) {
chSysLock();
msg1 = chMBFetchI(&mb1, &msg2);
chSysUnlock();
- test_assert(39, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(39, msg1 == MSG_OK, "wrong wake-up message");
test_emit_token(msg2);
}
test_assert_sequence(40, "ABCDE");
diff --git a/test/testsem.c b/test/testsem.c index 0d74f3613..604a6954d 100644 --- a/test/testsem.c +++ b/test/testsem.c @@ -150,7 +150,7 @@ static void sem2_execute(void) { * Testing special case TIME_IMMEDIATE.
*/
msg = chSemWaitTimeout(&sem1, TIME_IMMEDIATE);
- test_assert(1, msg == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(1, msg == MSG_TIMEOUT, "wrong wake-up message");
test_assert(2, queue_isempty(&sem1.s_queue), "queue not empty");
test_assert(3, sem1.s_cnt == 0, "counter not zero");
@@ -161,7 +161,7 @@ static void sem2_execute(void) { thread2, 0);
msg = chSemWaitTimeout(&sem1, MS2ST(500));
test_wait_threads();
- test_assert(4, msg == RDY_OK, "wrong wake-up message");
+ test_assert(4, msg == MSG_OK, "wrong wake-up message");
test_assert(5, queue_isempty(&sem1.s_queue), "queue not empty");
test_assert(6, sem1.s_cnt == 0, "counter not zero");
@@ -173,7 +173,7 @@ static void sem2_execute(void) { for (i = 0; i < 5; i++) {
test_emit_token('A' + i);
msg = chSemWaitTimeout(&sem1, MS2ST(500));
- test_assert(7, msg == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(7, msg == MSG_TIMEOUT, "wrong wake-up message");
test_assert(8, queue_isempty(&sem1.s_queue), "queue not empty");
test_assert(9, sem1.s_cnt == 0, "counter not zero");
}
|