From 8795d6011446bb4d12968c7e155e047a8467e3db Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Wed, 9 Mar 2016 14:35:51 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9057 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/nasa_osal/configuration.xml | 139 ++++++++++++++++++++++++++++++++- test/nasa_osal/source/test/test_root.c | 2 + test/nasa_osal/source/test/test_root.h | 1 + test/nasa_osal/test.mk | 3 +- 4 files changed, 140 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/nasa_osal/configuration.xml b/test/nasa_osal/configuration.xml index 732f80946..e13b79ffa 100644 --- a/test/nasa_osal/configuration.xml +++ b/test/nasa_osal/configuration.xml @@ -592,13 +592,144 @@ test_assert(err == OS_SUCCESS, "deletable task creation failed");]]> + + + + + + + + + + + Internal Tests + + + Queues Functionality. + + + This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to queues + + + + + + + + OS_QueueCreate() and OS_QueueDelete() errors + + + Parameters checking in OS_QueueCreate() and OS_QueueDelete() is tested. + + + + + + + + + + + + + + + + + + + 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. + + + + +err = OS_QueueCreate(&qid, + NULL, /* Error.*/ + 4, + 128, + 0); +test_assert(err == OS_INVALID_POINTER, "NULL not detected");]]> + + + + + 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_DeleteQueue(). + + + + + + diff --git a/test/nasa_osal/source/test/test_root.c b/test/nasa_osal/source/test/test_root.c index 0a1119188..4639ada20 100644 --- a/test/nasa_osal/source/test/test_root.c +++ b/test/nasa_osal/source/test/test_root.c @@ -22,6 +22,7 @@ * *

Test Sequences

* - @subpage test_sequence_001 + * - @subpage test_sequence_002 * . */ @@ -46,6 +47,7 @@ */ const testcase_t * const *test_suite[] = { test_sequence_001, + test_sequence_002, NULL }; diff --git a/test/nasa_osal/source/test/test_root.h b/test/nasa_osal/source/test/test_root.h index 53efafa5a..4790201e0 100644 --- a/test/nasa_osal/source/test/test_root.h +++ b/test/nasa_osal/source/test/test_root.h @@ -26,6 +26,7 @@ #define _SPC5_TEST_ROOT_H_ #include "test_sequence_001.h" +#include "test_sequence_002.h" /*===========================================================================*/ /* External declarations. */ diff --git a/test/nasa_osal/test.mk b/test/nasa_osal/test.mk index daf008362..1ed8cad43 100644 --- a/test/nasa_osal/test.mk +++ b/test/nasa_osal/test.mk @@ -1,7 +1,8 @@ # List of all the NASA OSAL over ChibiOS/RT test files. TESTSRC = ${CHIBIOS}/test/lib/ch_test.c \ ${CHIBIOS}/test/nasa_osal/source/test/test_root.c \ - ${CHIBIOS}/test/nasa_osal/source/test/test_sequence_001.c + ${CHIBIOS}/test/nasa_osal/source/test/test_sequence_001.c \ + ${CHIBIOS}/test/nasa_osal/source/test/test_sequence_002.c # Required include directories TESTINC = ${CHIBIOS}/test/lib \ -- cgit v1.2.3