aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/nasa_osal/configuration.xml18
-rw-r--r--test/nasa_osal/source/test/test_root.c29
-rw-r--r--test/nasa_osal/source/test/test_root.h41
-rw-r--r--test/nasa_osal/source/test/test_sequence_001.c206
-rw-r--r--test/nasa_osal/source/test/test_sequence_001.h16
-rw-r--r--test/nasa_osal/source/test/test_sequence_002.c161
-rw-r--r--test/nasa_osal/source/test/test_sequence_002.h16
-rw-r--r--test/nasa_osal/source/test/test_sequence_003.c168
-rw-r--r--test/nasa_osal/source/test/test_sequence_003.h16
-rw-r--r--test/nasa_osal/source/test/test_sequence_004.c154
-rw-r--r--test/nasa_osal/source/test/test_sequence_004.h16
-rw-r--r--test/nasa_osal/source/test/test_sequence_005.c140
-rw-r--r--test/nasa_osal/source/test/test_sequence_005.h16
-rw-r--r--test/nasa_osal/source/test/test_sequence_006.c110
-rw-r--r--test/nasa_osal/source/test/test_sequence_006.h16
-rw-r--r--test/nil/configuration.xml48
-rw-r--r--test/nil/source/test/test_root.c7
-rw-r--r--test/nil/source/test/test_root.h9
-rw-r--r--test/nil/source/test/test_sequence_001.c59
-rw-r--r--test/nil/source/test/test_sequence_002.c114
-rw-r--r--test/nil/source/test/test_sequence_003.c52
-rw-r--r--test/nil/source/test/test_sequence_004.c154
-rw-r--r--test/nil/source/test/test_sequence_005.c120
-rw-r--r--test/nil/source/test/test_sequence_006.c116
-rw-r--r--test/rt/configuration.xml8
25 files changed, 815 insertions, 995 deletions
diff --git a/test/nasa_osal/configuration.xml b/test/nasa_osal/configuration.xml
index 1afc1c907..1aadc9b04 100644
--- a/test/nasa_osal/configuration.xml
+++ b/test/nasa_osal/configuration.xml
@@ -46,6 +46,9 @@ THD_WORKING_AREA(wa_test4, TASKS_STACK_SIZE);]]></value>
<description>
<value>This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to threading.</value>
</description>
+ <condition>
+ <value />
+ </condition>
<shared_code>
<value><![CDATA[#include "osapi.h"
@@ -620,6 +623,9 @@ test_assert_sequence("ABC", "events order violation");]]></value>
<description>
<value>This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to queues</value>
</description>
+ <condition>
+ <value />
+ </condition>
<shared_code>
<value><![CDATA[#include <string.h>
@@ -1006,6 +1012,9 @@ test_assert(err == OS_QUEUE_EMPTY, "unexpected error code");]]></value>
<description>
<value>This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to timers</value>
</description>
+ <condition>
+ <value />
+ </condition>
<shared_code>
<value><![CDATA[#include <string.h>
@@ -1446,6 +1455,9 @@ test_assert(err == OS_SUCCESS, "timer stop failed");]]></value>
<description>
<value>This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to binary semaphores.</value>
</description>
+ <condition>
+ <value />
+ </condition>
<shared_code>
<value><![CDATA[#include "osapi.h"
@@ -1871,6 +1883,9 @@ test_assert(err == OS_SEM_TIMEOUT, "unexpected error code");]]></value>
<description>
<value>This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to counter semaphores.</value>
</description>
+ <condition>
+ <value />
+ </condition>
<shared_code>
<value><![CDATA[#include "osapi.h"
@@ -2258,6 +2273,9 @@ test_assert(err == OS_SEM_TIMEOUT, "unexpected error code");]]></value>
<description>
<value>This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to mutex semaphores.</value>
</description>
+ <condition>
+ <value />
+ </condition>
<shared_code>
<value><![CDATA[#include "osapi.h"
diff --git a/test/nasa_osal/source/test/test_root.c b/test/nasa_osal/source/test/test_root.c
index 7ef9d7087..2081b7714 100644
--- a/test/nasa_osal/source/test/test_root.c
+++ b/test/nasa_osal/source/test/test_root.c
@@ -1,18 +1,4 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
/**
* @mainpage Test Suite Specification
@@ -33,15 +19,14 @@
/**
* @file test_root.c
* @brief Test Suite root structures code.
- *
- * @addtogroup SPC5_TEST_ROOT
- * @{
*/
#include "hal.h"
#include "ch_test.h"
#include "test_root.h"
+#if !defined(__DOXYGEN__)
+
/*===========================================================================*/
/* Module exported variables. */
/*===========================================================================*/
@@ -63,9 +48,9 @@ const testcase_t * const *test_suite[] = {
/* Shared code. */
/*===========================================================================*/
-THD_WORKING_AREA(wa_test1, TASKS_STACK_SIZE);
-THD_WORKING_AREA(wa_test2, TASKS_STACK_SIZE);
-THD_WORKING_AREA(wa_test3, TASKS_STACK_SIZE);
+THD_WORKING_AREA(wa_test1, TASKS_STACK_SIZE);
+THD_WORKING_AREA(wa_test2, TASKS_STACK_SIZE);
+THD_WORKING_AREA(wa_test3, TASKS_STACK_SIZE);
THD_WORKING_AREA(wa_test4, TASKS_STACK_SIZE);
-/** @} */
+#endif /* !defined(__DOXYGEN__) */
diff --git a/test/nasa_osal/source/test/test_root.h b/test/nasa_osal/source/test/test_root.h
index c8a421ce8..b065fc63d 100644
--- a/test/nasa_osal/source/test/test_root.h
+++ b/test/nasa_osal/source/test/test_root.h
@@ -1,25 +1,8 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
/**
* @file test_root.h
* @brief Test Suite root structures header.
- *
- * @addtogroup SPC5_TEST_ROOT
- * @{
*/
#ifndef _SPC5_TEST_ROOT_H_
@@ -32,6 +15,8 @@
#include "test_sequence_005.h"
#include "test_sequence_006.h"
+#if !defined(__DOXYGEN__)
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
@@ -49,16 +34,16 @@ extern "C" {
/* Shared definitions. */
/*===========================================================================*/
-#define TEST_SUITE_NAME "NASA OSAL over ChibiOS/RT Test Suite"
-
-#define TASKS_BASE_PRIORITY 200
-#define TASKS_STACK_SIZE 256
-
-extern THD_WORKING_AREA(wa_test1, TASKS_STACK_SIZE);
-extern THD_WORKING_AREA(wa_test2, TASKS_STACK_SIZE);
-extern THD_WORKING_AREA(wa_test3, TASKS_STACK_SIZE);
+#define TEST_SUITE_NAME "NASA OSAL over ChibiOS/RT Test Suite"
+
+#define TASKS_BASE_PRIORITY 200
+#define TASKS_STACK_SIZE 256
+
+extern THD_WORKING_AREA(wa_test1, TASKS_STACK_SIZE);
+extern THD_WORKING_AREA(wa_test2, TASKS_STACK_SIZE);
+extern THD_WORKING_AREA(wa_test3, TASKS_STACK_SIZE);
extern THD_WORKING_AREA(wa_test4, TASKS_STACK_SIZE);
-#endif /* _SPC5_TEST_ROOT_H_ */
+#endif /* !defined(__DOXYGEN__) */
-/** @} */
+#endif /* _SPC5_TEST_ROOT_H_ */
diff --git a/test/nasa_osal/source/test/test_sequence_001.c b/test/nasa_osal/source/test/test_sequence_001.c
index 2e176b984..253dc63c0 100644
--- a/test/nasa_osal/source/test/test_sequence_001.c
+++ b/test/nasa_osal/source/test/test_sequence_001.c
@@ -1,25 +1,11 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
#include "hal.h"
#include "ch_test.h"
#include "test_root.h"
/**
- * @page test_sequence_001 Tasks Functionality
+ * @page test_sequence_001 [1] Tasks Functionality
*
* File: @ref test_sequence_001.c
*
@@ -39,41 +25,41 @@
* Shared code.
****************************************************************************/
-#include "osapi.h"
-
-static void test_task1(void) {
-
- test_emit_token('A');
-}
-
-static void test_task2(void) {
-
- test_emit_token('B');
-}
-
-static void test_task3(void) {
-
- test_emit_token('C');
-}
-
-static void test_task4(void) {
-
- test_emit_token('D');
-}
-
-static void delete_handler(void) {
-
- test_emit_token('C');
-}
-
-static void test_task_delete(void) {
-
- test_emit_token('A');
- (void) OS_TaskInstallDeleteHandler(delete_handler);
- while (!OS_TaskDeleteCheck()) {
- (void) OS_TaskDelay(1);
- }
- test_emit_token('B');
+#include "osapi.h"
+
+static void test_task1(void) {
+
+ test_emit_token('A');
+}
+
+static void test_task2(void) {
+
+ test_emit_token('B');
+}
+
+static void test_task3(void) {
+
+ test_emit_token('C');
+}
+
+static void test_task4(void) {
+
+ test_emit_token('D');
+}
+
+static void delete_handler(void) {
+
+ test_emit_token('C');
+}
+
+static void test_task_delete(void) {
+
+ test_emit_token('A');
+ (void) OS_TaskInstallDeleteHandler(delete_handler);
+ while (!OS_TaskDeleteCheck()) {
+ (void) OS_TaskDelay(1);
+ }
+ test_emit_token('B');
}
/****************************************************************************
@@ -81,33 +67,33 @@ static void test_task_delete(void) {
****************************************************************************/
/**
- * @page test_001_001 OS_TaskCreate() errors
+ * @page test_001_001 [1.1] OS_TaskCreate() errors
*
* <h2>Description</h2>
* Parameters checking in OS_TaskCreate() is tested.
*
* <h2>Test Steps</h2>
- * - OS_TaskCreate() is invoked with task_id set to NULL, an error is
- * expected.
- * - OS_TaskCreate() is invoked with task_name set to NULL, an error is
- * expected.
- * - OS_TaskCreate() is invoked with stack_pointer set to NULL, an
+ * - [1.1.1] OS_TaskCreate() is invoked with task_id set to NULL, an
+ * error is expected.
+ * - [1.1.2] OS_TaskCreate() is invoked with task_name set to NULL, an
* error is expected.
- * - OS_TaskCreate() is invoked with a very long task name, an error is
- * expected.
- * - OS_TaskCreate() is invoked with priority below and above allowed
- * range, an error is expected.
- * - OS_TaskCreate() is invoked with a stack size below minimum, an
+ * - [1.1.3] OS_TaskCreate() is invoked with stack_pointer set to NULL,
+ * an error is expected.
+ * - [1.1.4] OS_TaskCreate() is invoked with a very long task name, an
* error is expected.
- * - OS_TaskCreate() is invoked twice with duplicated name and then
- * duplicated stack, an error is expected in both cases.
+ * - [1.1.5] OS_TaskCreate() is invoked with priority below and above
+ * allowed range, an error is expected.
+ * - [1.1.6] OS_TaskCreate() is invoked with a stack size below
+ * minimum, an error is expected.
+ * - [1.1.7] OS_TaskCreate() is invoked twice with duplicated name and
+ * then duplicated stack, an error is expected in both cases.
* .
*/
static void test_001_001_execute(void) {
- /* OS_TaskCreate() is invoked with task_id set to NULL, an error is
- expected.*/
+ /* [1.1.1] OS_TaskCreate() is invoked with task_id set to NULL, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -123,8 +109,8 @@ static void test_001_001_execute(void) {
test_assert_sequence("", "task executed");
}
- /* OS_TaskCreate() is invoked with task_name set to NULL, an error is
- expected.*/
+ /* [1.1.2] OS_TaskCreate() is invoked with task_name set to NULL, an
+ error is expected.*/
test_set_step(2);
{
int32 err;
@@ -141,8 +127,8 @@ static void test_001_001_execute(void) {
test_assert_sequence("", "task executed");
}
- /* OS_TaskCreate() is invoked with stack_pointer set to NULL, an
- error is expected.*/
+ /* [1.1.3] OS_TaskCreate() is invoked with stack_pointer set to NULL,
+ an error is expected.*/
test_set_step(3);
{
int32 err;
@@ -159,8 +145,8 @@ static void test_001_001_execute(void) {
test_assert_sequence("", "task executed");
}
- /* OS_TaskCreate() is invoked with a very long task name, an error is
- expected.*/
+ /* [1.1.4] OS_TaskCreate() is invoked with a very long task name, an
+ error is expected.*/
test_set_step(4);
{
int32 err;
@@ -177,8 +163,8 @@ static void test_001_001_execute(void) {
test_assert_sequence("", "task executed");
}
- /* OS_TaskCreate() is invoked with priority below and above allowed
- range, an error is expected.*/
+ /* [1.1.5] OS_TaskCreate() is invoked with priority below and above
+ allowed range, an error is expected.*/
test_set_step(5);
{
int32 err;
@@ -205,8 +191,8 @@ static void test_001_001_execute(void) {
test_assert_sequence("", "task executed");
}
- /* OS_TaskCreate() is invoked with a stack size below minimum, an
- error is expected.*/
+ /* [1.1.6] OS_TaskCreate() is invoked with a stack size below
+ minimum, an error is expected.*/
test_set_step(6);
{
int32 err;
@@ -223,8 +209,8 @@ static void test_001_001_execute(void) {
test_assert_sequence("", "task executed");
}
- /* OS_TaskCreate() is invoked twice with duplicated name and then
- duplicated stack, an error is expected in both cases.*/
+ /* [1.1.7] OS_TaskCreate() is invoked twice with duplicated name and
+ then duplicated stack, an error is expected in both cases.*/
test_set_step(7);
{
int32 err;
@@ -284,7 +270,7 @@ static const testcase_t test_001_001 = {
};
/**
- * @page test_001_002 OS_TaskCreate() priority ordering
+ * @page test_001_002 [1.2] OS_TaskCreate() priority ordering
*
* <h2>Description</h2>
* Four tasks are created at different priorities and in different
@@ -292,21 +278,22 @@ static const testcase_t test_001_001 = {
* regardless the creation order.
*
* <h2>Test Steps</h2>
- * - Four tasks are created in priority order from low to high.
- * - Tasks are made runnable atomically and their execution order
- * tested.
- * - Four tasks are created in priority order from high to low.
- * - Tasks are made runnable atomically and their execution order
- * tested.
- * - Four tasks are created in an not ordered way.
- * - Tasks are made runnable atomically and their execution order
- * tested.
+ * - [1.2.1] Four tasks are created in priority order from low to high.
+ * - [1.2.2] Tasks are made runnable atomically and their execution
+ * order tested.
+ * - [1.2.3] Four tasks are created in priority order from high to low.
+ * - [1.2.4] Tasks are made runnable atomically and their execution
+ * order tested.
+ * - [1.2.5] Four tasks are created in an not ordered way.
+ * - [1.2.6] Tasks are made runnable atomically and their execution
+ * order tested.
* .
*/
static void test_001_002_execute(void) {
- /* Four tasks are created in priority order from low to high.*/
+ /* [1.2.1] Four tasks are created in priority order from low to
+ high.*/
test_set_step(1);
{
int32 err;
@@ -349,15 +336,16 @@ static void test_001_002_execute(void) {
test_assert(err == OS_SUCCESS, "task 1 creation failed");
}
- /* Tasks are made runnable atomically and their execution order
- tested.*/
+ /* [1.2.2] Tasks are made runnable atomically and their execution
+ order tested.*/
test_set_step(2);
{
OS_TaskDelay(5);
test_assert_sequence("ABCD", "task order violation");
}
- /* Four tasks are created in priority order from high to low.*/
+ /* [1.2.3] Four tasks are created in priority order from high to
+ low.*/
test_set_step(3);
{
int32 err;
@@ -400,15 +388,15 @@ static void test_001_002_execute(void) {
test_assert(err == OS_SUCCESS, "task 4 creation failed");
}
- /* Tasks are made runnable atomically and their execution order
- tested.*/
+ /* [1.2.4] Tasks are made runnable atomically and their execution
+ order tested.*/
test_set_step(4);
{
OS_TaskDelay(5);
test_assert_sequence("ABCD", "task order violation");
}
- /* Four tasks are created in an not ordered way.*/
+ /* [1.2.5] Four tasks are created in an not ordered way.*/
test_set_step(5);
{
int32 err;
@@ -451,8 +439,8 @@ static void test_001_002_execute(void) {
test_assert(err == OS_SUCCESS, "task 3 creation failed");
}
- /* Tasks are made runnable atomically and their execution order
- tested.*/
+ /* [1.2.6] Tasks are made runnable atomically and their execution
+ order tested.*/
test_set_step(6);
{
OS_TaskDelay(5);
@@ -468,21 +456,21 @@ static const testcase_t test_001_002 = {
};
/**
- * @page test_001_003 OS_TaskDelete() errors
+ * @page test_001_003 [1.3] OS_TaskDelete() errors
*
* <h2>Description</h2>
* Parameters checking in OS_TaskDelete() is tested.
*
* <h2>Test Steps</h2>
- * - OS_TaskDelete() is invoked with task_id set to -1, an error is
- * expected.
+ * - [1.3.1] OS_TaskDelete() is invoked with task_id set to -1, an
+ * error is expected.
* .
*/
static void test_001_003_execute(void) {
- /* OS_TaskDelete() is invoked with task_id set to -1, an error is
- expected.*/
+ /* [1.3.1] OS_TaskDelete() is invoked with task_id set to -1, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -500,23 +488,23 @@ static const testcase_t test_001_003 = {
};
/**
- * @page test_001_004 OS_TaskDelete() and OS_TaskInstallDeleteHandler() functionality
+ * @page test_001_004 [1.4] OS_TaskDelete() and OS_TaskInstallDeleteHandler() functionality
*
* <h2>Description</h2>
* OS_TaskDelete() and OS_TaskInstallDeleteHandler() are tested for
* functionality.
*
* <h2>Test Steps</h2>
- * - Creating a task executing an infinite loop.
- * - Letting the task run for a while then deleting it. A check is
- * performed on the correct execution of the delete handler.
+ * - [1.4.1] Creating a task executing an infinite loop.
+ * - [1.4.2] Letting the task run for a while then deleting it. A check
+ * is performed on the correct execution of the delete handler.
* .
*/
static void test_001_004_execute(void) {
uint32 tid;
- /* Creating a task executing an infinite loop.*/
+ /* [1.4.1] Creating a task executing an infinite loop.*/
test_set_step(1);
{
int32 err;
@@ -531,8 +519,8 @@ static void test_001_004_execute(void) {
test_assert(err == OS_SUCCESS, "deletable task creation failed");
}
- /* Letting the task run for a while then deleting it. A check is
- performed on the correct execution of the delete handler.*/
+ /* [1.4.2] Letting the task run for a while then deleting it. A check
+ is performed on the correct execution of the delete handler.*/
test_set_step(2);
{
int32 err;
diff --git a/test/nasa_osal/source/test/test_sequence_001.h b/test/nasa_osal/source/test/test_sequence_001.h
index 9ba5dc4be..bd39c2d2c 100644
--- a/test/nasa_osal/source/test/test_sequence_001.h
+++ b/test/nasa_osal/source/test/test_sequence_001.h
@@ -1,17 +1,3 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
extern const testcase_t * const test_sequence_001[];
diff --git a/test/nasa_osal/source/test/test_sequence_002.c b/test/nasa_osal/source/test/test_sequence_002.c
index 1332af727..35a856882 100644
--- a/test/nasa_osal/source/test/test_sequence_002.c
+++ b/test/nasa_osal/source/test/test_sequence_002.c
@@ -1,25 +1,11 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
#include "hal.h"
#include "ch_test.h"
#include "test_root.h"
/**
- * @page test_sequence_002 Queues Functionality
+ * @page test_sequence_002 [2] Queues Functionality
*
* File: @ref test_sequence_002.c
*
@@ -39,25 +25,25 @@
* Shared code.
****************************************************************************/
-#include <string.h>
-
-#include "osapi.h"
-
-uint32 qid, tid;
-
-#define WRITER_NUM_MESSAGES 16
-#define MESSAGE_SIZE 20
-
-static void test_task_writer(void) {
- unsigned i;
- int32 err;
-
- for (i = 0; i < WRITER_NUM_MESSAGES; i++) {
- err = OS_QueuePut(qid, "Hello World", 12, 0);
- if (err != OS_SUCCESS) {
- test_emit_token('*');
- }
- }
+#include <string.h>
+
+#include "osapi.h"
+
+uint32 qid, tid;
+
+#define WRITER_NUM_MESSAGES 16
+#define MESSAGE_SIZE 20
+
+static void test_task_writer(void) {
+ unsigned i;
+ int32 err;
+
+ for (i = 0; i < WRITER_NUM_MESSAGES; i++) {
+ err = OS_QueuePut(qid, "Hello World", 12, 0);
+ if (err != OS_SUCCESS) {
+ test_emit_token('*');
+ }
+ }
}
/****************************************************************************
@@ -65,30 +51,31 @@ static void test_task_writer(void) {
****************************************************************************/
/**
- * @page test_002_001 OS_QueueCreate() and OS_QueueDelete() errors
+ * @page test_002_001 [2.1] OS_QueueCreate() and OS_QueueDelete() errors
*
* <h2>Description</h2>
* Parameters checking in OS_QueueCreate() and OS_QueueDelete() is
* tested.
*
* <h2>Test Steps</h2>
- * - OS_QueueCreate() is invoked with queue_id set to NULL, an error is
- * expected.
- * - OS_QueueCreate() is invoked with task_name set to NULL, an error
- * is expected.
- * - OS_QueueCreate() is invoked with a very long task name, an error
- * is expected.
- * - OS_QueueDelete() is invoked with queue_id set to -1, an error is
- * expected.
- * - OS_QueueCreate() is invoked twice with duplicated name, an error
- * is expected, then the queue is deleted using OS_QueueDelete().
+ * - [2.1.1] OS_QueueCreate() is invoked with queue_id set to NULL, an
+ * error is expected.
+ * - [2.1.2] OS_QueueCreate() is invoked with task_name set to NULL, an
+ * error is expected.
+ * - [2.1.3] OS_QueueCreate() is invoked with a very long task name, an
+ * error is expected.
+ * - [2.1.4] OS_QueueDelete() is invoked with queue_id set to -1, an
+ * error is expected.
+ * - [2.1.5] OS_QueueCreate() is invoked twice with duplicated name, an
+ * error is expected, then the queue is deleted using
+ * OS_QueueDelete().
* .
*/
static void test_002_001_execute(void) {
- /* OS_QueueCreate() is invoked with queue_id set to NULL, an error is
- expected.*/
+ /* [2.1.1] OS_QueueCreate() is invoked with queue_id set to NULL, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -101,8 +88,8 @@ static void test_002_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_QueueCreate() is invoked with task_name set to NULL, an error
- is expected.*/
+ /* [2.1.2] OS_QueueCreate() is invoked with task_name set to NULL, an
+ error is expected.*/
test_set_step(2);
{
int32 err;
@@ -116,8 +103,8 @@ static void test_002_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_QueueCreate() is invoked with a very long task name, an error
- is expected.*/
+ /* [2.1.3] OS_QueueCreate() is invoked with a very long task name, an
+ error is expected.*/
test_set_step(3);
{
int32 err;
@@ -131,8 +118,8 @@ static void test_002_001_execute(void) {
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
}
- /* OS_QueueDelete() is invoked with queue_id set to -1, an error is
- expected.*/
+ /* [2.1.4] OS_QueueDelete() is invoked with queue_id set to -1, an
+ error is expected.*/
test_set_step(4);
{
int32 err;
@@ -141,8 +128,9 @@ static void test_002_001_execute(void) {
test_assert(err == OS_ERR_INVALID_ID, "wrong queue id not detected");
}
- /* OS_QueueCreate() is invoked twice with duplicated name, an error
- is expected, then the queue is deleted using OS_QueueDelete().*/
+ /* [2.1.5] OS_QueueCreate() is invoked twice with duplicated name, an
+ error is expected, then the queue is deleted using
+ OS_QueueDelete().*/
test_set_step(5);
{
int32 err;
@@ -167,25 +155,25 @@ static const testcase_t test_002_001 = {
};
/**
- * @page test_002_002 OS_QueueGetIdByName() errors
+ * @page test_002_002 [2.2] OS_QueueGetIdByName() errors
*
* <h2>Description</h2>
* Parameters checking in OS_QueueGetIdByName() is tested.
*
* <h2>Test Steps</h2>
- * - OS_QueueGetIdByName() is invoked with queue_id set to NULL, an
- * error is expected.
- * - OS_QueueGetIdByName() is invoked with queue_name set to NULL, an
- * error is expected.
- * - OS_QueueGetIdByName() is invoked with a very long task name, an
- * error is expected.
+ * - [2.2.1] OS_QueueGetIdByName() is invoked with queue_id set to
+ * NULL, an error is expected.
+ * - [2.2.2] OS_QueueGetIdByName() is invoked with queue_name set to
+ * NULL, an error is expected.
+ * - [2.2.3] OS_QueueGetIdByName() is invoked with a very long task
+ * name, an error is expected.
* .
*/
static void test_002_002_execute(void) {
- /* OS_QueueGetIdByName() is invoked with queue_id set to NULL, an
- error is expected.*/
+ /* [2.2.1] OS_QueueGetIdByName() is invoked with queue_id set to
+ NULL, an error is expected.*/
test_set_step(1);
{
int32 err;
@@ -194,8 +182,8 @@ static void test_002_002_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_QueueGetIdByName() is invoked with queue_name set to NULL, an
- error is expected.*/
+ /* [2.2.2] OS_QueueGetIdByName() is invoked with queue_name set to
+ NULL, an error is expected.*/
test_set_step(2);
{
int32 err;
@@ -204,8 +192,8 @@ static void test_002_002_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_QueueGetIdByName() is invoked with a very long task name, an
- error is expected.*/
+ /* [2.2.3] OS_QueueGetIdByName() is invoked with a very long task
+ name, an error is expected.*/
test_set_step(3);
{
int32 err;
@@ -223,17 +211,17 @@ static const testcase_t test_002_002 = {
};
/**
- * @page test_002_003 OS_QueuePut() and OS_QueueGet() functionality
+ * @page test_002_003 [2.3] OS_QueuePut() and OS_QueueGet() functionality
*
* <h2>Description</h2>
* A task writes on a queue, the messages are retrieved on the other
* side in blocking mode.
*
* <h2>Test Steps</h2>
- * - Creataing a queue with depth 4 and message size 20.
- * - Creating the writer task.
- * - Reading messages from the writer task.
- * - Waiting for task termination then checking for errors.
+ * - [2.3.1] Creataing a queue with depth 4 and message size 20.
+ * - [2.3.2] Creating the writer task.
+ * - [2.3.3] Reading messages from the writer task.
+ * - [2.3.4] Waiting for task termination then checking for errors.
* .
*/
@@ -256,7 +244,7 @@ static void test_002_003_execute(void) {
uint32 tid;
unsigned i;
- /* Creataing a queue with depth 4 and message size 20.*/
+ /* [2.3.1] Creataing a queue with depth 4 and message size 20.*/
test_set_step(1);
{
int32 err;
@@ -265,7 +253,7 @@ static void test_002_003_execute(void) {
test_assert(err == OS_SUCCESS, "queue creation failed");
}
- /* Creating the writer task.*/
+ /* [2.3.2] Creating the writer task.*/
test_set_step(2);
{
int32 err;
@@ -280,7 +268,7 @@ static void test_002_003_execute(void) {
test_assert(err == OS_SUCCESS, "writer task creation failed");
}
- /* Reading messages from the writer task.*/
+ /* [2.3.3] Reading messages from the writer task.*/
test_set_step(3);
{
for (i = 0; i < WRITER_NUM_MESSAGES; i++) {
@@ -295,7 +283,7 @@ static void test_002_003_execute(void) {
}
}
- /* Waiting for task termination then checking for errors.*/
+ /* [2.3.4] Waiting for task termination then checking for errors.*/
test_set_step(4);
{
(void) OS_TaskWait(tid);
@@ -312,15 +300,16 @@ static const testcase_t test_002_003 = {
};
/**
- * @page test_002_004 OS_QueueGet() with timeout functionality
+ * @page test_002_004 [2.4] OS_QueueGet() with timeout functionality
*
* <h2>Description</h2>
* OS_QueueGet() timeout functionality is tested.
*
* <h2>Test Steps</h2>
- * - Retrieving the queue by name.
- * - Get operation with a one second timeout, an error is expected.
- * - Get operation in non-blocking mode, an error is expected.
+ * - [2.4.1] Retrieving the queue by name.
+ * - [2.4.2] Get operation with a one second timeout, an error is
+ * expected.
+ * - [2.4.3] Get operation in non-blocking mode, an error is expected.
* .
*/
@@ -340,7 +329,7 @@ static void test_002_004_execute(void) {
uint32 copied;
char data[MESSAGE_SIZE];
- /* Retrieving the queue by name.*/
+ /* [2.4.1] Retrieving the queue by name.*/
test_set_step(1);
{
int32 err;
@@ -349,7 +338,8 @@ static void test_002_004_execute(void) {
test_assert(err == OS_SUCCESS, "queue not found");
}
- /* Get operation with a one second timeout, an error is expected.*/
+ /* [2.4.2] Get operation with a one second timeout, an error is
+ expected.*/
test_set_step(2);
{
int32 err;
@@ -358,7 +348,8 @@ static void test_002_004_execute(void) {
test_assert(err == OS_QUEUE_TIMEOUT, "unexpected error code");
}
- /* Get operation in non-blocking mode, an error is expected.*/
+ /* [2.4.3] Get operation in non-blocking mode, an error is
+ expected.*/
test_set_step(3);
{
int32 err;
diff --git a/test/nasa_osal/source/test/test_sequence_002.h b/test/nasa_osal/source/test/test_sequence_002.h
index b408f96f4..422e93896 100644
--- a/test/nasa_osal/source/test/test_sequence_002.h
+++ b/test/nasa_osal/source/test/test_sequence_002.h
@@ -1,17 +1,3 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
extern const testcase_t * const test_sequence_002[];
diff --git a/test/nasa_osal/source/test/test_sequence_003.c b/test/nasa_osal/source/test/test_sequence_003.c
index b42f4de9d..e699248f1 100644
--- a/test/nasa_osal/source/test/test_sequence_003.c
+++ b/test/nasa_osal/source/test/test_sequence_003.c
@@ -1,25 +1,11 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
#include "hal.h"
#include "ch_test.h"
#include "test_root.h"
/**
- * @page test_sequence_003 Timers Functionality
+ * @page test_sequence_003 [3] Timers Functionality
*
* File: @ref test_sequence_003.c
*
@@ -40,18 +26,18 @@
* Shared code.
****************************************************************************/
-#include <string.h>
-
-#include "osapi.h"
-
-uint32 tmid;
-uint32 cnt;
-
-static void tmr_callback(uint32 timer_id) {
-
- (void)timer_id;
-
- cnt++;
+#include <string.h>
+
+#include "osapi.h"
+
+uint32 tmid;
+uint32 cnt;
+
+static void tmr_callback(uint32 timer_id) {
+
+ (void)timer_id;
+
+ cnt++;
}
/****************************************************************************
@@ -59,34 +45,35 @@ static void tmr_callback(uint32 timer_id) {
****************************************************************************/
/**
- * @page test_003_001 OS_TimerCreate() and OS_TimerDelete() errors
+ * @page test_003_001 [3.1] OS_TimerCreate() and OS_TimerDelete() errors
*
* <h2>Description</h2>
* Parameters checking in OS_TimerCreate() and OS_TimerDelete() is
* tested.
*
* <h2>Test Steps</h2>
- * - OS_TimerCreate() is invoked with timer_id set to NULL, an error is
- * expected.
- * - OS_TimerCreate() is invoked with timer_name set to NULL, an error
- * is expected.
- * - OS_TimerCreate() is invoked with accuracy set to NULL, an error is
- * expected.
- * - OS_TimerCreate() is invoked with callback_ptr set to NULL, an
+ * - [3.1.1] OS_TimerCreate() is invoked with timer_id set to NULL, an
* error is expected.
- * - OS_TimerCreate() is invoked with a very long timer name, an error
- * is expected.
- * - OS_TimerDelete() is invoked with timer_id set to -1, an error is
- * expected.
- * - OS_TimerCreate() is invoked twice with duplicated name, an error
- * is expected, then the queue is deleted using OS_TimerDelete().
+ * - [3.1.2] OS_TimerCreate() is invoked with timer_name set to NULL,
+ * an error is expected.
+ * - [3.1.3] OS_TimerCreate() is invoked with accuracy set to NULL, an
+ * error is expected.
+ * - [3.1.4] OS_TimerCreate() is invoked with callback_ptr set to NULL,
+ * an error is expected.
+ * - [3.1.5] OS_TimerCreate() is invoked with a very long timer name,
+ * an error is expected.
+ * - [3.1.6] OS_TimerDelete() is invoked with timer_id set to -1, an
+ * error is expected.
+ * - [3.1.7] OS_TimerCreate() is invoked twice with duplicated name, an
+ * error is expected, then the queue is deleted using
+ * OS_TimerDelete().
* .
*/
static void test_003_001_execute(void) {
- /* OS_TimerCreate() is invoked with timer_id set to NULL, an error is
- expected.*/
+ /* [3.1.1] OS_TimerCreate() is invoked with timer_id set to NULL, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -99,8 +86,8 @@ static void test_003_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_TimerCreate() is invoked with timer_name set to NULL, an error
- is expected.*/
+ /* [3.1.2] OS_TimerCreate() is invoked with timer_name set to NULL,
+ an error is expected.*/
test_set_step(2);
{
int32 err;
@@ -114,8 +101,8 @@ static void test_003_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_TimerCreate() is invoked with accuracy set to NULL, an error is
- expected.*/
+ /* [3.1.3] OS_TimerCreate() is invoked with accuracy set to NULL, an
+ error is expected.*/
test_set_step(3);
{
int32 err;
@@ -128,8 +115,8 @@ static void test_003_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_TimerCreate() is invoked with callback_ptr set to NULL, an
- error is expected.*/
+ /* [3.1.4] OS_TimerCreate() is invoked with callback_ptr set to NULL,
+ an error is expected.*/
test_set_step(4);
{
int32 err;
@@ -143,8 +130,8 @@ static void test_003_001_execute(void) {
test_assert(err == OS_TIMER_ERR_INVALID_ARGS, "NULL not detected");
}
- /* OS_TimerCreate() is invoked with a very long timer name, an error
- is expected.*/
+ /* [3.1.5] OS_TimerCreate() is invoked with a very long timer name,
+ an error is expected.*/
test_set_step(5);
{
int32 err;
@@ -158,8 +145,8 @@ static void test_003_001_execute(void) {
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
}
- /* OS_TimerDelete() is invoked with timer_id set to -1, an error is
- expected.*/
+ /* [3.1.6] OS_TimerDelete() is invoked with timer_id set to -1, an
+ error is expected.*/
test_set_step(6);
{
int32 err;
@@ -168,8 +155,9 @@ static void test_003_001_execute(void) {
test_assert(err == OS_ERR_INVALID_ID, "wrong timer id not detected");
}
- /* OS_TimerCreate() is invoked twice with duplicated name, an error
- is expected, then the queue is deleted using OS_TimerDelete().*/
+ /* [3.1.7] OS_TimerCreate() is invoked twice with duplicated name, an
+ error is expected, then the queue is deleted using
+ OS_TimerDelete().*/
test_set_step(7);
{
int32 err;
@@ -195,21 +183,21 @@ static const testcase_t test_003_001 = {
};
/**
- * @page test_003_002 OS_TimerSet() errors
+ * @page test_003_002 [3.2] OS_TimerSet() errors
*
* <h2>Description</h2>
* Parameters checking in OS_TimerSet() is tested.
*
* <h2>Test Steps</h2>
- * - OS_TimerSet() is invoked with timer_id set to -1, an error is
- * expected.
+ * - [3.2.1] OS_TimerSet() is invoked with timer_id set to -1, an error
+ * is expected.
* .
*/
static void test_003_002_execute(void) {
- /* OS_TimerSet() is invoked with timer_id set to -1, an error is
- expected.*/
+ /* [3.2.1] OS_TimerSet() is invoked with timer_id set to -1, an error
+ is expected.*/
test_set_step(1);
{
int32 err;
@@ -227,25 +215,25 @@ static const testcase_t test_003_002 = {
};
/**
- * @page test_003_003 OS_TimerGetIdByName() errors
+ * @page test_003_003 [3.3] OS_TimerGetIdByName() errors
*
* <h2>Description</h2>
* Parameters checking in OS_TimerGetIdByName() is tested.
*
* <h2>Test Steps</h2>
- * - OS_TimerGetIdByName() is invoked with timer_id set to NULL, an
- * error is expected.
- * - OS_TimerGetIdByName() is invoked with timer name set to NULL, an
- * error is expected.
- * - OS_TimerGetIdByName() is invoked with a very long task name, an
- * error is expected.
+ * - [3.3.1] OS_TimerGetIdByName() is invoked with timer_id set to
+ * NULL, an error is expected.
+ * - [3.3.2] OS_TimerGetIdByName() is invoked with timer name set to
+ * NULL, an error is expected.
+ * - [3.3.3] OS_TimerGetIdByName() is invoked with a very long task
+ * name, an error is expected.
* .
*/
static void test_003_003_execute(void) {
- /* OS_TimerGetIdByName() is invoked with timer_id set to NULL, an
- error is expected.*/
+ /* [3.3.1] OS_TimerGetIdByName() is invoked with timer_id set to
+ NULL, an error is expected.*/
test_set_step(1);
{
int32 err;
@@ -254,8 +242,8 @@ static void test_003_003_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_TimerGetIdByName() is invoked with timer name set to NULL, an
- error is expected.*/
+ /* [3.3.2] OS_TimerGetIdByName() is invoked with timer name set to
+ NULL, an error is expected.*/
test_set_step(2);
{
int32 err;
@@ -264,8 +252,8 @@ static void test_003_003_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_TimerGetIdByName() is invoked with a very long task name, an
- error is expected.*/
+ /* [3.3.3] OS_TimerGetIdByName() is invoked with a very long task
+ name, an error is expected.*/
test_set_step(3);
{
int32 err;
@@ -283,15 +271,15 @@ static const testcase_t test_003_003 = {
};
/**
- * @page test_003_004 OS_TimerSet() one-shot functionality
+ * @page test_003_004 [3.4] OS_TimerSet() one-shot functionality
*
* <h2>Description</h2>
* A timer is tested in one-shot mode.
*
* <h2>Test Steps</h2>
- * - Retrieving the timer by name.
- * - Setting up the timer for a 70mS one-shot tick.
- * - Waiting one second then counting the occurred ticks.
+ * - [3.4.1] Retrieving the timer by name.
+ * - [3.4.2] Setting up the timer for a 70mS one-shot tick.
+ * - [3.4.3] Waiting one second then counting the occurred ticks.
* .
*/
@@ -312,7 +300,7 @@ static void test_003_004_teardown(void) {
static void test_003_004_execute(void) {
uint32 local_tmid;
- /* Retrieving the timer by name.*/
+ /* [3.4.1] Retrieving the timer by name.*/
test_set_step(1);
{
int32 err;
@@ -321,7 +309,7 @@ static void test_003_004_execute(void) {
test_assert(err == OS_SUCCESS, "timer not found");
}
- /* Setting up the timer for a 70mS one-shot tick.*/
+ /* [3.4.2] Setting up the timer for a 70mS one-shot tick.*/
test_set_step(2);
{
uint32 err;
@@ -330,7 +318,7 @@ static void test_003_004_execute(void) {
test_assert(err == OS_SUCCESS, "timer setup failed");
}
- /* Waiting one second then counting the occurred ticks.*/
+ /* [3.4.3] Waiting one second then counting the occurred ticks.*/
test_set_step(3);
{
(void) OS_TaskDelay(1000);
@@ -346,16 +334,16 @@ static const testcase_t test_003_004 = {
};
/**
- * @page test_003_005 OS_TimerSet() periodic functionality
+ * @page test_003_005 [3.5] OS_TimerSet() periodic functionality
*
* <h2>Description</h2>
* A timer is tested in periodic mode.
*
* <h2>Test Steps</h2>
- * - Retrieving the timer by name.
- * - Setting up the timer for a 70mS periodic tick.
- * - Waiting one second then counting the occurred ticks.
- * - Stopping the timer.
+ * - [3.5.1] Retrieving the timer by name.
+ * - [3.5.2] Setting up the timer for a 70mS periodic tick.
+ * - [3.5.3] Waiting one second then counting the occurred ticks.
+ * - [3.5.4] Stopping the timer.
* .
*/
@@ -377,7 +365,7 @@ static void test_003_005_teardown(void) {
static void test_003_005_execute(void) {
uint32 local_tmid;
- /* Retrieving the timer by name.*/
+ /* [3.5.1] Retrieving the timer by name.*/
test_set_step(1);
{
int32 err;
@@ -386,7 +374,7 @@ static void test_003_005_execute(void) {
test_assert(err == OS_SUCCESS, "timer not found");
}
- /* Setting up the timer for a 70mS periodic tick.*/
+ /* [3.5.2] Setting up the timer for a 70mS periodic tick.*/
test_set_step(2);
{
uint32 err;
@@ -395,14 +383,14 @@ static void test_003_005_execute(void) {
test_assert(err == OS_SUCCESS, "timer setup failed");
}
- /* Waiting one second then counting the occurred ticks.*/
+ /* [3.5.3] Waiting one second then counting the occurred ticks.*/
test_set_step(3);
{
(void) OS_TaskDelay(1000);
test_assert(cnt == 14, "wrong ticks");
}
- /* Stopping the timer.*/
+ /* [3.5.4] Stopping the timer.*/
test_set_step(4);
{
uint32 err;
diff --git a/test/nasa_osal/source/test/test_sequence_003.h b/test/nasa_osal/source/test/test_sequence_003.h
index ca7045528..0cec58279 100644
--- a/test/nasa_osal/source/test/test_sequence_003.h
+++ b/test/nasa_osal/source/test/test_sequence_003.h
@@ -1,17 +1,3 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
extern const testcase_t * const test_sequence_003[];
diff --git a/test/nasa_osal/source/test/test_sequence_004.c b/test/nasa_osal/source/test/test_sequence_004.c
index 4e4bb977b..6f2fa76c9 100644
--- a/test/nasa_osal/source/test/test_sequence_004.c
+++ b/test/nasa_osal/source/test/test_sequence_004.c
@@ -1,25 +1,11 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
#include "hal.h"
#include "ch_test.h"
#include "test_root.h"
/**
- * @page test_sequence_004 Binary Semaphores Functionality
+ * @page test_sequence_004 [4] Binary Semaphores Functionality
*
* File: @ref test_sequence_004.c
*
@@ -42,8 +28,8 @@
* Shared code.
****************************************************************************/
-#include "osapi.h"
-
+#include "osapi.h"
+
uint32 bsid;
/****************************************************************************
@@ -51,32 +37,33 @@ uint32 bsid;
****************************************************************************/
/**
- * @page test_004_001 OS_BinSemCreate() and OS_BinSemDelete() errors
+ * @page test_004_001 [4.1] OS_BinSemCreate() and OS_BinSemDelete() errors
*
* <h2>Description</h2>
* Parameters checking in OS_BinSemCreate() and OS_BinSemDelete() is
* tested.
*
* <h2>Test Steps</h2>
- * - OS_BinSemCreate() is invoked with sem_id set to NULL, an error is
- * expected.
- * - OS_BinSemCreate() is invoked with sem_name set to NULL, an error
- * is expected.
- * - OS_BinSemCreate() is invoked with an invalid sem_initial_value, an
+ * - [4.1.1] OS_BinSemCreate() is invoked with sem_id set to NULL, an
* error is expected.
- * - OS_BinSemCreate() is invoked with a very long timer name, an error
- * is expected.
- * - OS_BinSemDelete() is invoked with timer_id set to -1, an error is
- * expected.
- * - OS_BinSemCreate() is invoked twice with duplicated name, an error
- * is expected, then the queue is deleted using OS_BinSemDelete().
+ * - [4.1.2] OS_BinSemCreate() is invoked with sem_name set to NULL, an
+ * error is expected.
+ * - [4.1.3] OS_BinSemCreate() is invoked with an invalid
+ * sem_initial_value, an error is expected.
+ * - [4.1.4] OS_BinSemCreate() is invoked with a very long timer name,
+ * an error is expected.
+ * - [4.1.5] OS_BinSemDelete() is invoked with timer_id set to -1, an
+ * error is expected.
+ * - [4.1.6] OS_BinSemCreate() is invoked twice with duplicated name,
+ * an error is expected, then the queue is deleted using
+ * OS_BinSemDelete().
* .
*/
static void test_004_001_execute(void) {
- /* OS_BinSemCreate() is invoked with sem_id set to NULL, an error is
- expected.*/
+ /* [4.1.1] OS_BinSemCreate() is invoked with sem_id set to NULL, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -88,8 +75,8 @@ static void test_004_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_BinSemCreate() is invoked with sem_name set to NULL, an error
- is expected.*/
+ /* [4.1.2] OS_BinSemCreate() is invoked with sem_name set to NULL, an
+ error is expected.*/
test_set_step(2);
{
int32 err;
@@ -101,8 +88,8 @@ static void test_004_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_BinSemCreate() is invoked with an invalid sem_initial_value, an
- error is expected.*/
+ /* [4.1.3] OS_BinSemCreate() is invoked with an invalid
+ sem_initial_value, an error is expected.*/
test_set_step(3);
{
int32 err;
@@ -114,8 +101,8 @@ static void test_004_001_execute(void) {
test_assert(err == OS_INVALID_INT_NUM, "counter error not detected");
}
- /* OS_BinSemCreate() is invoked with a very long timer name, an error
- is expected.*/
+ /* [4.1.4] OS_BinSemCreate() is invoked with a very long timer name,
+ an error is expected.*/
test_set_step(4);
{
#if 0 /* Semaphore name currently not implemented.*/
@@ -129,8 +116,8 @@ static void test_004_001_execute(void) {
#endif
}
- /* OS_BinSemDelete() is invoked with timer_id set to -1, an error is
- expected.*/
+ /* [4.1.5] OS_BinSemDelete() is invoked with timer_id set to -1, an
+ error is expected.*/
test_set_step(5);
{
int32 err;
@@ -139,8 +126,9 @@ static void test_004_001_execute(void) {
test_assert(err == OS_ERR_INVALID_ID, "wrong semaphore id not detected");
}
- /* OS_BinSemCreate() is invoked twice with duplicated name, an error
- is expected, then the queue is deleted using OS_BinSemDelete().*/
+ /* [4.1.6] OS_BinSemCreate() is invoked twice with duplicated name,
+ an error is expected, then the queue is deleted using
+ OS_BinSemDelete().*/
test_set_step(6);
{
int32 err;
@@ -167,21 +155,21 @@ static const testcase_t test_004_001 = {
};
/**
- * @page test_004_002 OS_BinSemFlush() errors
+ * @page test_004_002 [4.2] OS_BinSemFlush() errors
*
* <h2>Description</h2>
* Parameters checking in OS_BinSemFlush() is tested.
*
* <h2>Test Steps</h2>
- * - OS_BinSemFlush() is invoked with sem_id set to -1, an error is
- * expected.
+ * - [4.2.1] OS_BinSemFlush() is invoked with sem_id set to -1, an
+ * error is expected.
* .
*/
static void test_004_002_execute(void) {
- /* OS_BinSemFlush() is invoked with sem_id set to -1, an error is
- expected.*/
+ /* [4.2.1] OS_BinSemFlush() is invoked with sem_id set to -1, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -199,21 +187,21 @@ static const testcase_t test_004_002 = {
};
/**
- * @page test_004_003 OS_BinSemGive() errors
+ * @page test_004_003 [4.3] OS_BinSemGive() errors
*
* <h2>Description</h2>
* Parameters checking in OS_BinSemGive() is tested.
*
* <h2>Test Steps</h2>
- * - OS_BinSemGive() is invoked with sem_id set to -1, an error is
- * expected.
+ * - [4.3.1] OS_BinSemGive() is invoked with sem_id set to -1, an error
+ * is expected.
* .
*/
static void test_004_003_execute(void) {
- /* OS_BinSemGive() is invoked with sem_id set to -1, an error is
- expected.*/
+ /* [4.3.1] OS_BinSemGive() is invoked with sem_id set to -1, an error
+ is expected.*/
test_set_step(1);
{
int32 err;
@@ -231,21 +219,21 @@ static const testcase_t test_004_003 = {
};
/**
- * @page test_004_004 OS_BinSemTake() errors
+ * @page test_004_004 [4.4] OS_BinSemTake() errors
*
* <h2>Description</h2>
* Parameters checking in OS_BinSemTake() is tested.
*
* <h2>Test Steps</h2>
- * - OS_BinSemTake() is invoked with sem_id set to -1, an error is
- * expected.
+ * - [4.4.1] OS_BinSemTake() is invoked with sem_id set to -1, an error
+ * is expected.
* .
*/
static void test_004_004_execute(void) {
- /* OS_BinSemTake() is invoked with sem_id set to -1, an error is
- expected.*/
+ /* [4.4.1] OS_BinSemTake() is invoked with sem_id set to -1, an error
+ is expected.*/
test_set_step(1);
{
int32 err;
@@ -263,16 +251,16 @@ static const testcase_t test_004_004 = {
};
/**
- * @page test_004_005 OS_BinSemTimedWait() errors
+ * @page test_004_005 [4.5] OS_BinSemTimedWait() errors
*
* <h2>Description</h2>
* Parameters checking in OS_BinSemTimedWait() is tested.
*
* <h2>Test Steps</h2>
- * - OS_BinSemTimedWait() is invoked with sem_id set to -1, an error is
- * expected.
- * - OS_BinSemTimedWait() is invoked with msecs set to 0, an error is
- * expected.
+ * - [4.5.1] OS_BinSemTimedWait() is invoked with sem_id set to -1, an
+ * error is expected.
+ * - [4.5.2] OS_BinSemTimedWait() is invoked with msecs set to 0, an
+ * error is expected.
* .
*/
@@ -289,8 +277,8 @@ static void test_004_005_teardown(void) {
static void test_004_005_execute(void) {
- /* OS_BinSemTimedWait() is invoked with sem_id set to -1, an error is
- expected.*/
+ /* [4.5.1] OS_BinSemTimedWait() is invoked with sem_id set to -1, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -299,8 +287,8 @@ static void test_004_005_execute(void) {
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
}
- /* OS_BinSemTimedWait() is invoked with msecs set to 0, an error is
- expected.*/
+ /* [4.5.2] OS_BinSemTimedWait() is invoked with msecs set to 0, an
+ error is expected.*/
test_set_step(2);
{
int32 err;
@@ -318,25 +306,25 @@ static const testcase_t test_004_005 = {
};
/**
- * @page test_004_006 OS_BinSemGetIdByName() errors
+ * @page test_004_006 [4.6] OS_BinSemGetIdByName() errors
*
* <h2>Description</h2>
* Parameters checking in OS_BinSemGetIdByName() is tested.
*
* <h2>Test Steps</h2>
- * - OS_BinSemGetIdByName() is invoked with sem_id set to NULL, an
- * error is expected.
- * - OS_BinSemGetIdByName() is invoked with semaphore name set to NULL,
+ * - [4.6.1] OS_BinSemGetIdByName() is invoked with sem_id set to NULL,
* an error is expected.
- * - OS_BinSemGetIdByName() is invoked with a very long task name, an
- * error is expected.
+ * - [4.6.2] OS_BinSemGetIdByName() is invoked with semaphore name set
+ * to NULL, an error is expected.
+ * - [4.6.3] OS_BinSemGetIdByName() is invoked with a very long task
+ * name, an error is expected.
* .
*/
static void test_004_006_execute(void) {
- /* OS_BinSemGetIdByName() is invoked with sem_id set to NULL, an
- error is expected.*/
+ /* [4.6.1] OS_BinSemGetIdByName() is invoked with sem_id set to NULL,
+ an error is expected.*/
test_set_step(1);
{
int32 err;
@@ -345,8 +333,8 @@ static void test_004_006_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_BinSemGetIdByName() is invoked with semaphore name set to NULL,
- an error is expected.*/
+ /* [4.6.2] OS_BinSemGetIdByName() is invoked with semaphore name set
+ to NULL, an error is expected.*/
test_set_step(2);
{
int32 err;
@@ -355,8 +343,8 @@ static void test_004_006_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_BinSemGetIdByName() is invoked with a very long task name, an
- error is expected.*/
+ /* [4.6.3] OS_BinSemGetIdByName() is invoked with a very long task
+ name, an error is expected.*/
test_set_step(3);
{
int32 err;
@@ -374,14 +362,14 @@ static const testcase_t test_004_006 = {
};
/**
- * @page test_004_007 OS_BinSemTimedWait() timeout functionality
+ * @page test_004_007 [4.7] OS_BinSemTimedWait() timeout functionality
*
* <h2>Description</h2>
* OS_BinSemCreate() timeout functionality is tested.
*
* <h2>Test Steps</h2>
- * - OS_BinSemTimedWait() is invoked with timeout set to one second, an
- * error is expected.
+ * - [4.7.1] OS_BinSemTimedWait() is invoked with timeout set to one
+ * second, an error is expected.
* .
*/
@@ -398,8 +386,8 @@ static void test_004_007_teardown(void) {
static void test_004_007_execute(void) {
- /* OS_BinSemTimedWait() is invoked with timeout set to one second, an
- error is expected.*/
+ /* [4.7.1] OS_BinSemTimedWait() is invoked with timeout set to one
+ second, an error is expected.*/
test_set_step(1);
{
int32 err;
diff --git a/test/nasa_osal/source/test/test_sequence_004.h b/test/nasa_osal/source/test/test_sequence_004.h
index 4e0e48f6a..965f4b132 100644
--- a/test/nasa_osal/source/test/test_sequence_004.h
+++ b/test/nasa_osal/source/test/test_sequence_004.h
@@ -1,17 +1,3 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
extern const testcase_t * const test_sequence_004[];
diff --git a/test/nasa_osal/source/test/test_sequence_005.c b/test/nasa_osal/source/test/test_sequence_005.c
index cbbb8e0fa..76c37bfa8 100644
--- a/test/nasa_osal/source/test/test_sequence_005.c
+++ b/test/nasa_osal/source/test/test_sequence_005.c
@@ -1,25 +1,11 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
#include "hal.h"
#include "ch_test.h"
#include "test_root.h"
/**
- * @page test_sequence_005 Counter Semaphores Functionality
+ * @page test_sequence_005 [5] Counter Semaphores Functionality
*
* File: @ref test_sequence_005.c
*
@@ -41,8 +27,8 @@
* Shared code.
****************************************************************************/
-#include "osapi.h"
-
+#include "osapi.h"
+
uint32 csid;
/****************************************************************************
@@ -50,33 +36,33 @@ uint32 csid;
****************************************************************************/
/**
- * @page test_005_001 OS_CountSemCreate() and OS_CountSemDelete() errors
+ * @page test_005_001 [5.1] OS_CountSemCreate() and OS_CountSemDelete() errors
*
* <h2>Description</h2>
* Parameters checking in OS_CountSemCreate() and OS_CountSemDelete()
* is tested.
*
* <h2>Test Steps</h2>
- * - OS_CountSemCreate() is invoked with sem_id set to NULL, an error
- * is expected.
- * - OS_CountSemCreate() is invoked with sem_name set to NULL, an error
- * is expected.
- * - OS_CountSemCreate() is invoked with an invalid sem_initial_value,
+ * - [5.1.1] OS_CountSemCreate() is invoked with sem_id set to NULL, an
+ * error is expected.
+ * - [5.1.2] OS_CountSemCreate() is invoked with sem_name set to NULL,
* an error is expected.
- * - OS_CountSemCreate() is invoked with a very long timer name, an
+ * - [5.1.3] OS_CountSemCreate() is invoked with an invalid
+ * sem_initial_value, an error is expected.
+ * - [5.1.4] OS_CountSemCreate() is invoked with a very long timer
+ * name, an error is expected.
+ * - [5.1.5] OS_CountSemDelete() is invoked with timer_id set to -1, an
* error is expected.
- * - OS_CountSemDelete() is invoked with timer_id set to -1, an error
- * is expected.
- * - OS_CountSemCreate() is invoked twice with duplicated name, an
- * error is expected, then the queue is deleted using
+ * - [5.1.6] OS_CountSemCreate() is invoked twice with duplicated name,
+ * an error is expected, then the queue is deleted using
* OS_CountSemDelete().
* .
*/
static void test_005_001_execute(void) {
- /* OS_CountSemCreate() is invoked with sem_id set to NULL, an error
- is expected.*/
+ /* [5.1.1] OS_CountSemCreate() is invoked with sem_id set to NULL, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -88,8 +74,8 @@ static void test_005_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_CountSemCreate() is invoked with sem_name set to NULL, an error
- is expected.*/
+ /* [5.1.2] OS_CountSemCreate() is invoked with sem_name set to NULL,
+ an error is expected.*/
test_set_step(2);
{
int32 err;
@@ -101,8 +87,8 @@ static void test_005_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_CountSemCreate() is invoked with an invalid sem_initial_value,
- an error is expected.*/
+ /* [5.1.3] OS_CountSemCreate() is invoked with an invalid
+ sem_initial_value, an error is expected.*/
test_set_step(3);
{
int32 err;
@@ -114,8 +100,8 @@ static void test_005_001_execute(void) {
test_assert(err == OS_INVALID_INT_NUM, "counter error not detected");
}
- /* OS_CountSemCreate() is invoked with a very long timer name, an
- error is expected.*/
+ /* [5.1.4] OS_CountSemCreate() is invoked with a very long timer
+ name, an error is expected.*/
test_set_step(4);
{
#if 0 /* Semaphore name currently not implemented.*/
@@ -129,8 +115,8 @@ static void test_005_001_execute(void) {
#endif
}
- /* OS_CountSemDelete() is invoked with timer_id set to -1, an error
- is expected.*/
+ /* [5.1.5] OS_CountSemDelete() is invoked with timer_id set to -1, an
+ error is expected.*/
test_set_step(5);
{
int32 err;
@@ -139,8 +125,8 @@ static void test_005_001_execute(void) {
test_assert(err == OS_ERR_INVALID_ID, "wrong semaphore id not detected");
}
- /* OS_CountSemCreate() is invoked twice with duplicated name, an
- error is expected, then the queue is deleted using
+ /* [5.1.6] OS_CountSemCreate() is invoked twice with duplicated name,
+ an error is expected, then the queue is deleted using
OS_CountSemDelete().*/
test_set_step(6);
{
@@ -168,21 +154,21 @@ static const testcase_t test_005_001 = {
};
/**
- * @page test_005_002 OS_CountSemGive() errors
+ * @page test_005_002 [5.2] OS_CountSemGive() errors
*
* <h2>Description</h2>
* Parameters checking in OS_CountSemGive() is tested.
*
* <h2>Test Steps</h2>
- * - OS_CountSemGive() is invoked with sem_id set to -1, an error is
- * expected.
+ * - [5.2.1] OS_CountSemGive() is invoked with sem_id set to -1, an
+ * error is expected.
* .
*/
static void test_005_002_execute(void) {
- /* OS_CountSemGive() is invoked with sem_id set to -1, an error is
- expected.*/
+ /* [5.2.1] OS_CountSemGive() is invoked with sem_id set to -1, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -200,21 +186,21 @@ static const testcase_t test_005_002 = {
};
/**
- * @page test_005_003 OS_CountSemTake() errors
+ * @page test_005_003 [5.3] OS_CountSemTake() errors
*
* <h2>Description</h2>
* Parameters checking in OS_CountSemTake() is tested.
*
* <h2>Test Steps</h2>
- * - OS_CountSemTake() is invoked with sem_id set to -1, an error is
- * expected.
+ * - [5.3.1] OS_CountSemTake() is invoked with sem_id set to -1, an
+ * error is expected.
* .
*/
static void test_005_003_execute(void) {
- /* OS_CountSemTake() is invoked with sem_id set to -1, an error is
- expected.*/
+ /* [5.3.1] OS_CountSemTake() is invoked with sem_id set to -1, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -232,16 +218,16 @@ static const testcase_t test_005_003 = {
};
/**
- * @page test_005_004 OS_CountSemTimedWait() errors
+ * @page test_005_004 [5.4] OS_CountSemTimedWait() errors
*
* <h2>Description</h2>
* Parameters checking in OS_CountSemTimedWait() is tested.
*
* <h2>Test Steps</h2>
- * - OS_CountSemTimedWait() is invoked with sem_id set to -1, an error
- * is expected.
- * - OS_CountSemTimedWait() is invoked with msecs set to 0, an error is
- * expected.
+ * - [5.4.1] OS_CountSemTimedWait() is invoked with sem_id set to -1,
+ * an error is expected.
+ * - [5.4.2] OS_CountSemTimedWait() is invoked with msecs set to 0, an
+ * error is expected.
* .
*/
@@ -258,8 +244,8 @@ static void test_005_004_teardown(void) {
static void test_005_004_execute(void) {
- /* OS_CountSemTimedWait() is invoked with sem_id set to -1, an error
- is expected.*/
+ /* [5.4.1] OS_CountSemTimedWait() is invoked with sem_id set to -1,
+ an error is expected.*/
test_set_step(1);
{
int32 err;
@@ -268,8 +254,8 @@ static void test_005_004_execute(void) {
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
}
- /* OS_CountSemTimedWait() is invoked with msecs set to 0, an error is
- expected.*/
+ /* [5.4.2] OS_CountSemTimedWait() is invoked with msecs set to 0, an
+ error is expected.*/
test_set_step(2);
{
int32 err;
@@ -287,25 +273,25 @@ static const testcase_t test_005_004 = {
};
/**
- * @page test_005_005 OS_CountSemGetIdByName() errors
+ * @page test_005_005 [5.5] OS_CountSemGetIdByName() errors
*
* <h2>Description</h2>
* Parameters checking in OS_CountSemGetIdByName() is tested.
*
* <h2>Test Steps</h2>
- * - OS_CountSemGetIdByName() is invoked with sem_id set to NULL, an
- * error is expected.
- * - OS_CountSemGetIdByName() is invoked with semaphore name set to
+ * - [5.5.1] OS_CountSemGetIdByName() is invoked with sem_id set to
* NULL, an error is expected.
- * - OS_CountSemGetIdByName() is invoked with a very long task name, an
- * error is expected.
+ * - [5.5.2] OS_CountSemGetIdByName() is invoked with semaphore name
+ * set to NULL, an error is expected.
+ * - [5.5.3] OS_CountSemGetIdByName() is invoked with a very long task
+ * name, an error is expected.
* .
*/
static void test_005_005_execute(void) {
- /* OS_CountSemGetIdByName() is invoked with sem_id set to NULL, an
- error is expected.*/
+ /* [5.5.1] OS_CountSemGetIdByName() is invoked with sem_id set to
+ NULL, an error is expected.*/
test_set_step(1);
{
int32 err;
@@ -314,8 +300,8 @@ static void test_005_005_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_CountSemGetIdByName() is invoked with semaphore name set to
- NULL, an error is expected.*/
+ /* [5.5.2] OS_CountSemGetIdByName() is invoked with semaphore name
+ set to NULL, an error is expected.*/
test_set_step(2);
{
int32 err;
@@ -324,8 +310,8 @@ static void test_005_005_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_CountSemGetIdByName() is invoked with a very long task name, an
- error is expected.*/
+ /* [5.5.3] OS_CountSemGetIdByName() is invoked with a very long task
+ name, an error is expected.*/
test_set_step(3);
{
int32 err;
@@ -343,14 +329,14 @@ static const testcase_t test_005_005 = {
};
/**
- * @page test_005_006 OS_CountSemTimedWait() timeout functionality
+ * @page test_005_006 [5.6] OS_CountSemTimedWait() timeout functionality
*
* <h2>Description</h2>
* OS_CountSemCreate() timeout functionality is tested.
*
* <h2>Test Steps</h2>
- * - OS_CountSemTimedWait() is invoked with timeout set to one second,
- * an error is expected.
+ * - [5.6.1] OS_CountSemTimedWait() is invoked with timeout set to one
+ * second, an error is expected.
* .
*/
@@ -367,8 +353,8 @@ static void test_005_006_teardown(void) {
static void test_005_006_execute(void) {
- /* OS_CountSemTimedWait() is invoked with timeout set to one second,
- an error is expected.*/
+ /* [5.6.1] OS_CountSemTimedWait() is invoked with timeout set to one
+ second, an error is expected.*/
test_set_step(1);
{
int32 err;
diff --git a/test/nasa_osal/source/test/test_sequence_005.h b/test/nasa_osal/source/test/test_sequence_005.h
index a6d54f033..094222891 100644
--- a/test/nasa_osal/source/test/test_sequence_005.h
+++ b/test/nasa_osal/source/test/test_sequence_005.h
@@ -1,17 +1,3 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
extern const testcase_t * const test_sequence_005[];
diff --git a/test/nasa_osal/source/test/test_sequence_006.c b/test/nasa_osal/source/test/test_sequence_006.c
index 2ea972091..fd99656e1 100644
--- a/test/nasa_osal/source/test/test_sequence_006.c
+++ b/test/nasa_osal/source/test/test_sequence_006.c
@@ -1,25 +1,11 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
#include "hal.h"
#include "ch_test.h"
#include "test_root.h"
/**
- * @page test_sequence_006 Mutex Semaphores Functionality
+ * @page test_sequence_006 [6] Mutex Semaphores Functionality
*
* File: @ref test_sequence_006.c
*
@@ -39,8 +25,8 @@
* Shared code.
****************************************************************************/
-#include "osapi.h"
-
+#include "osapi.h"
+
uint32 msid;
/****************************************************************************
@@ -48,30 +34,31 @@ uint32 msid;
****************************************************************************/
/**
- * @page test_006_001 OS_MutSemCreate() and OS_MutSemDelete() errors
+ * @page test_006_001 [6.1] OS_MutSemCreate() and OS_MutSemDelete() errors
*
* <h2>Description</h2>
* Parameters checking in OS_MutSemCreate() and OS_MutSemDelete() is
* tested.
*
* <h2>Test Steps</h2>
- * - OS_MutSemCreate() is invoked with sem_id set to NULL, an error is
- * expected.
- * - OS_MutSemCreate() is invoked with sem_name set to NULL, an error
- * is expected.
- * - OS_MutSemCreate() is invoked with a very long timer name, an error
- * is expected.
- * - OS_MutSemDelete() is invoked with timer_id set to -1, an error is
- * expected.
- * - OS_MutSemCreate() is invoked twice with duplicated name, an error
- * is expected, then the queue is deleted using OS_MutSemDelete().
+ * - [6.1.1] OS_MutSemCreate() is invoked with sem_id set to NULL, an
+ * error is expected.
+ * - [6.1.2] OS_MutSemCreate() is invoked with sem_name set to NULL, an
+ * error is expected.
+ * - [6.1.3] OS_MutSemCreate() is invoked with a very long timer name,
+ * an error is expected.
+ * - [6.1.4] OS_MutSemDelete() is invoked with timer_id set to -1, an
+ * error is expected.
+ * - [6.1.5] OS_MutSemCreate() is invoked twice with duplicated name,
+ * an error is expected, then the queue is deleted using
+ * OS_MutSemDelete().
* .
*/
static void test_006_001_execute(void) {
- /* OS_MutSemCreate() is invoked with sem_id set to NULL, an error is
- expected.*/
+ /* [6.1.1] OS_MutSemCreate() is invoked with sem_id set to NULL, an
+ error is expected.*/
test_set_step(1);
{
int32 err;
@@ -82,8 +69,8 @@ static void test_006_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_MutSemCreate() is invoked with sem_name set to NULL, an error
- is expected.*/
+ /* [6.1.2] OS_MutSemCreate() is invoked with sem_name set to NULL, an
+ error is expected.*/
test_set_step(2);
{
int32 err;
@@ -94,8 +81,8 @@ static void test_006_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_MutSemCreate() is invoked with a very long timer name, an error
- is expected.*/
+ /* [6.1.3] OS_MutSemCreate() is invoked with a very long timer name,
+ an error is expected.*/
test_set_step(3);
{
#if 0 /* Semaphore name currently not implemented.*/
@@ -108,8 +95,8 @@ static void test_006_001_execute(void) {
#endif
}
- /* OS_MutSemDelete() is invoked with timer_id set to -1, an error is
- expected.*/
+ /* [6.1.4] OS_MutSemDelete() is invoked with timer_id set to -1, an
+ error is expected.*/
test_set_step(4);
{
int32 err;
@@ -118,8 +105,9 @@ static void test_006_001_execute(void) {
test_assert(err == OS_ERR_INVALID_ID, "wrong semaphore id not detected");
}
- /* OS_MutSemCreate() is invoked twice with duplicated name, an error
- is expected, then the queue is deleted using OS_MutSemDelete().*/
+ /* [6.1.5] OS_MutSemCreate() is invoked twice with duplicated name,
+ an error is expected, then the queue is deleted using
+ OS_MutSemDelete().*/
test_set_step(5);
{
int32 err;
@@ -146,21 +134,21 @@ static const testcase_t test_006_001 = {
};
/**
- * @page test_006_002 OS_MutSemGive() errors
+ * @page test_006_002 [6.2] OS_MutSemGive() errors
*
* <h2>Description</h2>
* Parameters checking in OS_MutSemGive() is tested.
*
* <h2>Test Steps</h2>
- * - OS_MutSemGive() is invoked with sem_id set to -1, an error is
- * expected.
+ * - [6.2.1] OS_MutSemGive() is invoked with sem_id set to -1, an error
+ * is expected.
* .
*/
static void test_006_002_execute(void) {
- /* OS_MutSemGive() is invoked with sem_id set to -1, an error is
- expected.*/
+ /* [6.2.1] OS_MutSemGive() is invoked with sem_id set to -1, an error
+ is expected.*/
test_set_step(1);
{
int32 err;
@@ -178,21 +166,21 @@ static const testcase_t test_006_002 = {
};
/**
- * @page test_006_003 OS_MutSemTake() errors
+ * @page test_006_003 [6.3] OS_MutSemTake() errors
*
* <h2>Description</h2>
* Parameters checking in OS_MutSemTake() is tested.
*
* <h2>Test Steps</h2>
- * - OS_MutSemTake() is invoked with sem_id set to -1, an error is
- * expected.
+ * - [6.3.1] OS_MutSemTake() is invoked with sem_id set to -1, an error
+ * is expected.
* .
*/
static void test_006_003_execute(void) {
- /* OS_MutSemTake() is invoked with sem_id set to -1, an error is
- expected.*/
+ /* [6.3.1] OS_MutSemTake() is invoked with sem_id set to -1, an error
+ is expected.*/
test_set_step(1);
{
int32 err;
@@ -210,25 +198,25 @@ static const testcase_t test_006_003 = {
};
/**
- * @page test_006_004 OS_MutSemGetIdByName() errors
+ * @page test_006_004 [6.4] OS_MutSemGetIdByName() errors
*
* <h2>Description</h2>
* Parameters checking in OS_MutSemGetIdByName() is tested.
*
* <h2>Test Steps</h2>
- * - OS_MutSemGetIdByName() is invoked with sem_id set to NULL, an
- * error is expected.
- * - OS_MutSemGetIdByName() is invoked with semaphore name set to NULL,
+ * - [6.4.1] OS_MutSemGetIdByName() is invoked with sem_id set to NULL,
* an error is expected.
- * - OS_MutSemGetIdByName() is invoked with a very long task name, an
- * error is expected.
+ * - [6.4.2] OS_MutSemGetIdByName() is invoked with semaphore name set
+ * to NULL, an error is expected.
+ * - [6.4.3] OS_MutSemGetIdByName() is invoked with a very long task
+ * name, an error is expected.
* .
*/
static void test_006_004_execute(void) {
- /* OS_MutSemGetIdByName() is invoked with sem_id set to NULL, an
- error is expected.*/
+ /* [6.4.1] OS_MutSemGetIdByName() is invoked with sem_id set to NULL,
+ an error is expected.*/
test_set_step(1);
{
int32 err;
@@ -237,8 +225,8 @@ static void test_006_004_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_MutSemGetIdByName() is invoked with semaphore name set to NULL,
- an error is expected.*/
+ /* [6.4.2] OS_MutSemGetIdByName() is invoked with semaphore name set
+ to NULL, an error is expected.*/
test_set_step(2);
{
int32 err;
@@ -247,8 +235,8 @@ static void test_006_004_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected");
}
- /* OS_MutSemGetIdByName() is invoked with a very long task name, an
- error is expected.*/
+ /* [6.4.3] OS_MutSemGetIdByName() is invoked with a very long task
+ name, an error is expected.*/
test_set_step(3);
{
int32 err;
diff --git a/test/nasa_osal/source/test/test_sequence_006.h b/test/nasa_osal/source/test/test_sequence_006.h
index efa716bdd..0cbf01a81 100644
--- a/test/nasa_osal/source/test/test_sequence_006.h
+++ b/test/nasa_osal/source/test/test_sequence_006.h
@@ -1,17 +1,3 @@
-/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
+/* Copyright statement.*/
extern const testcase_t * const test_sequence_006[];
diff --git a/test/nil/configuration.xml b/test/nil/configuration.xml
index 1181fb341..c759ff4f9 100644
--- a/test/nil/configuration.xml
+++ b/test/nil/configuration.xml
@@ -87,6 +87,9 @@ THD_FUNCTION(test_support, arg) {
<description>
<value>This sequence tests the ChibiOS/NIL functionalities related to threading.</value>
</description>
+ <condition>
+ <value />
+ </condition>
<shared_code>
<value><![CDATA[#include "ch.h"]]></value>
</shared_code>
@@ -239,6 +242,9 @@ test_assert_time_window(time + 100,
<description>
<value>This sequence tests the ChibiOS/NIL functionalities related to counter semaphores.</value>
</description>
+ <condition>
+ <value>CH_CFG_USE_SEMAPHORES</value>
+ </condition>
<shared_code>
<value><![CDATA[#include "ch.h"
@@ -253,7 +259,7 @@ static semaphore_t sem1;]]></value>
<value>Wait, Signal and Reset primitives are tested. The testing thread does not trigger a state change.</value>
</description>
<condition>
- <value>CH_CFG_USE_SEMAPHORES</value>
+ <value />
</condition>
<various_code>
<setup_code>
@@ -316,7 +322,7 @@ test_assert_lock(chSemGetCounterI(&sem1) == 2, "wrong counter value");]]></value
<value>Wait, Signal and Reset primitives are tested. The testing thread triggers a state change.</value>
</description>
<condition>
- <value>CH_CFG_USE_SEMAPHORES</value>
+ <value />
</condition>
<various_code>
<setup_code>
@@ -370,7 +376,7 @@ test_assert(MSG_RESET == msg, "wrong returned message");]]></value>
<value>Timeout on semaphores is tested.</value>
</description>
<condition>
- <value>CH_CFG_USE_SEMAPHORES</value>
+ <value />
</condition>
<various_code>
<setup_code>
@@ -433,6 +439,9 @@ test_assert(MSG_TIMEOUT == msg, "wrong timeout message");]]></value>
<description>
<value>This sequence tests the ChibiOS/NIL functionalities related to threads suspend/resume and event flags.</value>
</description>
+ <condition>
+ <value />
+ </condition>
<shared_code>
<value><![CDATA[static thread_reference_t tr1;]]></value>
</shared_code>
@@ -579,6 +588,9 @@ test_assert((eventmask_t)0 == events, "wrong events mask");]]></value>
<description>
<value>This sequence tests the ChibiOS/NIL functionalities related to mailboxes.</value>
</description>
+ <condition>
+ <value>CH_CFG_USE_MAILBOXES</value>
+ </condition>
<shared_code>
<value><![CDATA[#define ALLOWED_DELAY MS2ST(5)
#define MB_SIZE 4
@@ -595,7 +607,7 @@ static MAILBOX_DECL(mb1, mb_buffer, MB_SIZE);]]></value>
<value>The mailbox normal API is tested without triggering blocking conditions.</value>
</description>
<condition>
- <value>CH_CFG_USE_MAILBOXES</value>
+ <value />
</condition>
<various_code>
<setup_code>
@@ -719,7 +731,7 @@ test_assert(mb1.buffer == mb1.rdptr, "read pointer not aligned to base");]]></va
<value>The mailbox I-Class API is tested without triggering blocking conditions.</value>
</description>
<condition>
- <value>CH_CFG_USE_MAILBOXES</value>
+ <value />
</condition>
<various_code>
<setup_code>
@@ -851,7 +863,7 @@ test_assert(mb1.buffer == mb1.rdptr, "read pointer not aligned to base");]]></va
<value>The mailbox API is tested for timeouts.</value>
</description>
<condition>
- <value>CH_CFG_USE_MAILBOXES</value>
+ <value />
</condition>
<various_code>
<setup_code>
@@ -943,6 +955,9 @@ test_assert(msg1 == MSG_TIMEOUT, "wrong wake-up message");]]></value>
<description>
<value>This sequence tests the ChibiOS/NIL functionalities related to memory pools.</value>
</description>
+ <condition>
+ <value>CH_CFG_USE_MEMPOOLS</value>
+ </condition>
<shared_code>
<value><![CDATA[#define MEMORY_POOL_SIZE 4
@@ -961,13 +976,13 @@ static void *null_provider(size_t size, unsigned align) {
<cases>
<case>
<brief>
- <value>Loading and empting a memory pool.</value>
+ <value>Loading and emptying a memory pool.</value>
</brief>
<description>
- <value>The memory pool functionality is tested by loading and empting it, all conditions are tested.</value>
+ <value>The memory pool functionality is tested by loading and emptying it, all conditions are tested.</value>
</description>
<condition>
- <value>CH_CFG_USE_MEMPOOLS</value>
+ <value />
</condition>
<various_code>
<setup_code>
@@ -1066,13 +1081,13 @@ test_assert(chPoolAlloc(&mp1) == NULL, "provider returned memory");]]></value>
</case>
<case>
<brief>
- <value>Loading and empting a guarded memory pool without waiting.</value>
+ <value>Loading and emptying a guarded memory pool without waiting.</value>
</brief>
<description>
- <value>The memory pool functionality is tested by loading and empting it, all conditions are tested.</value>
+ <value>The memory pool functionality is tested by loading and emptying it, all conditions are tested.</value>
</description>
<condition>
- <value>(CH_CFG_USE_MEMPOOLS &amp;&amp; CH_CFG_USE_SEMAPHORES)</value>
+ <value>CH_CFG_USE_SEMAPHORES</value>
</condition>
<various_code>
<setup_code>
@@ -1165,7 +1180,7 @@ test_assert(chPoolAlloc(&mp1) == NULL, "provider returned memory");]]></value>
<value>The timeout features for the Guarded Memory Pools is tested.</value>
</description>
<condition>
- <value>(CH_CFG_USE_MEMPOOLS &amp;&amp; CH_CFG_USE_SEMAPHORES)</value>
+ <value>CH_CFG_USE_SEMAPHORES</value>
</condition>
<various_code>
<setup_code>
@@ -1204,6 +1219,9 @@ test_assert(chPoolAlloc(&mp1) == NULL, "provider returned memory");]]></value>
<description>
<value>This sequence tests the ChibiOS/NIL functionalities related to memory heaps.</value>
</description>
+ <condition>
+ <value>CH_CFG_USE_HEAP</value>
+ </condition>
<shared_code>
<value><![CDATA[#define ALLOC_SIZE 16
#define HEAP_SIZE (ALLOC_SIZE * 8)
@@ -1220,7 +1238,7 @@ static CH_HEAP_AREA(myheap, HEAP_SIZE);]]></value>
<value>Series of allocations/deallocations are performed in carefully designed sequences in order to stimulate all the possible code paths inside the allocator. The test expects to find the heap back to the initial status after each sequence.</value>
</description>
<condition>
- <value>CH_CFG_USE_HEAP</value>
+ <value />
</condition>
<various_code>
<setup_code>
@@ -1398,7 +1416,7 @@ test_assert(n == sz, "size changed");]]></value>
<value>The default heap is pre-allocated in the system. We test base functionality.</value>
</description>
<condition>
- <value>CH_CFG_USE_HEAP</value>
+ <value />
</condition>
<various_code>
<setup_code>
diff --git a/test/nil/source/test/test_root.c b/test/nil/source/test/test_root.c
index 72a98172e..23d4884c9 100644
--- a/test/nil/source/test/test_root.c
+++ b/test/nil/source/test/test_root.c
@@ -33,15 +33,14 @@
/**
* @file test_root.c
* @brief Test Suite root structures code.
- *
- * @addtogroup SPC5_TEST_ROOT
- * @{
*/
#include "hal.h"
#include "ch_test.h"
#include "test_root.h"
+#if !defined(__DOXYGEN__)
+
/*===========================================================================*/
/* Module exported variables. */
/*===========================================================================*/
@@ -97,4 +96,4 @@ THD_FUNCTION(test_support, arg) {
}
}
-/** @} */
+#endif /* !defined(__DOXYGEN__) */
diff --git a/test/nil/source/test/test_root.h b/test/nil/source/test/test_root.h
index 242091b3d..d52950e64 100644
--- a/test/nil/source/test/test_root.h
+++ b/test/nil/source/test/test_root.h
@@ -17,9 +17,6 @@
/**
* @file test_root.h
* @brief Test Suite root structures header.
- *
- * @addtogroup SPC5_TEST_ROOT
- * @{
*/
#ifndef _SPC5_TEST_ROOT_H_
@@ -32,6 +29,8 @@
#include "test_sequence_005.h"
#include "test_sequence_006.h"
+#if !defined(__DOXYGEN__)
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
@@ -57,6 +56,6 @@ extern THD_WORKING_AREA(wa_test_support, 128);
THD_FUNCTION(test_support, arg);
-#endif /* _SPC5_TEST_ROOT_H_ */
+#endif /* !defined(__DOXYGEN__) */
-/** @} */
+#endif /* _SPC5_TEST_ROOT_H_ */
diff --git a/test/nil/source/test/test_sequence_001.c b/test/nil/source/test/test_sequence_001.c
index 8073ac10f..a3446b096 100644
--- a/test/nil/source/test/test_sequence_001.c
+++ b/test/nil/source/test/test_sequence_001.c
@@ -19,7 +19,7 @@
#include "test_root.h"
/**
- * @page test_sequence_001 Threads Functionality
+ * @page test_sequence_001 [1] Threads Functionality
*
* File: @ref test_sequence_001.c
*
@@ -44,21 +44,21 @@
****************************************************************************/
/**
- * @page test_001_001 System Tick Counter functionality
+ * @page test_001_001 [1.1] System Tick Counter functionality
*
* <h2>Description</h2>
* The functionality of the API @p chVTGetSystemTimeX() is tested.
*
* <h2>Test Steps</h2>
- * - A System Tick Counter increment is expected, the test simply hangs
- * if it does not happen.
+ * - [1.1.1] A System Tick Counter increment is expected, the test
+ * simply hangs if it does not happen.
* .
*/
static void test_001_001_execute(void) {
- /* A System Tick Counter increment is expected, the test simply hangs
- if it does not happen.*/
+ /* [1.1.1] A System Tick Counter increment is expected, the test
+ simply hangs if it does not happen.*/
test_set_step(1);
{
systime_t time = chVTGetSystemTimeX();
@@ -75,30 +75,34 @@ static const testcase_t test_001_001 = {
};
/**
- * @page test_001_002 Thread Sleep functionality
+ * @page test_001_002 [1.2] Thread Sleep functionality
*
* <h2>Description</h2>
* The functionality of @p chThdSleep() and derivatives is tested.
*
* <h2>Test Steps</h2>
- * - The current system time is read then a sleep is performed for 100
- * system ticks and on exit the system time is verified again.
- * - The current system time is read then a sleep is performed for
- * 100000 microseconds and on exit the system time is verified again.
- * - The current system time is read then a sleep is performed for 100
- * milliseconds and on exit the system time is verified again.
- * - The current system time is read then a sleep is performed for 1
- * second and on exit the system time is verified again.
- * - Function chThdSleepUntil() is tested with a timeline of "now" +
- * 100 ticks.
+ * - [1.2.1] The current system time is read then a sleep is performed
+ * for 100 system ticks and on exit the system time is verified
+ * again.
+ * - [1.2.2] The current system time is read then a sleep is performed
+ * for 100000 microseconds and on exit the system time is verified
+ * again.
+ * - [1.2.3] The current system time is read then a sleep is performed
+ * for 100 milliseconds and on exit the system time is verified
+ * again.
+ * - [1.2.4] The current system time is read then a sleep is performed
+ * for 1 second and on exit the system time is verified again.
+ * - [1.2.5] Function chThdSleepUntil() is tested with a timeline of
+ * "now" + 100 ticks.
* .
*/
static void test_001_002_execute(void) {
systime_t time;
- /* The current system time is read then a sleep is performed for 100
- system ticks and on exit the system time is verified again.*/
+ /* [1.2.1] The current system time is read then a sleep is performed
+ for 100 system ticks and on exit the system time is verified
+ again.*/
test_set_step(1);
{
time = chVTGetSystemTimeX();
@@ -108,8 +112,8 @@ static void test_001_002_execute(void) {
"out of time window");
}
- /* The current system time is read then a sleep is performed for
- 100000 microseconds and on exit the system time is verified
+ /* [1.2.2] The current system time is read then a sleep is performed
+ for 100000 microseconds and on exit the system time is verified
again.*/
test_set_step(2);
{
@@ -120,8 +124,9 @@ static void test_001_002_execute(void) {
"out of time window");
}
- /* The current system time is read then a sleep is performed for 100
- milliseconds and on exit the system time is verified again.*/
+ /* [1.2.3] The current system time is read then a sleep is performed
+ for 100 milliseconds and on exit the system time is verified
+ again.*/
test_set_step(3);
{
time = chVTGetSystemTimeX();
@@ -131,8 +136,8 @@ static void test_001_002_execute(void) {
"out of time window");
}
- /* The current system time is read then a sleep is performed for 1
- second and on exit the system time is verified again.*/
+ /* [1.2.4] The current system time is read then a sleep is performed
+ for 1 second and on exit the system time is verified again.*/
test_set_step(4);
{
time = chVTGetSystemTimeX();
@@ -142,8 +147,8 @@ static void test_001_002_execute(void) {
"out of time window");
}
- /* Function chThdSleepUntil() is tested with a timeline of "now" +
- 100 ticks.*/
+ /* [1.2.5] Function chThdSleepUntil() is tested with a timeline of
+ "now" + 100 ticks.*/
test_set_step(5);
{
time = chVTGetSystemTimeX();
diff --git a/test/nil/source/test/test_sequence_002.c b/test/nil/source/test/test_sequence_002.c
index 0656d04f0..9c32486bd 100644
--- a/test/nil/source/test/test_sequence_002.c
+++ b/test/nil/source/test/test_sequence_002.c
@@ -19,7 +19,7 @@
#include "test_root.h"
/**
- * @page test_sequence_002 Semaphores
+ * @page test_sequence_002 [2] Semaphores
*
* File: @ref test_sequence_002.c
*
@@ -27,6 +27,12 @@
* This sequence tests the ChibiOS/NIL functionalities related to
* counter semaphores.
*
+ * <h2>Conditions</h2>
+ * This sequence is only executed if the following preprocessor condition
+ * evaluates to true:
+ * - CH_CFG_USE_SEMAPHORES
+ * .
+ *
* <h2>Test Cases</h2>
* - @subpage test_002_001
* - @subpage test_002_002
@@ -34,6 +40,8 @@
* .
*/
+#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__)
+
/****************************************************************************
* Shared code.
****************************************************************************/
@@ -46,27 +54,20 @@ static semaphore_t sem1;
* Test cases.
****************************************************************************/
-#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
/**
- * @page test_002_001 Semaphore primitives, no state change
+ * @page test_002_001 [2.1] Semaphore primitives, no state change
*
* <h2>Description</h2>
* Wait, Signal and Reset primitives are tested. The testing thread
* does not trigger a state change.
*
- * <h2>Conditions</h2>
- * This test is only executed if the following preprocessor condition
- * evaluates to true:
- * - CH_CFG_USE_SEMAPHORES
- * .
- *
* <h2>Test Steps</h2>
- * - The function chSemWait() is invoked, after return the counter and
- * the returned message are tested.
- * - The function chSemSignal() is invoked, after return the counter is
- * tested.
- * - The function chSemReset() is invoked, after return the counter is
- * tested.
+ * - [2.1.1] The function chSemWait() is invoked, after return the
+ * counter and the returned message are tested.
+ * - [2.1.2] The function chSemSignal() is invoked, after return the
+ * counter is tested.
+ * - [2.1.3] The function chSemReset() is invoked, after return the
+ * counter is tested.
* .
*/
@@ -80,8 +81,8 @@ static void test_002_001_teardown(void) {
static void test_002_001_execute(void) {
- /* The function chSemWait() is invoked, after return the counter and
- the returned message are tested.*/
+ /* [2.1.1] The function chSemWait() is invoked, after return the
+ counter and the returned message are tested.*/
test_set_step(1);
{
msg_t msg;
@@ -91,16 +92,16 @@ static void test_002_001_execute(void) {
test_assert(MSG_OK == msg, "wrong returned message");
}
- /* The function chSemSignal() is invoked, after return the counter is
- tested.*/
+ /* [2.1.2] The function chSemSignal() is invoked, after return the
+ counter is tested.*/
test_set_step(2);
{
chSemSignal(&sem1);
test_assert_lock(chSemGetCounterI(&sem1) == 1, "wrong counter value");
}
- /* The function chSemReset() is invoked, after return the counter is
- tested.*/
+ /* [2.1.3] The function chSemReset() is invoked, after return the
+ counter is tested.*/
test_set_step(3);
{
chSemReset(&sem1, 2);
@@ -114,29 +115,21 @@ static const testcase_t test_002_001 = {
test_002_001_teardown,
test_002_001_execute
};
-#endif /* CH_CFG_USE_SEMAPHORES */
-#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
/**
- * @page test_002_002 Semaphore primitives, with state change
+ * @page test_002_002 [2.2] Semaphore primitives, with state change
*
* <h2>Description</h2>
* Wait, Signal and Reset primitives are tested. The testing thread
* triggers a state change.
*
- * <h2>Conditions</h2>
- * This test is only executed if the following preprocessor condition
- * evaluates to true:
- * - CH_CFG_USE_SEMAPHORES
- * .
- *
* <h2>Test Steps</h2>
- * - The function chSemWait() is invoked, after return the counter and
- * the returned message are tested. The semaphore is signaled by
- * another thread.
- * - The function chSemWait() is invoked, after return the counter and
- * the returned message are tested. The semaphore is reset by another
- * thread.
+ * - [2.2.1] The function chSemWait() is invoked, after return the
+ * counter and the returned message are tested. The semaphore is
+ * signaled by another thread.
+ * - [2.2.2] The function chSemWait() is invoked, after return the
+ * counter and the returned message are tested. The semaphore is
+ * reset by another thread.
* .
*/
@@ -150,9 +143,9 @@ static void test_002_002_teardown(void) {
static void test_002_002_execute(void) {
- /* The function chSemWait() is invoked, after return the counter and
- the returned message are tested. The semaphore is signaled by
- another thread.*/
+ /* [2.2.1] The function chSemWait() is invoked, after return the
+ counter and the returned message are tested. The semaphore is
+ signaled by another thread.*/
test_set_step(1);
{
msg_t msg;
@@ -162,9 +155,9 @@ static void test_002_002_execute(void) {
test_assert(MSG_OK == msg, "wrong returned message");
}
- /* The function chSemWait() is invoked, after return the counter and
- the returned message are tested. The semaphore is reset by another
- thread.*/
+ /* [2.2.2] The function chSemWait() is invoked, after return the
+ counter and the returned message are tested. The semaphore is
+ reset by another thread.*/
test_set_step(2);
{
msg_t msg;
@@ -181,27 +174,20 @@ static const testcase_t test_002_002 = {
test_002_002_teardown,
test_002_002_execute
};
-#endif /* CH_CFG_USE_SEMAPHORES */
-#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
/**
- * @page test_002_003 Semaphores timeout
+ * @page test_002_003 [2.3] Semaphores timeout
*
* <h2>Description</h2>
* Timeout on semaphores is tested.
*
- * <h2>Conditions</h2>
- * This test is only executed if the following preprocessor condition
- * evaluates to true:
- * - CH_CFG_USE_SEMAPHORES
- * .
- *
* <h2>Test Steps</h2>
- * - The function chSemWaitTimeout() is invoked a first time, after
+ * - [2.3.1] The function chSemWaitTimeout() is invoked a first time,
+ * after return the system time, the counter and the returned message
+ * are tested.
+ * - [2.3.2] The function chSemWaitTimeout() is invoked again, after
* return the system time, the counter and the returned message are
* tested.
- * - The function chSemWaitTimeout() is invoked again, after return the
- * system time, the counter and the returned message are tested.
* .
*/
@@ -217,9 +203,9 @@ static void test_002_003_execute(void) {
systime_t time;
msg_t msg;
- /* The function chSemWaitTimeout() is invoked a first time, after
- return the system time, the counter and the returned message are
- tested.*/
+ /* [2.3.1] The function chSemWaitTimeout() is invoked a first time,
+ after return the system time, the counter and the returned message
+ are tested.*/
test_set_step(1);
{
time = chVTGetSystemTimeX();
@@ -231,8 +217,9 @@ static void test_002_003_execute(void) {
test_assert(MSG_TIMEOUT == msg, "wrong timeout message");
}
- /* The function chSemWaitTimeout() is invoked again, after return the
- system time, the counter and the returned message are tested.*/
+ /* [2.3.2] The function chSemWaitTimeout() is invoked again, after
+ return the system time, the counter and the returned message are
+ tested.*/
test_set_step(2);
{
time = chVTGetSystemTimeX();
@@ -251,7 +238,6 @@ static const testcase_t test_002_003 = {
test_002_003_teardown,
test_002_003_execute
};
-#endif /* CH_CFG_USE_SEMAPHORES */
/****************************************************************************
* Exported data.
@@ -261,14 +247,10 @@ static const testcase_t test_002_003 = {
* @brief Semaphores.
*/
const testcase_t * const test_sequence_002[] = {
-#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
&test_002_001,
-#endif
-#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
&test_002_002,
-#endif
-#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
&test_002_003,
-#endif
NULL
};
+
+#endif /* CH_CFG_USE_SEMAPHORES */
diff --git a/test/nil/source/test/test_sequence_003.c b/test/nil/source/test/test_sequence_003.c
index b527dec06..5be49525b 100644
--- a/test/nil/source/test/test_sequence_003.c
+++ b/test/nil/source/test/test_sequence_003.c
@@ -19,7 +19,7 @@
#include "test_root.h"
/**
- * @page test_sequence_003 Suspend/Resume and Event Flags
+ * @page test_sequence_003 [3] Suspend/Resume and Event Flags
*
* File: @ref test_sequence_003.c
*
@@ -44,19 +44,19 @@ static thread_reference_t tr1;
****************************************************************************/
/**
- * @page test_003_001 Suspend and Resume functionality
+ * @page test_003_001 [3.1] Suspend and Resume functionality
*
* <h2>Description</h2>
* The functionality of chThdSuspendTimeoutS() and chThdResumeI() is
* tested.
*
* <h2>Test Steps</h2>
- * - The function chThdSuspendTimeoutS() is invoked, the thread is
- * remotely resumed with message @p MSG_OK. On return the message and
+ * - [3.1.1] The function chThdSuspendTimeoutS() is invoked, the thread
+ * is remotely resumed with message @p MSG_OK. On return the message
+ * and the state of the reference are tested.
+ * - [3.1.2] The function chThdSuspendTimeoutS() is invoked, the thread
+ * is not resumed so a timeout must occur. On return the message and
* the state of the reference are tested.
- * - The function chThdSuspendTimeoutS() is invoked, the thread is not
- * resumed so a timeout must occur. On return the message and the
- * state of the reference are tested.
* .
*/
@@ -68,9 +68,9 @@ static void test_003_001_execute(void) {
systime_t time;
msg_t msg;
- /* The function chThdSuspendTimeoutS() is invoked, the thread is
- remotely resumed with message @p MSG_OK. On return the message and
- the state of the reference are tested.*/
+ /* [3.1.1] The function chThdSuspendTimeoutS() is invoked, the thread
+ is remotely resumed with message @p MSG_OK. On return the message
+ and the state of the reference are tested.*/
test_set_step(1);
{
chSysLock();
@@ -80,9 +80,9 @@ static void test_003_001_execute(void) {
test_assert(MSG_OK == msg,"wrong returned message");
}
- /* The function chThdSuspendTimeoutS() is invoked, the thread is not
- resumed so a timeout must occur. On return the message and the
- state of the reference are tested.*/
+ /* [3.1.2] The function chThdSuspendTimeoutS() is invoked, the thread
+ is not resumed so a timeout must occur. On return the message and
+ the state of the reference are tested.*/
test_set_step(2);
{
chSysLock();
@@ -104,9 +104,9 @@ static const testcase_t test_003_001 = {
test_003_001_execute
};
-#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
+#if (CH_CFG_USE_EVENTS) || defined(__DOXYGEN__)
/**
- * @page test_003_002 Events Flags functionality
+ * @page test_003_002 [3.2] Events Flags functionality
*
* <h2>Description</h2>
* Event flags functionality is tested.
@@ -118,15 +118,15 @@ static const testcase_t test_003_001 = {
* .
*
* <h2>Test Steps</h2>
- * - A set of event flags are set on the current thread then the
- * function chEvtWaitAnyTimeout() is invoked, the function is
+ * - [3.2.1] A set of event flags are set on the current thread then
+ * the function chEvtWaitAnyTimeout() is invoked, the function is
* supposed to return immediately because the event flags are already
* pending, after return the events mask is tested.
- * - The pending event flags mask is cleared then the function
+ * - [3.2.2] The pending event flags mask is cleared then the function
* chEvtWaitAnyTimeout() is invoked, after return the events mask is
* tested. The thread is signaled by another thread.
- * - The function chEvtWaitAnyTimeout() is invoked, no event can wakeup
- * the thread, the function must return because timeout.
+ * - [3.2.3] The function chEvtWaitAnyTimeout() is invoked, no event
+ * can wakeup the thread, the function must return because timeout.
* .
*/
@@ -134,8 +134,8 @@ static void test_003_002_execute(void) {
systime_t time;
eventmask_t events;
- /* A set of event flags are set on the current thread then the
- function chEvtWaitAnyTimeout() is invoked, the function is
+ /* [3.2.1] A set of event flags are set on the current thread then
+ the function chEvtWaitAnyTimeout() is invoked, the function is
supposed to return immediately because the event flags are already
pending, after return the events mask is tested.*/
test_set_step(1);
@@ -147,7 +147,7 @@ static void test_003_002_execute(void) {
test_assert((eventmask_t)0x55 == events, "wrong events mask");
}
- /* The pending event flags mask is cleared then the function
+ /* [3.2.2] The pending event flags mask is cleared then the function
chEvtWaitAnyTimeout() is invoked, after return the events mask is
tested. The thread is signaled by another thread.*/
test_set_step(2);
@@ -159,8 +159,8 @@ static void test_003_002_execute(void) {
test_assert((eventmask_t)0x55 == events, "wrong events mask");
}
- /* The function chEvtWaitAnyTimeout() is invoked, no event can wakeup
- the thread, the function must return because timeout.*/
+ /* [3.2.3] The function chEvtWaitAnyTimeout() is invoked, no event
+ can wakeup the thread, the function must return because timeout.*/
test_set_step(3);
{
time = chVTGetSystemTimeX();
@@ -189,7 +189,7 @@ static const testcase_t test_003_002 = {
*/
const testcase_t * const test_sequence_003[] = {
&test_003_001,
-#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
+#if (CH_CFG_USE_EVENTS) || defined(__DOXYGEN__)
&test_003_002,
#endif
NULL
diff --git a/test/nil/source/test/test_sequence_004.c b/test/nil/source/test/test_sequence_004.c
index 2035849bd..a4b3765f5 100644
--- a/test/nil/source/test/test_sequence_004.c
+++ b/test/nil/source/test/test_sequence_004.c
@@ -19,7 +19,7 @@
#include "test_root.h"
/**
- * @page test_sequence_004 Mailboxes
+ * @page test_sequence_004 [4] Mailboxes
*
* File: @ref test_sequence_004.c
*
@@ -27,6 +27,12 @@
* This sequence tests the ChibiOS/NIL functionalities related to
* mailboxes.
*
+ * <h2>Conditions</h2>
+ * This sequence is only executed if the following preprocessor condition
+ * evaluates to true:
+ * - CH_CFG_USE_MAILBOXES
+ * .
+ *
* <h2>Test Cases</h2>
* - @subpage test_004_001
* - @subpage test_004_002
@@ -34,6 +40,8 @@
* .
*/
+#if (CH_CFG_USE_MAILBOXES) || defined(__DOXYGEN__)
+
/****************************************************************************
* Shared code.
****************************************************************************/
@@ -48,31 +56,27 @@ static MAILBOX_DECL(mb1, mb_buffer, MB_SIZE);
* Test cases.
****************************************************************************/
-#if CH_CFG_USE_MAILBOXES || defined(__DOXYGEN__)
/**
- * @page test_004_001 Mailbox normal API, non-blocking tests
+ * @page test_004_001 [4.1] Mailbox normal API, non-blocking tests
*
* <h2>Description</h2>
* The mailbox normal API is tested without triggering blocking
* conditions.
*
- * <h2>Conditions</h2>
- * This test is only executed if the following preprocessor condition
- * evaluates to true:
- * - CH_CFG_USE_MAILBOXES
- * .
- *
* <h2>Test Steps</h2>
- * - Testing the mailbox size.
- * - Resetting the mailbox, conditions are checked, no errors expected.
- * - Filling the mailbox using chMBPost() and chMBPostAhead() once, no
- * errors expected.
- * - Testing intermediate conditions. Data pointers must be aligned,
- * semaphore counters are checked.
- * - Emptying the mailbox using chMBFetch(), no errors expected.
- * - Posting and then fetching one more message, no errors expected.
- * - Testing final conditions. Data pointers must be aligned to buffer
- * start, semaphore counters are checked.
+ * - [4.1.1] Testing the mailbox size.
+ * - [4.1.2] Resetting the mailbox, conditions are checked, no errors
+ * expected.
+ * - [4.1.3] Filling the mailbox using chMBPost() and chMBPostAhead()
+ * once, no errors expected.
+ * - [4.1.4] Testing intermediate conditions. Data pointers must be
+ * aligned, semaphore counters are checked.
+ * - [4.1.5] Emptying the mailbox using chMBFetch(), no errors
+ * expected.
+ * - [4.1.6] Posting and then fetching one more message, no errors
+ * expected.
+ * - [4.1.7] Testing final conditions. Data pointers must be aligned to
+ * buffer start, semaphore counters are checked.
* .
*/
@@ -88,13 +92,13 @@ static void test_004_001_execute(void) {
msg_t msg1, msg2;
unsigned i;
- /* Testing the mailbox size.*/
+ /* [4.1.1] Testing the mailbox size.*/
test_set_step(1);
{
test_assert_lock(chMBGetFreeCountI(&mb1) == MB_SIZE, "wrong size");
}
- /* Resetting the mailbox, conditions are checked, no errors
+ /* [4.1.2] Resetting the mailbox, conditions are checked, no errors
expected.*/
test_set_step(2);
{
@@ -105,8 +109,8 @@ static void test_004_001_execute(void) {
test_assert_lock(mb1.buffer == mb1.rdptr, "read pointer not aligned to base");
}
- /* Filling the mailbox using chMBPost() and chMBPostAhead() once, no
- errors expected.*/
+ /* [4.1.3] Filling the mailbox using chMBPost() and chMBPostAhead()
+ once, no errors expected.*/
test_set_step(3);
{
for (i = 0; i < MB_SIZE - 1; i++) {
@@ -117,8 +121,8 @@ static void test_004_001_execute(void) {
test_assert(msg1 == MSG_OK, "wrong wake-up message");
}
- /* Testing intermediate conditions. Data pointers must be aligned,
- semaphore counters are checked.*/
+ /* [4.1.4] Testing intermediate conditions. Data pointers must be
+ aligned, semaphore counters are checked.*/
test_set_step(4);
{
test_assert_lock(chMBGetFreeCountI(&mb1) == 0, "still empty");
@@ -126,7 +130,8 @@ static void test_004_001_execute(void) {
test_assert_lock(mb1.rdptr == mb1.wrptr, "pointers not aligned");
}
- /* Emptying the mailbox using chMBFetch(), no errors expected.*/
+ /* [4.1.5] Emptying the mailbox using chMBFetch(), no errors
+ expected.*/
test_set_step(5);
{
for (i = 0; i < MB_SIZE; i++) {
@@ -137,7 +142,8 @@ static void test_004_001_execute(void) {
test_assert_sequence("ABCD", "wrong get sequence");
}
- /* Posting and then fetching one more message, no errors expected.*/
+ /* [4.1.6] Posting and then fetching one more message, no errors
+ expected.*/
test_set_step(6);
{
msg1 = chMBPost(&mb1, 'B' + i, TIME_INFINITE);
@@ -146,8 +152,8 @@ static void test_004_001_execute(void) {
test_assert(msg1 == MSG_OK, "wrong wake-up message");
}
- /* Testing final conditions. Data pointers must be aligned to buffer
- start, semaphore counters are checked.*/
+ /* [4.1.7] Testing final conditions. Data pointers must be aligned to
+ buffer start, semaphore counters are checked.*/
test_set_step(7);
{
test_assert_lock(chMBGetFreeCountI(&mb1) == MB_SIZE, "not empty");
@@ -163,33 +169,28 @@ static const testcase_t test_004_001 = {
test_004_001_teardown,
test_004_001_execute
};
-#endif /* CH_CFG_USE_MAILBOXES */
-#if CH_CFG_USE_MAILBOXES || defined(__DOXYGEN__)
/**
- * @page test_004_002 Mailbox I-Class API, non-blocking tests
+ * @page test_004_002 [4.2] Mailbox I-Class API, non-blocking tests
*
* <h2>Description</h2>
* The mailbox I-Class API is tested without triggering blocking
* conditions.
*
- * <h2>Conditions</h2>
- * This test is only executed if the following preprocessor condition
- * evaluates to true:
- * - CH_CFG_USE_MAILBOXES
- * .
- *
* <h2>Test Steps</h2>
- * - Testing the mailbox size.
- * - Resetting the mailbox, conditions are checked, no errors expected.
- * - Filling the mailbox using chMBPostI() and chMBPostAheadI() once,
- * no errors expected.
- * - Testing intermediate conditions. Data pointers must be aligned,
- * semaphore counters are checked.
- * - Emptying the mailbox using chMBFetchI(), no errors expected.
- * - Posting and then fetching one more message, no errors expected.
- * - Testing final conditions. Data pointers must be aligned to buffer
- * start, semaphore counters are checked.
+ * - [4.2.1] Testing the mailbox size.
+ * - [4.2.2] Resetting the mailbox, conditions are checked, no errors
+ * expected.
+ * - [4.2.3] Filling the mailbox using chMBPostI() and chMBPostAheadI()
+ * once, no errors expected.
+ * - [4.2.4] Testing intermediate conditions. Data pointers must be
+ * aligned, semaphore counters are checked.
+ * - [4.2.5] Emptying the mailbox using chMBFetchI(), no errors
+ * expected.
+ * - [4.2.6] Posting and then fetching one more message, no errors
+ * expected.
+ * - [4.2.7] Testing final conditions. Data pointers must be aligned to
+ * buffer start, semaphore counters are checked.
* .
*/
@@ -205,13 +206,13 @@ static void test_004_002_execute(void) {
msg_t msg1, msg2;
unsigned i;
- /* Testing the mailbox size.*/
+ /* [4.2.1] Testing the mailbox size.*/
test_set_step(1);
{
test_assert_lock(chMBGetFreeCountI(&mb1) == MB_SIZE, "wrong size");
}
- /* Resetting the mailbox, conditions are checked, no errors
+ /* [4.2.2] Resetting the mailbox, conditions are checked, no errors
expected.*/
test_set_step(2);
{
@@ -224,8 +225,8 @@ static void test_004_002_execute(void) {
test_assert_lock(mb1.buffer == mb1.rdptr, "read pointer not aligned to base");
}
- /* Filling the mailbox using chMBPostI() and chMBPostAheadI() once,
- no errors expected.*/
+ /* [4.2.3] Filling the mailbox using chMBPostI() and chMBPostAheadI()
+ once, no errors expected.*/
test_set_step(3);
{
for (i = 0; i < MB_SIZE - 1; i++) {
@@ -240,8 +241,8 @@ static void test_004_002_execute(void) {
test_assert(msg1 == MSG_OK, "wrong wake-up message");
}
- /* Testing intermediate conditions. Data pointers must be aligned,
- semaphore counters are checked.*/
+ /* [4.2.4] Testing intermediate conditions. Data pointers must be
+ aligned, semaphore counters are checked.*/
test_set_step(4);
{
test_assert_lock(chMBGetFreeCountI(&mb1) == 0, "still empty");
@@ -249,7 +250,8 @@ static void test_004_002_execute(void) {
test_assert_lock(mb1.rdptr == mb1.wrptr, "pointers not aligned");
}
- /* Emptying the mailbox using chMBFetchI(), no errors expected.*/
+ /* [4.2.5] Emptying the mailbox using chMBFetchI(), no errors
+ expected.*/
test_set_step(5);
{
for (i = 0; i < MB_SIZE; i++) {
@@ -262,7 +264,8 @@ static void test_004_002_execute(void) {
test_assert_sequence("ABCD", "wrong get sequence");
}
- /* Posting and then fetching one more message, no errors expected.*/
+ /* [4.2.6] Posting and then fetching one more message, no errors
+ expected.*/
test_set_step(6);
{
msg1 = chMBPost(&mb1, 'B' + i, TIME_INFINITE);
@@ -271,8 +274,8 @@ static void test_004_002_execute(void) {
test_assert(msg1 == MSG_OK, "wrong wake-up message");
}
- /* Testing final conditions. Data pointers must be aligned to buffer
- start, semaphore counters are checked.*/
+ /* [4.2.7] Testing final conditions. Data pointers must be aligned to
+ buffer start, semaphore counters are checked.*/
test_set_step(7);
{
test_assert_lock(chMBGetFreeCountI(&mb1) == MB_SIZE, "not empty");
@@ -288,27 +291,19 @@ static const testcase_t test_004_002 = {
test_004_002_teardown,
test_004_002_execute
};
-#endif /* CH_CFG_USE_MAILBOXES */
-#if CH_CFG_USE_MAILBOXES || defined(__DOXYGEN__)
/**
- * @page test_004_003 Mailbox timeouts
+ * @page test_004_003 [4.3] Mailbox timeouts
*
* <h2>Description</h2>
* The mailbox API is tested for timeouts.
*
- * <h2>Conditions</h2>
- * This test is only executed if the following preprocessor condition
- * evaluates to true:
- * - CH_CFG_USE_MAILBOXES
- * .
- *
* <h2>Test Steps</h2>
- * - Filling the mailbox.
- * - Testing chMBPost(), chMBPostI(), chMBPostAhead() and
+ * - [4.3.1] Filling the mailbox.
+ * - [4.3.2] Testing chMBPost(), chMBPostI(), chMBPostAhead() and
* chMBPostAheadI() timeout.
- * - Resetting the mailbox.
- * - Testing chMBFetch() and chMBFetchI() timeout.
+ * - [4.3.3] Resetting the mailbox.
+ * - [4.3.4] Testing chMBFetch() and chMBFetchI() timeout.
* .
*/
@@ -324,7 +319,7 @@ static void test_004_003_execute(void) {
msg_t msg1, msg2;
unsigned i;
- /* Filling the mailbox.*/
+ /* [4.3.1] Filling the mailbox.*/
test_set_step(1);
{
for (i = 0; i < MB_SIZE; i++) {
@@ -333,7 +328,7 @@ static void test_004_003_execute(void) {
}
}
- /* Testing chMBPost(), chMBPostI(), chMBPostAhead() and
+ /* [4.3.2] Testing chMBPost(), chMBPostI(), chMBPostAhead() and
chMBPostAheadI() timeout.*/
test_set_step(2);
{
@@ -351,13 +346,13 @@ static void test_004_003_execute(void) {
test_assert(msg1 == MSG_TIMEOUT, "wrong wake-up message");
}
- /* Resetting the mailbox.*/
+ /* [4.3.3] Resetting the mailbox.*/
test_set_step(3);
{
chMBReset(&mb1);
}
- /* Testing chMBFetch() and chMBFetchI() timeout.*/
+ /* [4.3.4] Testing chMBFetch() and chMBFetchI() timeout.*/
test_set_step(4);
{
msg1 = chMBFetch(&mb1, &msg2, 1);
@@ -375,7 +370,6 @@ static const testcase_t test_004_003 = {
test_004_003_teardown,
test_004_003_execute
};
-#endif /* CH_CFG_USE_MAILBOXES */
/****************************************************************************
* Exported data.
@@ -385,14 +379,10 @@ static const testcase_t test_004_003 = {
* @brief Mailboxes.
*/
const testcase_t * const test_sequence_004[] = {
-#if CH_CFG_USE_MAILBOXES || defined(__DOXYGEN__)
&test_004_001,
-#endif
-#if CH_CFG_USE_MAILBOXES || defined(__DOXYGEN__)
&test_004_002,
-#endif
-#if CH_CFG_USE_MAILBOXES || defined(__DOXYGEN__)
&test_004_003,
-#endif
NULL
};
+
+#endif /* CH_CFG_USE_MAILBOXES */
diff --git a/test/nil/source/test/test_sequence_005.c b/test/nil/source/test/test_sequence_005.c
index e75a36252..f37622787 100644
--- a/test/nil/source/test/test_sequence_005.c
+++ b/test/nil/source/test/test_sequence_005.c
@@ -19,7 +19,7 @@
#include "test_root.h"
/**
- * @page test_sequence_005 Memory Pools
+ * @page test_sequence_005 [5] Memory Pools
*
* File: @ref test_sequence_005.c
*
@@ -27,6 +27,12 @@
* This sequence tests the ChibiOS/NIL functionalities related to
* memory pools.
*
+ * <h2>Conditions</h2>
+ * This sequence is only executed if the following preprocessor condition
+ * evaluates to true:
+ * - CH_CFG_USE_MEMPOOLS
+ * .
+ *
* <h2>Test Cases</h2>
* - @subpage test_005_001
* - @subpage test_005_002
@@ -34,6 +40,8 @@
* .
*/
+#if (CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__)
+
/****************************************************************************
* Shared code.
****************************************************************************/
@@ -56,29 +64,22 @@ static void *null_provider(size_t size, unsigned align) {
* Test cases.
****************************************************************************/
-#if CH_CFG_USE_MEMPOOLS || defined(__DOXYGEN__)
/**
- * @page test_005_001 Loading and empting a memory pool
+ * @page test_005_001 [5.1] Loading and emptying a memory pool
*
* <h2>Description</h2>
- * The memory pool functionality is tested by loading and empting it,
+ * The memory pool functionality is tested by loading and emptying it,
* all conditions are tested.
*
- * <h2>Conditions</h2>
- * This test is only executed if the following preprocessor condition
- * evaluates to true:
- * - CH_CFG_USE_MEMPOOLS
- * .
- *
* <h2>Test Steps</h2>
- * - Adding the objects to the pool using chPoolLoadArray().
- * - Emptying the pool using chPoolAlloc().
- * - Now must be empty.
- * - Adding the objects to the pool using chPoolFree().
- * - Emptying the pool using chPoolAlloc() again.
- * - Now must be empty again.
- * - Covering the case where a provider is unable to return more
- * memory.
+ * - [5.1.1] Adding the objects to the pool using chPoolLoadArray().
+ * - [5.1.2] Emptying the pool using chPoolAlloc().
+ * - [5.1.3] Now must be empty.
+ * - [5.1.4] Adding the objects to the pool using chPoolFree().
+ * - [5.1.5] Emptying the pool using chPoolAlloc() again.
+ * - [5.1.6] Now must be empty again.
+ * - [5.1.7] Covering the case where a provider is unable to return
+ * more memory.
* .
*/
@@ -89,47 +90,47 @@ static void test_005_001_setup(void) {
static void test_005_001_execute(void) {
unsigned i;
- /* Adding the objects to the pool using chPoolLoadArray().*/
+ /* [5.1.1] Adding the objects to the pool using chPoolLoadArray().*/
test_set_step(1);
{
chPoolLoadArray(&mp1, objects, MEMORY_POOL_SIZE);
}
- /* Emptying the pool using chPoolAlloc().*/
+ /* [5.1.2] Emptying the pool using chPoolAlloc().*/
test_set_step(2);
{
for (i = 0; i < MEMORY_POOL_SIZE; i++)
test_assert(chPoolAlloc(&mp1) != NULL, "list empty");
}
- /* Now must be empty.*/
+ /* [5.1.3] Now must be empty.*/
test_set_step(3);
{
test_assert(chPoolAlloc(&mp1) == NULL, "list not empty");
}
- /* Adding the objects to the pool using chPoolFree().*/
+ /* [5.1.4] Adding the objects to the pool using chPoolFree().*/
test_set_step(4);
{
for (i = 0; i < MEMORY_POOL_SIZE; i++)
chPoolFree(&mp1, &objects[i]);
}
- /* Emptying the pool using chPoolAlloc() again.*/
+ /* [5.1.5] Emptying the pool using chPoolAlloc() again.*/
test_set_step(5);
{
for (i = 0; i < MEMORY_POOL_SIZE; i++)
test_assert(chPoolAlloc(&mp1) != NULL, "list empty");
}
- /* Now must be empty again.*/
+ /* [5.1.6] Now must be empty again.*/
test_set_step(6);
{
test_assert(chPoolAlloc(&mp1) == NULL, "list not empty");
}
- /* Covering the case where a provider is unable to return more
- memory.*/
+ /* [5.1.7] Covering the case where a provider is unable to return
+ more memory.*/
test_set_step(7);
{
chPoolObjectInit(&mp1, sizeof (uint32_t), null_provider);
@@ -138,34 +139,34 @@ static void test_005_001_execute(void) {
}
static const testcase_t test_005_001 = {
- "Loading and empting a memory pool",
+ "Loading and emptying a memory pool",
test_005_001_setup,
NULL,
test_005_001_execute
};
-#endif /* CH_CFG_USE_MEMPOOLS */
-#if (CH_CFG_USE_MEMPOOLS && CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__)
+#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__)
/**
- * @page test_005_002 Loading and empting a guarded memory pool without waiting
+ * @page test_005_002 [5.2] Loading and emptying a guarded memory pool without waiting
*
* <h2>Description</h2>
- * The memory pool functionality is tested by loading and empting it,
+ * The memory pool functionality is tested by loading and emptying it,
* all conditions are tested.
*
* <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition
* evaluates to true:
- * - (CH_CFG_USE_MEMPOOLS && CH_CFG_USE_SEMAPHORES)
+ * - CH_CFG_USE_SEMAPHORES
* .
*
* <h2>Test Steps</h2>
- * - Adding the objects to the pool using chGuardedPoolLoadArray().
- * - Emptying the pool using chGuardedPoolAllocTimeout().
- * - Now must be empty.
- * - Adding the objects to the pool using chGuardedPoolFree().
- * - Emptying the pool using chGuardedPoolAllocTimeout() again.
- * - Now must be empty again.
+ * - [5.2.1] Adding the objects to the pool using
+ * chGuardedPoolLoadArray().
+ * - [5.2.2] Emptying the pool using chGuardedPoolAllocTimeout().
+ * - [5.2.3] Now must be empty.
+ * - [5.2.4] Adding the objects to the pool using chGuardedPoolFree().
+ * - [5.2.5] Emptying the pool using chGuardedPoolAllocTimeout() again.
+ * - [5.2.6] Now must be empty again.
* .
*/
@@ -176,40 +177,43 @@ static void test_005_002_setup(void) {
static void test_005_002_execute(void) {
unsigned i;
- /* Adding the objects to the pool using chGuardedPoolLoadArray().*/
+ /* [5.2.1] Adding the objects to the pool using
+ chGuardedPoolLoadArray().*/
test_set_step(1);
{
chGuardedPoolLoadArray(&gmp1, objects, MEMORY_POOL_SIZE);
}
- /* Emptying the pool using chGuardedPoolAllocTimeout().*/
+ /* [5.2.2] Emptying the pool using chGuardedPoolAllocTimeout().*/
test_set_step(2);
{
for (i = 0; i < MEMORY_POOL_SIZE; i++)
test_assert(chGuardedPoolAllocTimeout(&gmp1, TIME_IMMEDIATE) != NULL, "list empty");
}
- /* Now must be empty.*/
+ /* [5.2.3] Now must be empty.*/
test_set_step(3);
{
test_assert(chGuardedPoolAllocTimeout(&gmp1, TIME_IMMEDIATE) == NULL, "list not empty");
}
- /* Adding the objects to the pool using chGuardedPoolFree().*/
+ /* [5.2.4] Adding the objects to the pool using
+ chGuardedPoolFree().*/
test_set_step(4);
{
for (i = 0; i < MEMORY_POOL_SIZE; i++)
chGuardedPoolFree(&gmp1, &objects[i]);
}
- /* Emptying the pool using chGuardedPoolAllocTimeout() again.*/
+ /* [5.2.5] Emptying the pool using chGuardedPoolAllocTimeout()
+ again.*/
test_set_step(5);
{
for (i = 0; i < MEMORY_POOL_SIZE; i++)
test_assert(chGuardedPoolAllocTimeout(&gmp1, TIME_IMMEDIATE) != NULL, "list empty");
}
- /* Now must be empty again.*/
+ /* [5.2.6] Now must be empty again.*/
test_set_step(6);
{
test_assert(chGuardedPoolAllocTimeout(&gmp1, TIME_IMMEDIATE) == NULL, "list not empty");
@@ -217,16 +221,16 @@ static void test_005_002_execute(void) {
}
static const testcase_t test_005_002 = {
- "Loading and empting a guarded memory pool without waiting",
+ "Loading and emptying a guarded memory pool without waiting",
test_005_002_setup,
NULL,
test_005_002_execute
};
-#endif /* (CH_CFG_USE_MEMPOOLS && CH_CFG_USE_SEMAPHORES) */
+#endif /* CH_CFG_USE_SEMAPHORES */
-#if (CH_CFG_USE_MEMPOOLS && CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__)
+#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__)
/**
- * @page test_005_003 Guarded Memory Pools timeout
+ * @page test_005_003 [5.3] Guarded Memory Pools timeout
*
* <h2>Description</h2>
* The timeout features for the Guarded Memory Pools is tested.
@@ -234,12 +238,12 @@ static const testcase_t test_005_002 = {
* <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition
* evaluates to true:
- * - (CH_CFG_USE_MEMPOOLS && CH_CFG_USE_SEMAPHORES)
+ * - CH_CFG_USE_SEMAPHORES
* .
*
* <h2>Test Steps</h2>
- * - Trying to allocate with 100mS timeout, must fail because the pool
- * is empty.
+ * - [5.3.1] Trying to allocate with 100mS timeout, must fail because
+ * the pool is empty.
* .
*/
@@ -249,8 +253,8 @@ static void test_005_003_setup(void) {
static void test_005_003_execute(void) {
- /* Trying to allocate with 100mS timeout, must fail because the pool
- is empty.*/
+ /* [5.3.1] Trying to allocate with 100mS timeout, must fail because
+ the pool is empty.*/
test_set_step(1);
{
test_assert(chGuardedPoolAllocTimeout(&gmp1, MS2ST(100)) == NULL, "list not empty");
@@ -263,7 +267,7 @@ static const testcase_t test_005_003 = {
NULL,
test_005_003_execute
};
-#endif /* (CH_CFG_USE_MEMPOOLS && CH_CFG_USE_SEMAPHORES) */
+#endif /* CH_CFG_USE_SEMAPHORES */
/****************************************************************************
* Exported data.
@@ -273,14 +277,14 @@ static const testcase_t test_005_003 = {
* @brief Memory Pools.
*/
const testcase_t * const test_sequence_005[] = {
-#if CH_CFG_USE_MEMPOOLS || defined(__DOXYGEN__)
&test_005_001,
-#endif
-#if (CH_CFG_USE_MEMPOOLS && CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__)
+#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__)
&test_005_002,
#endif
-#if (CH_CFG_USE_MEMPOOLS && CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__)
+#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__)
&test_005_003,
#endif
NULL
};
+
+#endif /* CH_CFG_USE_MEMPOOLS */
diff --git a/test/nil/source/test/test_sequence_006.c b/test/nil/source/test/test_sequence_006.c
index 0261f1026..07addd7e2 100644
--- a/test/nil/source/test/test_sequence_006.c
+++ b/test/nil/source/test/test_sequence_006.c
@@ -19,7 +19,7 @@
#include "test_root.h"
/**
- * @page test_sequence_006 Memory Heaps
+ * @page test_sequence_006 [6] Memory Heaps
*
* File: @ref test_sequence_006.c
*
@@ -27,12 +27,20 @@
* This sequence tests the ChibiOS/NIL functionalities related to
* memory heaps.
*
+ * <h2>Conditions</h2>
+ * This sequence is only executed if the following preprocessor condition
+ * evaluates to true:
+ * - CH_CFG_USE_HEAP
+ * .
+ *
* <h2>Test Cases</h2>
* - @subpage test_006_001
* - @subpage test_006_002
* .
*/
+#if (CH_CFG_USE_HEAP) || defined(__DOXYGEN__)
+
/****************************************************************************
* Shared code.
****************************************************************************/
@@ -47,9 +55,8 @@ static CH_HEAP_AREA(myheap, HEAP_SIZE);
* Test cases.
****************************************************************************/
-#if CH_CFG_USE_HEAP || defined(__DOXYGEN__)
/**
- * @page test_006_001 Allocation and fragmentation
+ * @page test_006_001 [6.1] Allocation and fragmentation
*
* <h2>Description</h2>
* Series of allocations/deallocations are performed in carefully
@@ -57,30 +64,24 @@ static CH_HEAP_AREA(myheap, HEAP_SIZE);
* inside the allocator. The test expects to find the heap back to the
* initial status after each sequence.
*
- * <h2>Conditions</h2>
- * This test is only executed if the following preprocessor condition
- * evaluates to true:
- * - CH_CFG_USE_HEAP
- * .
- *
* <h2>Test Steps</h2>
- * - Testing initial conditions, the heap must not be fragmented and
- * one free block present.
- * - Trying to allocate an block bigger than available space, an error
- * is expected.
- * - Single block allocation using chHeapAlloc() then the block is
- * freed using chHeapFree(), must not fail.
- * - Using chHeapStatus() to assess the heap state. There must be at
- * least one free block of sufficient size.
- * - Allocating then freeing in the same order.
- * - Allocating then freeing in reverse order.
- * - Small fragments handling. Checking the behavior when allocating
- * blocks with size not multiple of alignment unit.
- * - Skipping a fragment, the first fragment in the list is too small
- * so the allocator must pick the second one.
- * - Allocating the whole available space.
- * - Testing final conditions. The heap geometry must be the same than
- * the one registered at beginning.
+ * - [6.1.1] Testing initial conditions, the heap must not be
+ * fragmented and one free block present.
+ * - [6.1.2] Trying to allocate an block bigger than available space,
+ * an error is expected.
+ * - [6.1.3] Single block allocation using chHeapAlloc() then the block
+ * is freed using chHeapFree(), must not fail.
+ * - [6.1.4] Using chHeapStatus() to assess the heap state. There must
+ * be at least one free block of sufficient size.
+ * - [6.1.5] Allocating then freeing in the same order.
+ * - [6.1.6] Allocating then freeing in reverse order.
+ * - [6.1.7] Small fragments handling. Checking the behavior when
+ * allocating blocks with size not multiple of alignment unit.
+ * - [6.1.8] Skipping a fragment, the first fragment in the list is too
+ * small so the allocator must pick the second one.
+ * - [6.1.9] Allocating the whole available space.
+ * - [6.1.10] Testing final conditions. The heap geometry must be the
+ * same than the one registered at beginning.
* .
*/
@@ -92,23 +93,23 @@ static void test_006_001_execute(void) {
void *p1, *p2, *p3;
size_t n, sz;
- /* Testing initial conditions, the heap must not be fragmented and
- one free block present.*/
+ /* [6.1.1] Testing initial conditions, the heap must not be
+ fragmented and one free block present.*/
test_set_step(1);
{
test_assert(chHeapStatus(&test_heap, &sz, NULL) == 1, "heap fragmented");
}
- /* Trying to allocate an block bigger than available space, an error
- is expected.*/
+ /* [6.1.2] Trying to allocate an block bigger than available space,
+ an error is expected.*/
test_set_step(2);
{
p1 = chHeapAlloc(&test_heap, HEAP_SIZE * 2);
test_assert(p1 == NULL, "allocation not failed");
}
- /* Single block allocation using chHeapAlloc() then the block is
- freed using chHeapFree(), must not fail.*/
+ /* [6.1.3] Single block allocation using chHeapAlloc() then the block
+ is freed using chHeapFree(), must not fail.*/
test_set_step(3);
{
p1 = chHeapAlloc(&test_heap, ALLOC_SIZE);
@@ -116,8 +117,8 @@ static void test_006_001_execute(void) {
chHeapFree(p1);
}
- /* Using chHeapStatus() to assess the heap state. There must be at
- least one free block of sufficient size.*/
+ /* [6.1.4] Using chHeapStatus() to assess the heap state. There must
+ be at least one free block of sufficient size.*/
test_set_step(4);
{
size_t total_size, largest_size;
@@ -128,7 +129,7 @@ static void test_006_001_execute(void) {
test_assert(total_size == largest_size, "unexpected heap state");
}
- /* Allocating then freeing in the same order.*/
+ /* [6.1.5] Allocating then freeing in the same order.*/
test_set_step(5);
{
p1 = chHeapAlloc(&test_heap, ALLOC_SIZE);
@@ -140,7 +141,7 @@ static void test_006_001_execute(void) {
test_assert(chHeapStatus(&test_heap, &n, NULL) == 1, "heap fragmented");
}
- /* Allocating then freeing in reverse order.*/
+ /* [6.1.6] Allocating then freeing in reverse order.*/
test_set_step(6);
{
p1 = chHeapAlloc(&test_heap, ALLOC_SIZE);
@@ -152,8 +153,8 @@ static void test_006_001_execute(void) {
test_assert(chHeapStatus(&test_heap, &n, NULL) == 1, "heap fragmented");
}
- /* Small fragments handling. Checking the behavior when allocating
- blocks with size not multiple of alignment unit.*/
+ /* [6.1.7] Small fragments handling. Checking the behavior when
+ allocating blocks with size not multiple of alignment unit.*/
test_set_step(7);
{
p1 = chHeapAlloc(&test_heap, ALLOC_SIZE + 1);
@@ -170,8 +171,8 @@ static void test_006_001_execute(void) {
test_assert(chHeapStatus(&test_heap, &n, NULL) == 1, "heap fragmented");
}
- /* Skipping a fragment, the first fragment in the list is too small
- so the allocator must pick the second one.*/
+ /* [6.1.8] Skipping a fragment, the first fragment in the list is too
+ small so the allocator must pick the second one.*/
test_set_step(8);
{
p1 = chHeapAlloc(&test_heap, ALLOC_SIZE);
@@ -184,7 +185,7 @@ static void test_006_001_execute(void) {
test_assert(chHeapStatus(&test_heap, &n, NULL) == 1, "heap fragmented");
}
- /* Allocating the whole available space.*/
+ /* [6.1.9] Allocating the whole available space.*/
test_set_step(9);
{
(void)chHeapStatus(&test_heap, &n, NULL);
@@ -194,8 +195,8 @@ static void test_006_001_execute(void) {
chHeapFree(p1);
}
- /* Testing final conditions. The heap geometry must be the same than
- the one registered at beginning.*/
+ /* [6.1.10] Testing final conditions. The heap geometry must be the
+ same than the one registered at beginning.*/
test_set_step(10);
{
test_assert(chHeapStatus(&test_heap, &n, NULL) == 1, "heap fragmented");
@@ -209,26 +210,18 @@ static const testcase_t test_006_001 = {
NULL,
test_006_001_execute
};
-#endif /* CH_CFG_USE_HEAP */
-#if CH_CFG_USE_HEAP || defined(__DOXYGEN__)
/**
- * @page test_006_002 Default Heap
+ * @page test_006_002 [6.2] Default Heap
*
* <h2>Description</h2>
* The default heap is pre-allocated in the system. We test base
* functionality.
*
- * <h2>Conditions</h2>
- * This test is only executed if the following preprocessor condition
- * evaluates to true:
- * - CH_CFG_USE_HEAP
- * .
- *
* <h2>Test Steps</h2>
- * - Single block allocation using chHeapAlloc() then the block is
- * freed using chHeapFree(), must not fail.
- * - Testing allocation failure.
+ * - [6.2.1] Single block allocation using chHeapAlloc() then the block
+ * is freed using chHeapFree(), must not fail.
+ * - [6.2.2] Testing allocation failure.
* .
*/
@@ -236,8 +229,8 @@ static void test_006_002_execute(void) {
void *p1;
size_t total_size, largest_size;
- /* Single block allocation using chHeapAlloc() then the block is
- freed using chHeapFree(), must not fail.*/
+ /* [6.2.1] Single block allocation using chHeapAlloc() then the block
+ is freed using chHeapFree(), must not fail.*/
test_set_step(1);
{
(void)chHeapStatus(NULL, &total_size, &largest_size);
@@ -246,7 +239,7 @@ static void test_006_002_execute(void) {
chHeapFree(p1);
}
- /* Testing allocation failure.*/
+ /* [6.2.2] Testing allocation failure.*/
test_set_step(2);
{
p1 = chHeapAlloc(NULL, (size_t)-256);
@@ -260,7 +253,6 @@ static const testcase_t test_006_002 = {
NULL,
test_006_002_execute
};
-#endif /* CH_CFG_USE_HEAP */
/****************************************************************************
* Exported data.
@@ -270,11 +262,9 @@ static const testcase_t test_006_002 = {
* @brief Memory Heaps.
*/
const testcase_t * const test_sequence_006[] = {
-#if CH_CFG_USE_HEAP || defined(__DOXYGEN__)
&test_006_001,
-#endif
-#if CH_CFG_USE_HEAP || defined(__DOXYGEN__)
&test_006_002,
-#endif
NULL
};
+
+#endif /* CH_CFG_USE_HEAP */
diff --git a/test/rt/configuration.xml b/test/rt/configuration.xml
index 7b4bf469f..d02b17b75 100644
--- a/test/rt/configuration.xml
+++ b/test/rt/configuration.xml
@@ -1343,10 +1343,10 @@ static void *null_provider(size_t size, unsigned align) {
<cases>
<case>
<brief>
- <value>Loading and empting a memory pool.</value>
+ <value>Loading and emptying a memory pool.</value>
</brief>
<description>
- <value>The memory pool functionality is tested by loading and empting it, all conditions are tested.</value>
+ <value>The memory pool functionality is tested by loading and emptying it, all conditions are tested.</value>
</description>
<condition>
<value />
@@ -1448,10 +1448,10 @@ test_assert(chPoolAlloc(&mp1) == NULL, "provider returned memory");]]></value>
</case>
<case>
<brief>
- <value>Loading and empting a guarded memory pool without waiting.</value>
+ <value>Loading and emptying a guarded memory pool without waiting.</value>
</brief>
<description>
- <value>The memory pool functionality is tested by loading and empting it, all conditions are tested.</value>
+ <value>The memory pool functionality is tested by loading and emptying it, all conditions are tested.</value>
</description>
<condition>
<value>CH_CFG_USE_SEMAPHORES</value>