aboutsummaryrefslogtreecommitdiffstats
path: root/test/nasa_osal/configuration.xml
diff options
context:
space:
mode:
Diffstat (limited to 'test/nasa_osal/configuration.xml')
-rw-r--r--test/nasa_osal/configuration.xml48
1 files changed, 28 insertions, 20 deletions
diff --git a/test/nasa_osal/configuration.xml b/test/nasa_osal/configuration.xml
index 0d628e57f..aae9b72df 100644
--- a/test/nasa_osal/configuration.xml
+++ b/test/nasa_osal/configuration.xml
@@ -283,7 +283,8 @@ err = OS_TaskCreate(&tid,
0);
test_assert(err == OS_ERR_NO_FREE_IDS, "stack conflict not detected");
-OS_TaskDelay(5);
+err = OS_TaskWait(tid);
+test_assert(err == OS_SUCCESS, "wait failed");
test_assert_sequence("A", "task not executed");
err = OS_TaskCreate(&tid,
@@ -295,7 +296,8 @@ err = OS_TaskCreate(&tid,
0);
test_assert(err == OS_SUCCESS, "task creation failed");
-OS_TaskDelay(5);
+err = OS_TaskWait(tid);
+test_assert(err == OS_SUCCESS, "wait failed");
test_assert_sequence("A", "task not executed");]]></value>
</code>
</step>
@@ -616,13 +618,13 @@ test_assert_sequence("ABC", "events order violation");]]></value>
<value>This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to queues</value>
</description>
<shared_code>
- <value><![CDATA[#include <string.h>
-
+ <value><![CDATA[#include <string.h>
+
#include "osapi.h"
-uint32 qid;
+uint32 qid, tid;
-#define WRITER_NUM_MESSAGES 16
+#define WRITER_NUM_MESSAGES 16
#define MESSAGE_SIZE 20
static void test_task_writer(void) {
@@ -765,15 +767,20 @@ test_assert(err == OS_SUCCESS, "queue deletion failed");]]></value>
</condition>
<various_code>
<setup_code>
- <value><![CDATA[qid = 0;]]></value>
+ <value><![CDATA[qid = 0;
+tid = 0;]]></value>
</setup_code>
<teardown_code>
- <value><![CDATA[if (qid != 0) {
- (void) OS_QueueDelete(qid);
+ <value><![CDATA[if (qid != 0) {
+ (void) OS_QueueDelete(qid);
+}
+
+if (tid != 0) {
+ (void) OS_TaskWait(tid);
}]]></value>
</teardown_code>
<local_variables>
- <value><![CDATA[uint32 tid;
+ <value><![CDATA[uint32 tid;
unsigned i;]]></value>
</local_variables>
</various_code>
@@ -820,15 +827,15 @@ test_assert(err == OS_SUCCESS, "writer task creation failed");]]></value>
<value />
</tags>
<code>
- <value><![CDATA[for (i = 0; i < WRITER_NUM_MESSAGES; i++) {
- int32 err;
- char data[MESSAGE_SIZE];
- uint32 copied;
-
- err = OS_QueueGet(qid, data, MESSAGE_SIZE, &copied, OS_Milli2Ticks(200));
- test_assert(err == OS_SUCCESS, "timed out");
- test_assert(strncmp(data, "Hello World", sizeof (data)) == 0,
- "wrong message");
+ <value><![CDATA[for (i = 0; i < WRITER_NUM_MESSAGES; i++) {
+ int32 err;
+ char data[MESSAGE_SIZE];
+ uint32 copied;
+
+ err = OS_QueueGet(qid, data, MESSAGE_SIZE, &copied, OS_Milli2Ticks(200));
+ test_assert(err == OS_SUCCESS, "timed out");
+ test_assert(strncmp(data, "Hello World", sizeof (data)) == 0,
+ "wrong message");
}]]></value>
</code>
</step>
@@ -840,7 +847,8 @@ test_assert(err == OS_SUCCESS, "writer task creation failed");]]></value>
<value />
</tags>
<code>
- <value><![CDATA[OS_TaskDelay(10);
+ <value><![CDATA[(void) OS_TaskWait(tid);
+tid = 0;
test_assert_sequence("", "queue write errors occurred");]]></value>
</code>
</step>