aboutsummaryrefslogtreecommitdiffstats
path: root/test/rt/source
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-10-03 08:50:33 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-10-03 08:50:33 +0000
commit7d2486a57ad2f63c30d00d1d4302e82e10467633 (patch)
tree41445cb98d7c42bf2afa607af7b32f4b22f3d002 /test/rt/source
parent3a6f91354464e430dfb78bc81031815d7700bb97 (diff)
downloadChibiOS-7d2486a57ad2f63c30d00d1d4302e82e10467633.tar.gz
ChibiOS-7d2486a57ad2f63c30d00d1d4302e82e10467633.tar.bz2
ChibiOS-7d2486a57ad2f63c30d00d1d4302e82e10467633.zip
Mailboxes refactory for consistency.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10747 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/rt/source')
-rw-r--r--test/rt/source/test/test_sequence_009.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/test/rt/source/test/test_sequence_009.c b/test/rt/source/test/test_sequence_009.c
index 671f829f9..92ec11b77 100644
--- a/test/rt/source/test/test_sequence_009.c
+++ b/test/rt/source/test/test_sequence_009.c
@@ -71,11 +71,11 @@ static MAILBOX_DECL(mb1, mb_buffer, MB_SIZE);
* expected.
* - [9.1.3] Testing the behavior of API when the mailbox is in reset
* state then return in active state.
- * - [9.1.4] Filling the mailbox using chMBPost() and chMBPostAhead()
- * once, no errors expected.
+ * - [9.1.4] Filling the mailbox using chMBPostTimeout() and
+ * chMBPostAheadTimeout() once, no errors expected.
* - [9.1.5] Testing intermediate conditions. Data pointers must be
* aligned, semaphore counters are checked.
- * - [9.1.6] Emptying the mailbox using chMBFetch(), no errors
+ * - [9.1.6] Emptying the mailbox using chMBFetchTimeout(), no errors
* expected.
* - [9.1.7] Posting and then fetching one more message, no errors
* expected.
@@ -117,24 +117,24 @@ static void test_009_001_execute(void) {
state then return in active state.*/
test_set_step(3);
{
- msg1 = chMBPost(&mb1, (msg_t)0, TIME_INFINITE);
+ msg1 = chMBPostTimeout(&mb1, (msg_t)0, TIME_INFINITE);
test_assert(msg1 == MSG_RESET, "not in reset state");
- msg1 = chMBPostAhead(&mb1, (msg_t)0, TIME_INFINITE);
+ msg1 = chMBPostAheadTimeout(&mb1, (msg_t)0, TIME_INFINITE);
test_assert(msg1 == MSG_RESET, "not in reset state");
- msg1 = chMBFetch(&mb1, &msg2, TIME_INFINITE);
+ msg1 = chMBFetchTimeout(&mb1, &msg2, TIME_INFINITE);
test_assert(msg1 == MSG_RESET, "not in reset state");
chMBResumeX(&mb1);
}
- /* [9.1.4] Filling the mailbox using chMBPost() and chMBPostAhead()
- once, no errors expected.*/
+ /* [9.1.4] Filling the mailbox using chMBPostTimeout() and
+ chMBPostAheadTimeout() once, no errors expected.*/
test_set_step(4);
{
for (i = 0; i < MB_SIZE - 1; i++) {
- msg1 = chMBPost(&mb1, 'B' + i, TIME_INFINITE);
+ msg1 = chMBPostTimeout(&mb1, 'B' + i, TIME_INFINITE);
test_assert(msg1 == MSG_OK, "wrong wake-up message");
}
- msg1 = chMBPostAhead(&mb1, 'A', TIME_INFINITE);
+ msg1 = chMBPostAheadTimeout(&mb1, 'A', TIME_INFINITE);
test_assert(msg1 == MSG_OK, "wrong wake-up message");
}
@@ -147,12 +147,12 @@ static void test_009_001_execute(void) {
test_assert_lock(mb1.rdptr == mb1.wrptr, "pointers not aligned");
}
- /* [9.1.6] Emptying the mailbox using chMBFetch(), no errors
+ /* [9.1.6] Emptying the mailbox using chMBFetchTimeout(), no errors
expected.*/
test_set_step(6);
{
for (i = 0; i < MB_SIZE; i++) {
- msg1 = chMBFetch(&mb1, &msg2, TIME_INFINITE);
+ msg1 = chMBFetchTimeout(&mb1, &msg2, TIME_INFINITE);
test_assert(msg1 == MSG_OK, "wrong wake-up message");
test_emit_token(msg2);
}
@@ -163,9 +163,9 @@ static void test_009_001_execute(void) {
expected.*/
test_set_step(7);
{
- msg1 = chMBPost(&mb1, 'B' + i, TIME_INFINITE);
+ msg1 = chMBPostTimeout(&mb1, 'B' + i, TIME_INFINITE);
test_assert(msg1 == MSG_OK, "wrong wake-up message");
- msg1 = chMBFetch(&mb1, &msg2, TIME_INFINITE);
+ msg1 = chMBFetchTimeout(&mb1, &msg2, TIME_INFINITE);
test_assert(msg1 == MSG_OK, "wrong wake-up message");
}
@@ -286,9 +286,9 @@ static void test_009_002_execute(void) {
expected.*/
test_set_step(6);
{
- msg1 = chMBPost(&mb1, 'B' + i, TIME_INFINITE);
+ msg1 = chMBPostTimeout(&mb1, 'B' + i, TIME_INFINITE);
test_assert(msg1 == MSG_OK, "wrong wake-up message");
- msg1 = chMBFetch(&mb1, &msg2, TIME_INFINITE);
+ msg1 = chMBFetchTimeout(&mb1, &msg2, TIME_INFINITE);
test_assert(msg1 == MSG_OK, "wrong wake-up message");
}
@@ -318,11 +318,11 @@ static const testcase_t test_009_002 = {
*
* <h2>Test Steps</h2>
* - [9.3.1] Filling the mailbox.
- * - [9.3.2] Testing chMBPost(), chMBPostI(), chMBPostAhead() and
- * chMBPostAheadI() timeout.
+ * - [9.3.2] Testing chMBPostTimeout(), chMBPostI(),
+ * chMBPostAheadTimeout() and chMBPostAheadI() timeout.
* - [9.3.3] Resetting the mailbox. The mailbox is then returned in
* active state.
- * - [9.3.4] Testing chMBFetch() and chMBFetchI() timeout.
+ * - [9.3.4] Testing chMBFetchTimeout() and chMBFetchI() timeout.
* .
*/
@@ -342,22 +342,22 @@ static void test_009_003_execute(void) {
test_set_step(1);
{
for (i = 0; i < MB_SIZE; i++) {
- msg1 = chMBPost(&mb1, 'B' + i, TIME_INFINITE);
+ msg1 = chMBPostTimeout(&mb1, 'B' + i, TIME_INFINITE);
test_assert(msg1 == MSG_OK, "wrong wake-up message");
}
}
- /* [9.3.2] Testing chMBPost(), chMBPostI(), chMBPostAhead() and
- chMBPostAheadI() timeout.*/
+ /* [9.3.2] Testing chMBPostTimeout(), chMBPostI(),
+ chMBPostAheadTimeout() and chMBPostAheadI() timeout.*/
test_set_step(2);
{
- msg1 = chMBPost(&mb1, 'X', 1);
+ msg1 = chMBPostTimeout(&mb1, 'X', 1);
test_assert(msg1 == MSG_TIMEOUT, "wrong wake-up message");
chSysLock();
msg1 = chMBPostI(&mb1, 'X');
chSysUnlock();
test_assert(msg1 == MSG_TIMEOUT, "wrong wake-up message");
- msg1 = chMBPostAhead(&mb1, 'X', 1);
+ msg1 = chMBPostAheadTimeout(&mb1, 'X', 1);
test_assert(msg1 == MSG_TIMEOUT, "wrong wake-up message");
chSysLock();
msg1 = chMBPostAheadI(&mb1, 'X');
@@ -373,10 +373,10 @@ static void test_009_003_execute(void) {
chMBResumeX(&mb1);
}
- /* [9.3.4] Testing chMBFetch() and chMBFetchI() timeout.*/
+ /* [9.3.4] Testing chMBFetchTimeout() and chMBFetchI() timeout.*/
test_set_step(4);
{
- msg1 = chMBFetch(&mb1, &msg2, 1);
+ msg1 = chMBFetchTimeout(&mb1, &msg2, 1);
test_assert(msg1 == MSG_TIMEOUT, "wrong wake-up message");
chSysLock();
msg1 = chMBFetchI(&mb1, &msg2);