Simplified test XML.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14522 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2021-06-09 11:56:33 +00:00
parent 2033af9d94
commit c6be38efba
44 changed files with 12992 additions and 12052 deletions

View File

@ -74,6 +74,7 @@
***************************************************************************** *****************************************************************************
*** Next *** *** Next ***
- NEW: Simplified test XML schema.
- NEW: Simplified interface between ports and RT/NIL. - NEW: Simplified interface between ports and RT/NIL.
- NEW: Removed duplicated files for ARM ports: chtypes.h. - NEW: Removed duplicated files for ARM ports: chtypes.h.
- NEW: Removed duplicated files for all ports: chcore_timer.h. - NEW: Removed duplicated files for all ports: chcore_timer.h.

View File

@ -24,6 +24,7 @@ integrated in our structure: WolfSSL, FatFS and lwIP.
- Updated CMSIS headers for STM32F7, G0, G4, H7, L0, L4, L4+. - Updated CMSIS headers for STM32F7, G0, G4, H7, L0, L4, L4+.
- Mail Queues test implementation in CMSIS RTOS wrapper. - Mail Queues test implementation in CMSIS RTOS wrapper.
- Added latency measurement test application. - Added latency measurement test application.
- Simplified test XML schema.
*** What's new in RT/NIL ports *** *** What's new in RT/NIL ports ***

View File

@ -1,13 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<SPC5-Config version="1.0.0"> <instance locked="false"
<application name="Crypto Test Suite" version="1.0.0" standalone="true" locked="false"> id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
<description>Test Specification for Hal Crypto </description>
<component id="org.chibios.spc5.components.portable.generic_startup">
<component id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine" />
</component>
<instances>
<instance locked="false" id="org.chibios.spc5.components.portable.generic_startup" />
<instance locked="false" id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
<description> <description>
<brief> <brief>
<value>Chibios Hal Crypto Test Suite.</value> <value>Chibios Hal Crypto Test Suite.</value>
@ -30,7 +23,9 @@
*/]]></value> */]]></value>
</copyright> </copyright>
<introduction> <introduction>
<value>Test suite for ChibiOS Crypto Hal. The purpose of this suite is to perform unit tests on the Hal Crypto and to converge to 100% code coverage through successive improvements.</value> <value>Test suite for ChibiOS Crypto Hal. The purpose of this
suite is to perform unit tests on the Hal Crypto and to converge
to 100% code coverage through successive improvements.</value>
</introduction> </introduction>
</description> </description>
<global_data_and_code> <global_data_and_code>
@ -1195,7 +1190,6 @@ SHOW_ENCRYPDATA(TEST_DATA_WORD_LEN);
for (int i = 0; i < TEST_DATA_WORD_LEN; i++) { for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_128)[i], "encrypt mismatch"); test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_128)[i], "encrypt mismatch");
} }
]]></value> ]]></value>
</code> </code>
</step> </step>
@ -1217,7 +1211,6 @@ SHOW_DECRYPDATA(TEST_DATA_WORD_LEN);
for (int i = 0; i < TEST_DATA_WORD_LEN; i++) { for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch"); test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch");
} }
]]></value> ]]></value>
</code> </code>
</step> </step>
@ -1254,7 +1247,6 @@ SHOW_ENCRYPDATA(TEST_DATA_WORD_LEN);
for (int i = 0; i < TEST_DATA_WORD_LEN; i++) { for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_192)[i], "encrypt mismatch"); test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_192)[i], "encrypt mismatch");
} }
]]></value> ]]></value>
</code> </code>
</step> </step>
@ -1276,7 +1268,6 @@ SHOW_DECRYPDATA(TEST_DATA_WORD_LEN);
for (int i = 0; i < TEST_DATA_WORD_LEN; i++) { for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch"); test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch");
} }
]]></value> ]]></value>
</code> </code>
</step> </step>
@ -3827,14 +3818,8 @@ for (int i = 0; i < 16; i++) {
]]></value> ]]></value>
</code> </code>
</step> </step>
</steps> </steps>
</case> </case>
<case> <case>
<brief> <brief>
<value>HMAC DMA</value> <value>HMAC DMA</value>
@ -3880,7 +3865,6 @@ for (int i = 0; i < 8; i++) {
]]></value> ]]></value>
</code> </code>
</step> </step>
<step> <step>
<description> <description>
<value>hmac 512</value> <value>hmac 512</value>
@ -3898,24 +3882,9 @@ for (int i = 0; i < 16; i++) {
]]></value> ]]></value>
</code> </code>
</step> </step>
</steps> </steps>
</case> </case>
</cases> </cases>
</sequence> </sequence>
</sequences> </sequences>
</instance> </instance>
</instances>
<exportedFeatures />
</application>
</SPC5-Config>

View File

@ -97,6 +97,7 @@ static void cry_test_001_001_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [1.1.2] Encrypt.*/ /* [1.1.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -112,6 +113,7 @@ static void cry_test_001_001_execute(void) {
} }
} }
test_end_step(2);
/* [1.1.3] Decrypt.*/ /* [1.1.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -127,6 +129,7 @@ static void cry_test_001_001_execute(void) {
} }
} }
test_end_step(3);
/* [1.1.4] loading the key with 24 byte size.*/ /* [1.1.4] loading the key with 24 byte size.*/
test_set_step(4); test_set_step(4);
@ -135,6 +138,7 @@ static void cry_test_001_001_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(4);
/* [1.1.5] Encrypt.*/ /* [1.1.5] Encrypt.*/
test_set_step(5); test_set_step(5);
@ -150,6 +154,7 @@ static void cry_test_001_001_execute(void) {
} }
} }
test_end_step(5);
/* [1.1.6] Decrypt.*/ /* [1.1.6] Decrypt.*/
test_set_step(6); test_set_step(6);
@ -165,6 +170,7 @@ static void cry_test_001_001_execute(void) {
} }
} }
test_end_step(6);
/* [1.1.7] loading the key with 32 byte size.*/ /* [1.1.7] loading the key with 32 byte size.*/
test_set_step(7); test_set_step(7);
@ -173,6 +179,7 @@ static void cry_test_001_001_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(7);
/* [1.1.8] Encrypt.*/ /* [1.1.8] Encrypt.*/
test_set_step(8); test_set_step(8);
@ -188,6 +195,7 @@ static void cry_test_001_001_execute(void) {
} }
} }
test_end_step(8);
/* [1.1.9] Decrypt.*/ /* [1.1.9] Decrypt.*/
test_set_step(9); test_set_step(9);
@ -203,6 +211,7 @@ static void cry_test_001_001_execute(void) {
} }
} }
test_end_step(9);
} }
static const testcase_t cry_test_001_001 = { static const testcase_t cry_test_001_001 = {
@ -254,6 +263,7 @@ static void cry_test_001_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [1.2.2] Encrypt.*/ /* [1.2.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -269,6 +279,7 @@ static void cry_test_001_002_execute(void) {
} }
} }
test_end_step(2);
/* [1.2.3] Decrypt.*/ /* [1.2.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -284,6 +295,7 @@ static void cry_test_001_002_execute(void) {
} }
} }
test_end_step(3);
/* [1.2.4] loading the key with 24 byte size.*/ /* [1.2.4] loading the key with 24 byte size.*/
test_set_step(4); test_set_step(4);
@ -292,6 +304,7 @@ static void cry_test_001_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(4);
/* [1.2.5] Encrypt.*/ /* [1.2.5] Encrypt.*/
test_set_step(5); test_set_step(5);
@ -307,6 +320,7 @@ static void cry_test_001_002_execute(void) {
} }
} }
test_end_step(5);
/* [1.2.6] Decrypt.*/ /* [1.2.6] Decrypt.*/
test_set_step(6); test_set_step(6);
@ -322,6 +336,7 @@ static void cry_test_001_002_execute(void) {
} }
} }
test_end_step(6);
/* [1.2.7] loading the key with 32 byte size.*/ /* [1.2.7] loading the key with 32 byte size.*/
test_set_step(7); test_set_step(7);
@ -330,6 +345,7 @@ static void cry_test_001_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(7);
/* [1.2.8] Encrypt.*/ /* [1.2.8] Encrypt.*/
test_set_step(8); test_set_step(8);
@ -345,6 +361,7 @@ static void cry_test_001_002_execute(void) {
} }
} }
test_end_step(8);
/* [1.2.9] Decrypt.*/ /* [1.2.9] Decrypt.*/
test_set_step(9); test_set_step(9);
@ -360,6 +377,7 @@ static void cry_test_001_002_execute(void) {
} }
} }
test_end_step(9);
} }
static const testcase_t cry_test_001_002 = { static const testcase_t cry_test_001_002 = {

View File

@ -97,6 +97,7 @@ static void cry_test_002_001_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [2.1.2] Encrypt.*/ /* [2.1.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -112,6 +113,7 @@ static void cry_test_002_001_execute(void) {
} }
} }
test_end_step(2);
/* [2.1.3] Decrypt.*/ /* [2.1.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -127,6 +129,7 @@ static void cry_test_002_001_execute(void) {
} }
} }
test_end_step(3);
/* [2.1.4] loading the key with 24 byte size.*/ /* [2.1.4] loading the key with 24 byte size.*/
test_set_step(4); test_set_step(4);
@ -135,6 +138,7 @@ static void cry_test_002_001_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(4);
/* [2.1.5] Encrypt.*/ /* [2.1.5] Encrypt.*/
test_set_step(5); test_set_step(5);
@ -150,6 +154,7 @@ static void cry_test_002_001_execute(void) {
} }
} }
test_end_step(5);
/* [2.1.6] Decrypt.*/ /* [2.1.6] Decrypt.*/
test_set_step(6); test_set_step(6);
@ -165,6 +170,7 @@ static void cry_test_002_001_execute(void) {
} }
} }
test_end_step(6);
/* [2.1.7] loading the key with 32 byte size.*/ /* [2.1.7] loading the key with 32 byte size.*/
test_set_step(7); test_set_step(7);
@ -173,6 +179,7 @@ static void cry_test_002_001_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(7);
/* [2.1.8] Encrypt.*/ /* [2.1.8] Encrypt.*/
test_set_step(8); test_set_step(8);
@ -188,6 +195,7 @@ static void cry_test_002_001_execute(void) {
} }
} }
test_end_step(8);
/* [2.1.9] Decrypt.*/ /* [2.1.9] Decrypt.*/
test_set_step(9); test_set_step(9);
@ -203,6 +211,7 @@ static void cry_test_002_001_execute(void) {
} }
} }
test_end_step(9);
} }
static const testcase_t cry_test_002_001 = { static const testcase_t cry_test_002_001 = {
@ -254,6 +263,7 @@ static void cry_test_002_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [2.2.2] Encrypt.*/ /* [2.2.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -269,6 +279,7 @@ static void cry_test_002_002_execute(void) {
} }
} }
test_end_step(2);
/* [2.2.3] Decrypt.*/ /* [2.2.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -284,6 +295,7 @@ static void cry_test_002_002_execute(void) {
} }
} }
test_end_step(3);
/* [2.2.4] loading the key with 24 byte size.*/ /* [2.2.4] loading the key with 24 byte size.*/
test_set_step(4); test_set_step(4);
@ -292,6 +304,7 @@ static void cry_test_002_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(4);
/* [2.2.5] Encrypt.*/ /* [2.2.5] Encrypt.*/
test_set_step(5); test_set_step(5);
@ -307,6 +320,7 @@ static void cry_test_002_002_execute(void) {
} }
} }
test_end_step(5);
/* [2.2.6] Decrypt.*/ /* [2.2.6] Decrypt.*/
test_set_step(6); test_set_step(6);
@ -322,6 +336,7 @@ static void cry_test_002_002_execute(void) {
} }
} }
test_end_step(6);
/* [2.2.7] loading the key with 32 byte size.*/ /* [2.2.7] loading the key with 32 byte size.*/
test_set_step(7); test_set_step(7);
@ -330,6 +345,7 @@ static void cry_test_002_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(7);
/* [2.2.8] Encrypt.*/ /* [2.2.8] Encrypt.*/
test_set_step(8); test_set_step(8);
@ -345,6 +361,7 @@ static void cry_test_002_002_execute(void) {
} }
} }
test_end_step(8);
/* [2.2.9] Decrypt.*/ /* [2.2.9] Decrypt.*/
test_set_step(9); test_set_step(9);
@ -360,6 +377,7 @@ static void cry_test_002_002_execute(void) {
} }
} }
test_end_step(9);
} }
static const testcase_t cry_test_002_002 = { static const testcase_t cry_test_002_002 = {

View File

@ -97,6 +97,7 @@ static void cry_test_003_001_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [3.1.2] Encrypt.*/ /* [3.1.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -110,8 +111,8 @@ static void cry_test_003_001_execute(void) {
for (int i = 0; i < TEST_DATA_WORD_LEN; i++) { for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_128)[i], "encrypt mismatch"); test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_128)[i], "encrypt mismatch");
} }
} }
test_end_step(2);
/* [3.1.3] Decrypt.*/ /* [3.1.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -125,8 +126,8 @@ static void cry_test_003_001_execute(void) {
for (int i = 0; i < TEST_DATA_WORD_LEN; i++) { for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch"); test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch");
} }
} }
test_end_step(3);
/* [3.1.4] loading the key with 24 byte size.*/ /* [3.1.4] loading the key with 24 byte size.*/
test_set_step(4); test_set_step(4);
@ -135,6 +136,7 @@ static void cry_test_003_001_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(4);
/* [3.1.5] Encrypt.*/ /* [3.1.5] Encrypt.*/
test_set_step(5); test_set_step(5);
@ -148,8 +150,8 @@ static void cry_test_003_001_execute(void) {
for (int i = 0; i < TEST_DATA_WORD_LEN; i++) { for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_192)[i], "encrypt mismatch"); test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_192)[i], "encrypt mismatch");
} }
} }
test_end_step(5);
/* [3.1.6] Decrypt.*/ /* [3.1.6] Decrypt.*/
test_set_step(6); test_set_step(6);
@ -163,8 +165,8 @@ static void cry_test_003_001_execute(void) {
for (int i = 0; i < TEST_DATA_WORD_LEN; i++) { for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch"); test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch");
} }
} }
test_end_step(6);
/* [3.1.7] loading the key with 32 byte size.*/ /* [3.1.7] loading the key with 32 byte size.*/
test_set_step(7); test_set_step(7);
@ -173,6 +175,7 @@ static void cry_test_003_001_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(7);
/* [3.1.8] Encrypt.*/ /* [3.1.8] Encrypt.*/
test_set_step(8); test_set_step(8);
@ -188,6 +191,7 @@ static void cry_test_003_001_execute(void) {
} }
} }
test_end_step(8);
/* [3.1.9] Decrypt.*/ /* [3.1.9] Decrypt.*/
test_set_step(9); test_set_step(9);
@ -203,6 +207,7 @@ static void cry_test_003_001_execute(void) {
} }
} }
test_end_step(9);
} }
static const testcase_t cry_test_003_001 = { static const testcase_t cry_test_003_001 = {
@ -254,6 +259,7 @@ static void cry_test_003_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [3.2.2] Encrypt.*/ /* [3.2.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -269,6 +275,7 @@ static void cry_test_003_002_execute(void) {
} }
} }
test_end_step(2);
/* [3.2.3] Decrypt.*/ /* [3.2.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -284,6 +291,7 @@ static void cry_test_003_002_execute(void) {
} }
} }
test_end_step(3);
/* [3.2.4] loading the key with 24 byte size.*/ /* [3.2.4] loading the key with 24 byte size.*/
test_set_step(4); test_set_step(4);
@ -292,6 +300,7 @@ static void cry_test_003_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(4);
/* [3.2.5] Encrypt.*/ /* [3.2.5] Encrypt.*/
test_set_step(5); test_set_step(5);
@ -307,6 +316,7 @@ static void cry_test_003_002_execute(void) {
} }
} }
test_end_step(5);
/* [3.2.6] Decrypt.*/ /* [3.2.6] Decrypt.*/
test_set_step(6); test_set_step(6);
@ -322,6 +332,7 @@ static void cry_test_003_002_execute(void) {
} }
} }
test_end_step(6);
/* [3.2.7] loading the key with 32 byte size.*/ /* [3.2.7] loading the key with 32 byte size.*/
test_set_step(7); test_set_step(7);
@ -330,6 +341,7 @@ static void cry_test_003_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(7);
/* [3.2.8] Encrypt.*/ /* [3.2.8] Encrypt.*/
test_set_step(8); test_set_step(8);
@ -345,6 +357,7 @@ static void cry_test_003_002_execute(void) {
} }
} }
test_end_step(8);
/* [3.2.9] Decrypt.*/ /* [3.2.9] Decrypt.*/
test_set_step(9); test_set_step(9);
@ -360,6 +373,7 @@ static void cry_test_003_002_execute(void) {
} }
} }
test_end_step(9);
} }
static const testcase_t cry_test_003_002 = { static const testcase_t cry_test_003_002 = {

View File

@ -97,6 +97,7 @@ static void cry_test_004_001_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [4.1.2] Encrypt.*/ /* [4.1.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -112,6 +113,7 @@ static void cry_test_004_001_execute(void) {
} }
} }
test_end_step(2);
/* [4.1.3] Decrypt.*/ /* [4.1.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -127,6 +129,7 @@ static void cry_test_004_001_execute(void) {
} }
} }
test_end_step(3);
} }
static const testcase_t cry_test_004_001 = { static const testcase_t cry_test_004_001 = {
@ -175,6 +178,7 @@ static void cry_test_004_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [4.2.2] Encrypt.*/ /* [4.2.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -190,6 +194,7 @@ static void cry_test_004_002_execute(void) {
} }
} }
test_end_step(2);
/* [4.2.3] Decrypt.*/ /* [4.2.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -205,6 +210,7 @@ static void cry_test_004_002_execute(void) {
} }
} }
test_end_step(3);
/* [4.2.4] loading the key with 24 byte size.*/ /* [4.2.4] loading the key with 24 byte size.*/
test_set_step(4); test_set_step(4);
@ -213,6 +219,7 @@ static void cry_test_004_002_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(4);
/* [4.2.5] Encrypt.*/ /* [4.2.5] Encrypt.*/
test_set_step(5); test_set_step(5);
@ -228,6 +235,7 @@ static void cry_test_004_002_execute(void) {
} }
} }
test_end_step(5);
/* [4.2.6] Decrypt.*/ /* [4.2.6] Decrypt.*/
test_set_step(6); test_set_step(6);
@ -243,6 +251,7 @@ static void cry_test_004_002_execute(void) {
} }
} }
test_end_step(6);
} }
static const testcase_t cry_test_004_002 = { static const testcase_t cry_test_004_002 = {
@ -291,6 +300,7 @@ static void cry_test_004_003_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [4.3.2] Encrypt.*/ /* [4.3.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -306,6 +316,7 @@ static void cry_test_004_003_execute(void) {
} }
} }
test_end_step(2);
/* [4.3.3] Decrypt.*/ /* [4.3.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -321,6 +332,7 @@ static void cry_test_004_003_execute(void) {
} }
} }
test_end_step(3);
/* [4.3.4] loading the key with 24 byte size.*/ /* [4.3.4] loading the key with 24 byte size.*/
test_set_step(4); test_set_step(4);
@ -329,6 +341,7 @@ static void cry_test_004_003_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(4);
/* [4.3.5] Encrypt.*/ /* [4.3.5] Encrypt.*/
test_set_step(5); test_set_step(5);
@ -344,6 +357,7 @@ static void cry_test_004_003_execute(void) {
} }
} }
test_end_step(5);
/* [4.3.6] Decrypt.*/ /* [4.3.6] Decrypt.*/
test_set_step(6); test_set_step(6);
@ -359,6 +373,7 @@ static void cry_test_004_003_execute(void) {
} }
} }
test_end_step(6);
} }
static const testcase_t cry_test_004_003 = { static const testcase_t cry_test_004_003 = {
@ -407,6 +422,7 @@ static void cry_test_004_004_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [4.4.2] Encrypt.*/ /* [4.4.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -422,6 +438,7 @@ static void cry_test_004_004_execute(void) {
} }
} }
test_end_step(2);
/* [4.4.3] Decrypt.*/ /* [4.4.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -437,6 +454,7 @@ static void cry_test_004_004_execute(void) {
} }
} }
test_end_step(3);
/* [4.4.4] loading the key with 24 byte size.*/ /* [4.4.4] loading the key with 24 byte size.*/
test_set_step(4); test_set_step(4);
@ -445,6 +463,7 @@ static void cry_test_004_004_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(4);
/* [4.4.5] Encrypt.*/ /* [4.4.5] Encrypt.*/
test_set_step(5); test_set_step(5);
@ -460,6 +479,7 @@ static void cry_test_004_004_execute(void) {
} }
} }
test_end_step(5);
/* [4.4.6] Decrypt.*/ /* [4.4.6] Decrypt.*/
test_set_step(6); test_set_step(6);
@ -475,6 +495,7 @@ static void cry_test_004_004_execute(void) {
} }
} }
test_end_step(6);
} }
static const testcase_t cry_test_004_004 = { static const testcase_t cry_test_004_004 = {
@ -523,6 +544,7 @@ static void cry_test_004_005_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(1);
/* [4.5.2] Encrypt.*/ /* [4.5.2] Encrypt.*/
test_set_step(2); test_set_step(2);
@ -538,6 +560,7 @@ static void cry_test_004_005_execute(void) {
} }
} }
test_end_step(2);
/* [4.5.3] Decrypt.*/ /* [4.5.3] Decrypt.*/
test_set_step(3); test_set_step(3);
@ -553,6 +576,7 @@ static void cry_test_004_005_execute(void) {
} }
} }
test_end_step(3);
/* [4.5.4] loading the key with 24 byte size.*/ /* [4.5.4] loading the key with 24 byte size.*/
test_set_step(4); test_set_step(4);
@ -561,6 +585,7 @@ static void cry_test_004_005_execute(void) {
test_assert(ret == CRY_NOERROR, "failed load transient key"); test_assert(ret == CRY_NOERROR, "failed load transient key");
} }
test_end_step(4);
/* [4.5.5] Encrypt.*/ /* [4.5.5] Encrypt.*/
test_set_step(5); test_set_step(5);
@ -576,6 +601,7 @@ static void cry_test_004_005_execute(void) {
} }
} }
test_end_step(5);
/* [4.5.6] Decrypt.*/ /* [4.5.6] Decrypt.*/
test_set_step(6); test_set_step(6);
@ -591,6 +617,7 @@ static void cry_test_004_005_execute(void) {
} }
} }
test_end_step(6);
} }
static const testcase_t cry_test_004_005 = { static const testcase_t cry_test_004_005 = {

View File

@ -97,6 +97,7 @@ static void cry_test_005_001_execute(void) {
} }
test_end_step(1);
} }
static const testcase_t cry_test_005_001 = { static const testcase_t cry_test_005_001 = {

View File

@ -233,6 +233,7 @@ static void cry_test_006_001_execute(void) {
} }
test_end_step(1);
} }
static const testcase_t cry_test_006_001 = { static const testcase_t cry_test_006_001 = {
@ -335,6 +336,7 @@ static void cry_test_006_002_execute(void) {
} }
test_end_step(1);
} }
static const testcase_t cry_test_006_002 = { static const testcase_t cry_test_006_002 = {
@ -437,6 +439,7 @@ static void cry_test_006_003_execute(void) {
} }
test_end_step(1);
} }
static const testcase_t cry_test_006_003 = { static const testcase_t cry_test_006_003 = {

View File

@ -227,6 +227,7 @@ static void cry_test_007_001_execute(void) {
} }
} }
test_end_step(1);
} }
static const testcase_t cry_test_007_001 = { static const testcase_t cry_test_007_001 = {
@ -329,6 +330,7 @@ static void cry_test_007_002_execute(void) {
} }
test_end_step(1);
} }
static const testcase_t cry_test_007_002 = { static const testcase_t cry_test_007_002 = {
@ -430,6 +432,7 @@ static void cry_test_007_003_execute(void) {
} }
} }
test_end_step(1);
} }
static const testcase_t cry_test_007_003 = { static const testcase_t cry_test_007_003 = {

View File

@ -203,6 +203,7 @@ static void cry_test_008_001_execute(void) {
} }
} }
test_end_step(1);
} }
static const testcase_t cry_test_008_001 = { static const testcase_t cry_test_008_001 = {
@ -326,6 +327,7 @@ static void cry_test_008_002_execute(void) {
} }
} }
test_end_step(1);
} }
static const testcase_t cry_test_008_002 = { static const testcase_t cry_test_008_002 = {

View File

@ -184,6 +184,7 @@ static void cry_test_009_001_execute(void) {
test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC256_1)[i], "hmac mismatch"); test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC256_1)[i], "hmac mismatch");
} }
} }
test_end_step(1);
/* [9.1.2] hmac 512.*/ /* [9.1.2] hmac 512.*/
test_set_step(2); test_set_step(2);
@ -194,6 +195,7 @@ static void cry_test_009_001_execute(void) {
test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC512_1)[i], "hmac mismatch"); test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC512_1)[i], "hmac mismatch");
} }
} }
test_end_step(2);
} }
static const testcase_t cry_test_009_001 = { static const testcase_t cry_test_009_001 = {
@ -238,6 +240,7 @@ static void cry_test_009_002_execute(void) {
test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC256_1)[i], "hmac mismatch"); test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC256_1)[i], "hmac mismatch");
} }
} }
test_end_step(1);
/* [9.2.2] hmac 512.*/ /* [9.2.2] hmac 512.*/
test_set_step(2); test_set_step(2);
@ -248,6 +251,7 @@ static void cry_test_009_002_execute(void) {
test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC512_1)[i], "hmac mismatch"); test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC512_1)[i], "hmac mismatch");
} }
} }
test_end_step(2);
} }
static const testcase_t cry_test_009_002 = { static const testcase_t cry_test_009_002 = {

View File

@ -1,13 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<SPC5-Config version="1.0.0"> <instance locked="false"
<application name="ChibiOS/HAL MFS Test Suite" version="1.0.0" standalone="true" locked="false"> id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
<description>Test Specification for ChibiOS/HAL MFS Complex Driver.</description>
<component id="org.chibios.spc5.components.portable.generic_startup">
<component id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine" />
</component>
<instances>
<instance locked="false" id="org.chibios.spc5.components.portable.generic_startup" />
<instance locked="false" id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
<description> <description>
<brief> <brief>
<value>ChibiOS/HAL MFS Test Suite.</value> <value>ChibiOS/HAL MFS Test Suite.</value>
@ -30,7 +23,9 @@
*/]]></value> */]]></value>
</copyright> </copyright>
<introduction> <introduction>
<value>Test suite for ChibiOS/HAL MFS. The purpose of this suite is to perform unit tests on the MFS module and to converge to 100% code coverage through successive improvements.</value> <value>Test suite for ChibiOS/HAL MFS. The purpose of this suite
is to perform unit tests on the MFS module and to converge to
100% code coverage through successive improvements.</value>
</introduction> </introduction>
</description> </description>
<global_data_and_code> <global_data_and_code>
@ -173,7 +168,8 @@ flash_error_t bank_verify_erased(mfs_bank_t bank) {
<value>Functional tests.</value> <value>Functional tests.</value>
</brief> </brief>
<description> <description>
<value>The APIs are tested for functionality, correct cases and expected error cases are tested.</value> <value>The APIs are tested for functionality, correct cases and
expected error cases are tested.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -188,7 +184,9 @@ flash_error_t bank_verify_erased(mfs_bank_t bank) {
<value>Testing mfsStart() behavior.</value> <value>Testing mfsStart() behavior.</value>
</brief> </brief>
<description> <description>
<value>The initialization function is tested. This function can fail only in case of Flash Array failures or in case of unexpected internal errors.</value> <value>The initialization function is tested. This function
can fail only in case of Flash Array failures or in case
of unexpected internal errors.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -207,7 +205,8 @@ flash_error_t bank_verify_erased(mfs_bank_t bank) {
<steps> <steps>
<step> <step>
<description> <description>
<value>Erasing the flash array using a low level function.</value> <value>Erasing the flash array using a low level
function.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -223,7 +222,8 @@ test_assert(ferr == FLASH_NO_ERROR, "Bank 1 erase failure");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Calling mfsStart() on an uninitialized flash array, MFS_NO_ERROR is expected.</value> <value>Calling mfsStart() on an uninitialized flash
array, MFS_NO_ERROR is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -237,7 +237,8 @@ test_assert(err == MFS_NO_ERROR, "initialization error with erased flash");]]></
</step> </step>
<step> <step>
<description> <description>
<value>Calling mfsStart() on a newly initialized flash array, MFS_NO_ERROR is expected.</value> <value>Calling mfsStart() on a newly initialized flash
array, MFS_NO_ERROR is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -256,7 +257,8 @@ test_assert(err == MFS_NO_ERROR, "initialization error with initialized flash");
<value>Checking for non existing record.</value> <value>Checking for non existing record.</value>
</brief> </brief>
<description> <description>
<value>The records space is explored with an initialized but empty managed storage, no record should exist.</value> <value>The records space is explored with an initialized but
empty managed storage, no record should exist.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -275,7 +277,8 @@ test_assert(err == MFS_NO_ERROR, "initialization error with initialized flash");
<steps> <steps>
<step> <step>
<description> <description>
<value>Exploring the records space, MFS_ERR_NOT_FOUND is expected for each index.</value> <value>Exploring the records space, MFS_ERR_NOT_FOUND is
expected for each index.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -300,7 +303,8 @@ for (id = 1; id <= MFS_CFG_MAX_RECORDS; id++) {
<value>Creating, updating and erasing a record.</value> <value>Creating, updating and erasing a record.</value>
</brief> </brief>
<description> <description>
<value>A record is created, updated several times with different payloads and finally erased.</value> <value>A record is created, updated several times with
different payloads and finally erased.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -319,7 +323,8 @@ for (id = 1; id <= MFS_CFG_MAX_RECORDS; id++) {
<steps> <steps>
<step> <step>
<description> <description>
<value>The record must not already exists, MFS_ERR_NOT_FOUND is expected.</value> <value>The record must not already exists,
MFS_ERR_NOT_FOUND is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -332,7 +337,9 @@ test_assert(err == MFS_ERR_NOT_FOUND , "record was already present");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Creating the record then retrieving it again, MFS_NO_ERROR is expected, record content and size are compared with the original.</value> <value>Creating the record then retrieving it again,
MFS_NO_ERROR is expected, record content and size are
compared with the original.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -351,7 +358,9 @@ test_assert(memcmp(mfs_pattern16, mfs_buffer, size) == 0, "wrong record content"
</step> </step>
<step> <step>
<description> <description>
<value>Updating the record then retrieving it again, MFS_NO_ERROR is expected, record content and size are compared with the original.</value> <value>Updating the record then retrieving it again,
MFS_NO_ERROR is expected, record content and size are
compared with the original.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -370,7 +379,9 @@ test_assert(memcmp(mfs_pattern32, mfs_buffer, size) == 0, "wrong record content"
</step> </step>
<step> <step>
<description> <description>
<value>Erasing the record then trying to retrieve it again, MFS_NO_ERROR is expected on erase, MFS_ERR_NOT_FOUND is expected on retrieve.</value> <value>Erasing the record then trying to retrieve it
again, MFS_NO_ERROR is expected on erase,
MFS_ERR_NOT_FOUND is expected on retrieve.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -389,10 +400,12 @@ test_assert(err == MFS_ERR_NOT_FOUND, "record not erased");]]></value>
</case> </case>
<case> <case>
<brief> <brief>
<value>Erasing the whole storage and re-initialization.</value> <value>Erasing the whole storage and re-initialization.
</value>
</brief> </brief>
<description> <description>
<value>The managed storage is erased, initialized and re-mounted.</value> <value>The managed storage is erased, initialized and
re-mounted.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -413,7 +426,8 @@ mfsStart(&mfs1, &mfscfg1);]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Creating records 1, 2 and 3, MFS_NO_ERROR is expected.</value> <value>Creating records 1, 2 and 3, MFS_NO_ERROR is
expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -477,7 +491,9 @@ test_assert(err == MFS_NO_ERROR, "record 2 not present");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Erasing storage and verify that the records have been removed, MFS_NO_ERROR is expected on erase, MFS_ERR_NOT_FOUND is expected on retrieve.</value> <value>Erasing storage and verify that the records have
been removed, MFS_NO_ERROR is expected on erase,
MFS_ERR_NOT_FOUND is expected on retrieve.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -506,7 +522,8 @@ test_assert(err == MFS_ERR_NOT_FOUND, "record 2 still present");]]></value>
<value>Testing storage size limit.</value> <value>Testing storage size limit.</value>
</brief> </brief>
<description> <description>
<value>The storage is entirely filled with different records and the final error is tested.</value> <value>The storage is entirely filled with different records
and the final error is tested.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -526,7 +543,8 @@ mfsErase(&mfs1);]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected.</value> <value>Filling up the storage by writing records with
increasing IDs, MFS_NO_ERROR is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -556,7 +574,8 @@ for (id = 1; id <= id_max; id++) {
</step> </step>
<step> <step>
<description> <description>
<value>Creating one more record, should fail, MFS_ERR_OUT_OF_MEM is expected.</value> <value>Creating one more record, should fail,
MFS_ERR_OUT_OF_MEM is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -573,7 +592,9 @@ test_assert(err == MFS_ERR_OUT_OF_MEM, "creation didn't fail");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Adding a smaller record to fill the final gap. A reinitialization is performed and MFS_NO_ERROR is expected.</value> <value>Adding a smaller record to fill the final gap. A
reinitialization is performed and MFS_NO_ERROR is
expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -619,7 +640,9 @@ test_assert(err == MFS_NO_ERROR, "initialization error");]]></value>
<value>Testing garbage collection by writing.</value> <value>Testing garbage collection by writing.</value>
</brief> </brief>
<description> <description>
<value>The garbage collection procedure is triggeredby a write operation and the state of both banks is checked.</value> <value>The garbage collection procedure is triggeredby a
write operation and the state of both banks is checked.
</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -639,7 +662,8 @@ mfsErase(&mfs1);]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected.</value> <value>Filling up the storage by writing records with
increasing IDs, MFS_NO_ERROR is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -669,7 +693,8 @@ for (id = 1; id <= id_max; id++) {
</step> </step>
<step> <step>
<description> <description>
<value>Erasing one record, MFS_NO_ERROR is expected.</value> <value>Erasing one record, MFS_NO_ERROR is expected.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -687,7 +712,9 @@ test_assert(err == MFS_ERR_NOT_FOUND, "record not erased");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Writing one more record triggers garbage collection, MFS_WARN_GC is expected, KS state is checked for correctness after the operation.</value> <value>Writing one more record triggers garbage
collection, MFS_WARN_GC is expected, KS state is
checked for correctness after the operation.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -712,7 +739,8 @@ test_assert(bank_verify_erased(MFS_BANK_0) == FLASH_NO_ERROR, "bank 0 not erased
</step> </step>
<step> <step>
<description> <description>
<value>Checking for all records in the new bank, MFS_NOERROR is expected for each record.</value> <value>Checking for all records in the new bank,
MFS_NOERROR is expected for each record.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -745,7 +773,8 @@ for (id = 1; id <= MFS_CFG_MAX_RECORDS; id++) {
</step> </step>
<step> <step>
<description> <description>
<value>Erasing one record, MFS_NO_ERROR is expected.</value> <value>Erasing one record, MFS_NO_ERROR is expected.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -763,7 +792,10 @@ test_assert(err == MFS_ERR_NOT_FOUND, "record not erased");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Writing one more record triggers garbage collection, MFS_WARN_GC is expected, MFS object state is checked for correctness after the operation.</value> <value>Writing one more record triggers garbage
collection, MFS_WARN_GC is expected, MFS object state
is checked for correctness after the operation.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -788,7 +820,8 @@ test_assert(bank_verify_erased(MFS_BANK_1) == FLASH_NO_ERROR, "bank 1 not erased
</step> </step>
<step> <step>
<description> <description>
<value>Checking for all records in the new bank, MFS_NO_ERROR is expected for each record.</value> <value>Checking for all records in the new bank,
MFS_NO_ERROR is expected for each record.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -826,7 +859,9 @@ for (id = 1; id <= MFS_CFG_MAX_RECORDS; id++) {
<value>Testing garbage collection by erasing</value> <value>Testing garbage collection by erasing</value>
</brief> </brief>
<description> <description>
<value>The garbage collection procedure is triggered by an erase operation and the state of both banks is checked.</value> <value>The garbage collection procedure is triggered by an
erase operation and the state of both banks is checked.
</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -846,7 +881,8 @@ mfsErase(&mfs1);]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected.</value> <value>Filling up the storage by writing records with
increasing IDs, MFS_NO_ERROR is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -874,7 +910,8 @@ for (id = 1; id <= id_max; id++) {
</step> </step>
<step> <step>
<description> <description>
<value>Erase records until the flash bank is filled entirely.</value> <value>Erase records until the flash bank is filled
entirely.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -901,7 +938,9 @@ for (id = 1; id <= n; id++) {
</step> </step>
<step> <step>
<description> <description>
<value>Erasing one more record triggers garbage collection, MFS_WARN_GC is expected, KS state is checked for correctness after the operation.</value> <value>Erasing one more record triggers garbage
collection, MFS_WARN_GC is expected, KS state is
checked for correctness after the operation.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -936,7 +975,9 @@ test_assert(bank_verify_erased(MFS_BANK_0) == FLASH_NO_ERROR, "bank 0 not erased
<value>Transaction Mode tests.</value> <value>Transaction Mode tests.</value>
</brief> </brief>
<description> <description>
<value>This sequence tests the MFS behavior when used in transaction mode, correct cases and expected error cases are tested.</value> <value>This sequence tests the MFS behavior when used in
transaction mode, correct cases and expected error cases are
tested.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -951,7 +992,9 @@ test_assert(bank_verify_erased(MFS_BANK_0) == FLASH_NO_ERROR, "bank 0 not erased
<value>Committing a transaction</value> <value>Committing a transaction</value>
</brief> </brief>
<description> <description>
<value>A set of new/existing records are written/erased within a transaction then the transaction is committed, the state is checked afterward.</value> <value>A set of new/existing records are written/erased
within a transaction then the transaction is committed,
the state is checked afterward.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -973,7 +1016,8 @@ uint32_t used_space;]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Records 1, 2 and 3 are created, MFS_NO_ERROR is expected.</value> <value>Records 1, 2 and 3 are created, MFS_NO_ERROR is
expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -991,7 +1035,8 @@ test_assert(err == MFS_NO_ERROR, "error creating record 3");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Presence of records 1, 2 and 3 is verified, MFS_NO_ERROR is expected.</value> <value>Presence of records 1, 2 and 3 is verified,
MFS_NO_ERROR is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1013,7 +1058,8 @@ test_assert(err == MFS_NO_ERROR, "record not found");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Starting a transaction with sufficient pre-allocated space, MFS_NO_ERROR is expected.</value> <value>Starting a transaction with sufficient
pre-allocated space, MFS_NO_ERROR is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1027,7 +1073,8 @@ test_assert(err == MFS_NO_ERROR, "error starting transaction");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Atomically erasing record 1, updating record 2, reading record 3.</value> <value>Atomically erasing record 1, updating record 2,
reading record 3.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1049,7 +1096,8 @@ test_assert(memcmp(mfs_pattern16, mfs_buffer, size) == 0, "wrong record content"
</step> </step>
<step> <step>
<description> <description>
<value>Committing the transaction, MFS_NO_ERROR is expected.</value> <value>Committing the transaction, MFS_NO_ERROR is
expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1067,7 +1115,9 @@ used_space = mfs1.used_space;]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Testing outcome, records 1 must not be present, record 2 must contain the new value and record 3 must be unchanged.</value> <value>Testing outcome, records 1 must not be present,
record 2 must contain the new value and record 3 must
be unchanged.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1103,7 +1153,8 @@ test_assert(used_space == mfs1.used_space, "internal data mismatch");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Re-mounting the manage storage, MFS_NO_ERROR is expected.</value> <value>Re-mounting the manage storage, MFS_NO_ERROR is
expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1154,7 +1205,8 @@ test_assert(used_space == mfs1.used_space, "internal data mismatch");]]></value>
<step> <step>
<description> <description>
<value>Performing a garbage collection, the result must <value>Performing a garbage collection, the result must
not change.</value> not change.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1168,7 +1220,8 @@ test_assert(err == MFS_NO_ERROR, "garbage collection failed");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Testing outcome again after garbage collection.</value> <value>Testing outcome again after garbage collection.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1209,7 +1262,9 @@ test_assert(used_space == mfs1.used_space, "internal data mismatch");]]></value>
<value>Rolling back a transaction.</value> <value>Rolling back a transaction.</value>
</brief> </brief>
<description> <description>
<value>A set of new/existing records are written/erased within a transaction then the transaction is rolled back, the state is checked afterward.</value> <value>A set of new/existing records are written/erased
within a transaction then the transaction is rolled back,
the state is checked afterward.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1231,7 +1286,8 @@ uint32_t used_space;]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Records 1, 2 and 3 are created, MFS_NO_ERROR is expected.</value> <value>Records 1, 2 and 3 are created, MFS_NO_ERROR is
expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1249,7 +1305,8 @@ test_assert(err == MFS_NO_ERROR, "error creating record 3");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Presence of records 1, 2 and 3 is verified, MFS_NO_ERROR is expected.</value> <value>Presence of records 1, 2 and 3 is verified,
MFS_NO_ERROR is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1271,7 +1328,9 @@ test_assert(err == MFS_NO_ERROR, "record not found");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Starting a transaction with sufficient pre-allocated space, MFS_NO_ERROR is expected..</value> <value>Starting a transaction with sufficient
pre-allocated space, MFS_NO_ERROR is expected..
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1285,7 +1344,8 @@ test_assert(err == MFS_NO_ERROR, "error starting transaction");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Atomically erasing record 1, updating record 2, reading record 3.</value> <value>Atomically erasing record 1, updating record 2,
reading record 3.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1311,7 +1371,8 @@ used_space = mfs1.used_space;]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Rolling back the transaction, MFS_NO_ERROR is expected.</value> <value>Rolling back the transaction, MFS_NO_ERROR is
expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1325,7 +1386,8 @@ test_assert(err == MFS_NO_ERROR, "error rolling back transaction");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>State must not have changed, records 1, 2 and 3 must still be there unchanged.</value> <value>State must not have changed, records 1, 2 and 3
must still be there unchanged.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1357,10 +1419,12 @@ test_assert(used_space == mfs1.used_space, "internal data mismatch");]]></value>
</case> </case>
<case> <case>
<brief> <brief>
<value>Transaction triggering an early garbage collect.</value> <value>Transaction triggering an early garbage collect.
</value>
</brief> </brief>
<description> <description>
<value>A transaction is started with sufficient space but not contiguous, a garbage collection is triggered.</value> <value>A transaction is started with sufficient space but
not contiguous, a garbage collection is triggered.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1381,7 +1445,8 @@ mfsStart(&mfs1, &mfscfg1);]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected.</value> <value>Filling up the storage by writing records with
increasing IDs, MFS_NO_ERROR is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1411,7 +1476,8 @@ for (id = 1; id <= id_max; id++) {
</step> </step>
<step> <step>
<description> <description>
<value>Erasing one record, MFS_NO_ERROR is expected.</value> <value>Erasing one record, MFS_NO_ERROR is expected.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1429,7 +1495,8 @@ test_assert(err == MFS_ERR_NOT_FOUND, "record not erased");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Starting a transaction with the whole remaining space, MFS_ERR_OUT_OF_MEM is expected.</value> <value>Starting a transaction with the whole remaining
space, MFS_ERR_OUT_OF_MEM is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1444,7 +1511,9 @@ test_assert(err == MFS_ERR_OUT_OF_MEM, "invalid error code");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Starting a transaction with insufficient space for one more header, MFS_ERR_OUT_OF_MEM is expected.</value> <value>Starting a transaction with insufficient space
for one more header, MFS_ERR_OUT_OF_MEM is expected.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1459,7 +1528,8 @@ test_assert(err == MFS_ERR_OUT_OF_MEM, "invalid error code");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Starting a transaction with just enough space for one more header, MFS_NO_ERROR is expected.</value> <value>Starting a transaction with just enough space for
one more header, MFS_NO_ERROR is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1498,7 +1568,9 @@ test_assert(err == MFS_NO_ERROR, "error rolling back transaction");]]></value>
<value>API Invalid Cases tests.</value> <value>API Invalid Cases tests.</value>
</brief> </brief>
<description> <description>
<value>This test sequence tests the error coded returned by the various APIs when called when the system is not initialized.</value> <value>This test sequence tests the error coded returned by the
various APIs when called when the system is not initialized.
</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1512,7 +1584,8 @@ test_assert(err == MFS_NO_ERROR, "error rolling back transaction");]]></value>
<value>Initialization error from APIs.</value> <value>Initialization error from APIs.</value>
</brief> </brief>
<description> <description>
<value>The API functions are invoked without prior initialization.</value> <value>The API functions are invoked without prior
initialization.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1531,7 +1604,8 @@ test_assert(err == MFS_NO_ERROR, "error rolling back transaction");]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>The function mfsErase() is called, MFS_ERR_INV_STATE is expected.</value> <value>The function mfsErase() is called,
MFS_ERR_INV_STATE is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1543,7 +1617,8 @@ test_assert(err == MFS_ERR_INV_STATE, "mfsErase() returned wrong status");]]></v
</step> </step>
<step> <step>
<description> <description>
<value>The function mfsWriteRecord() is called, MFS_ERR_INV_STATE is expected.</value> <value>The function mfsWriteRecord() is called,
MFS_ERR_INV_STATE is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1555,7 +1630,8 @@ test_assert(err == MFS_ERR_INV_STATE, "mfsWriteRecord() returned wrong status");
</step> </step>
<step> <step>
<description> <description>
<value>The function mfsEraseRecord() is called, MFS_ERR_INV_STATE is expected.</value> <value>The function mfsEraseRecord() is called,
MFS_ERR_INV_STATE is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1567,7 +1643,8 @@ test_assert(err == MFS_ERR_INV_STATE, "mfsEraseRecord() returned wrong status");
</step> </step>
<step> <step>
<description> <description>
<value>The function mfsReadRecord() is called, MFS_ERR_INV_STATE is expected.</value> <value>The function mfsReadRecord() is called,
MFS_ERR_INV_STATE is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1580,7 +1657,8 @@ test_assert(err == MFS_ERR_INV_STATE, "mfsReadRecord() returned wrong status");]
</step> </step>
<step> <step>
<description> <description>
<value>The function mfsPerformGarbageCollection() is called, MFS_ERR_INV_STATE is expected.</value> <value>The function mfsPerformGarbageCollection() is
called, MFS_ERR_INV_STATE is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1597,7 +1675,8 @@ test_assert(err == MFS_ERR_INV_STATE, "mfsPerformGarbageCollection() returned wr
<value>Erasing non existing record.</value> <value>Erasing non existing record.</value>
</brief> </brief>
<description> <description>
<value>An erase operation is attempted on an non-existing record.</value> <value>An erase operation is attempted on an non-existing
record.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1617,7 +1696,8 @@ mfsErase(&mfs1);]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Record one is erased, the error MFS_ERR_NOT_FOUND is expected.</value> <value>Record one is erased, the error MFS_ERR_NOT_FOUND
is expected.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1636,7 +1716,3 @@ test_assert(err == MFS_ERR_NOT_FOUND, "invalid error code");]]></value>
</sequence> </sequence>
</sequences> </sequences>
</instance> </instance>
</instances>
<exportedFeatures />
</application>
</SPC5-Config>

File diff suppressed because it is too large Load Diff

View File

@ -110,6 +110,7 @@ static void nasa_osal_test_001_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
test_assert_sequence("", "task executed"); test_assert_sequence("", "task executed");
} }
test_end_step(1);
/* [1.1.2] OS_TaskCreate() is invoked with task_name set to NULL, an /* [1.1.2] OS_TaskCreate() is invoked with task_name set to NULL, an
error is expected.*/ error is expected.*/
@ -128,6 +129,7 @@ static void nasa_osal_test_001_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
test_assert_sequence("", "task executed"); test_assert_sequence("", "task executed");
} }
test_end_step(2);
/* [1.1.3] OS_TaskCreate() is invoked with stack_pointer set to NULL, /* [1.1.3] OS_TaskCreate() is invoked with stack_pointer set to NULL,
an error is expected.*/ an error is expected.*/
@ -146,6 +148,7 @@ static void nasa_osal_test_001_001_execute(void) {
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
test_assert_sequence("", "task executed"); test_assert_sequence("", "task executed");
} }
test_end_step(3);
/* [1.1.4] OS_TaskCreate() is invoked with a very long task name, an /* [1.1.4] OS_TaskCreate() is invoked with a very long task name, an
error is expected.*/ error is expected.*/
@ -164,6 +167,7 @@ static void nasa_osal_test_001_001_execute(void) {
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
test_assert_sequence("", "task executed"); test_assert_sequence("", "task executed");
} }
test_end_step(4);
/* [1.1.5] OS_TaskCreate() is invoked with priority below and above /* [1.1.5] OS_TaskCreate() is invoked with priority below and above
allowed range, an error is expected.*/ allowed range, an error is expected.*/
@ -192,6 +196,7 @@ static void nasa_osal_test_001_001_execute(void) {
test_assert(err == OS_ERR_INVALID_PRIORITY, "priority error not detected"); test_assert(err == OS_ERR_INVALID_PRIORITY, "priority error not detected");
test_assert_sequence("", "task executed"); test_assert_sequence("", "task executed");
} }
test_end_step(5);
/* [1.1.6] OS_TaskCreate() is invoked with a stack size below /* [1.1.6] OS_TaskCreate() is invoked with a stack size below
minimum, an error is expected.*/ minimum, an error is expected.*/
@ -210,6 +215,7 @@ static void nasa_osal_test_001_001_execute(void) {
test_assert(err == OS_INVALID_INT_NUM, "stack insufficient size not detected"); test_assert(err == OS_INVALID_INT_NUM, "stack insufficient size not detected");
test_assert_sequence("", "task executed"); test_assert_sequence("", "task executed");
} }
test_end_step(6);
/* [1.1.7] OS_TaskCreate() is invoked twice with duplicated name and /* [1.1.7] OS_TaskCreate() is invoked twice with duplicated name and
then duplicated stack, an error is expected in both cases.*/ then duplicated stack, an error is expected in both cases.*/
@ -262,6 +268,7 @@ static void nasa_osal_test_001_001_execute(void) {
test_assert(err == OS_SUCCESS, "wait failed"); test_assert(err == OS_SUCCESS, "wait failed");
test_assert_sequence("A", "task not executed"); test_assert_sequence("A", "task not executed");
} }
test_end_step(7);
} }
static const testcase_t nasa_osal_test_001_001 = { static const testcase_t nasa_osal_test_001_001 = {
@ -337,6 +344,7 @@ static void nasa_osal_test_001_002_execute(void) {
0); 0);
test_assert(err == OS_SUCCESS, "task 1 creation failed"); test_assert(err == OS_SUCCESS, "task 1 creation failed");
} }
test_end_step(1);
/* [1.2.2] Tasks are made runnable atomically and their execution /* [1.2.2] Tasks are made runnable atomically and their execution
order tested.*/ order tested.*/
@ -345,6 +353,7 @@ static void nasa_osal_test_001_002_execute(void) {
OS_TaskDelay(5); OS_TaskDelay(5);
test_assert_sequence("ABCD", "task order violation"); test_assert_sequence("ABCD", "task order violation");
} }
test_end_step(2);
/* [1.2.3] Four tasks are created in priority order from high to /* [1.2.3] Four tasks are created in priority order from high to
low.*/ low.*/
@ -389,6 +398,7 @@ static void nasa_osal_test_001_002_execute(void) {
0); 0);
test_assert(err == OS_SUCCESS, "task 4 creation failed"); test_assert(err == OS_SUCCESS, "task 4 creation failed");
} }
test_end_step(3);
/* [1.2.4] Tasks are made runnable atomically and their execution /* [1.2.4] Tasks are made runnable atomically and their execution
order tested.*/ order tested.*/
@ -397,6 +407,7 @@ static void nasa_osal_test_001_002_execute(void) {
OS_TaskDelay(5); OS_TaskDelay(5);
test_assert_sequence("ABCD", "task order violation"); test_assert_sequence("ABCD", "task order violation");
} }
test_end_step(4);
/* [1.2.5] 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); test_set_step(5);
@ -440,6 +451,7 @@ static void nasa_osal_test_001_002_execute(void) {
0); 0);
test_assert(err == OS_SUCCESS, "task 3 creation failed"); test_assert(err == OS_SUCCESS, "task 3 creation failed");
} }
test_end_step(5);
/* [1.2.6] Tasks are made runnable atomically and their execution /* [1.2.6] Tasks are made runnable atomically and their execution
order tested.*/ order tested.*/
@ -448,6 +460,7 @@ static void nasa_osal_test_001_002_execute(void) {
OS_TaskDelay(5); OS_TaskDelay(5);
test_assert_sequence("ABCD", "task order violation"); test_assert_sequence("ABCD", "task order violation");
} }
test_end_step(6);
} }
static const testcase_t nasa_osal_test_001_002 = { static const testcase_t nasa_osal_test_001_002 = {
@ -480,6 +493,7 @@ static void nasa_osal_test_001_003_execute(void) {
err = OS_TaskDelete((uint32)-1); err = OS_TaskDelete((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "wrong task id not detected"); test_assert(err == OS_ERR_INVALID_ID, "wrong task id not detected");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_001_003 = { static const testcase_t nasa_osal_test_001_003 = {
@ -520,6 +534,7 @@ static void nasa_osal_test_001_004_execute(void) {
0); 0);
test_assert(err == OS_SUCCESS, "deletable task creation failed"); test_assert(err == OS_SUCCESS, "deletable task creation failed");
} }
test_end_step(1);
/* [1.4.2] Letting the task run for a while then deleting it. A check /* [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.*/ is performed on the correct execution of the delete handler.*/
@ -532,6 +547,7 @@ static void nasa_osal_test_001_004_execute(void) {
test_assert(err == OS_SUCCESS, "delete failed"); test_assert(err == OS_SUCCESS, "delete failed");
test_assert_sequence("ABC", "events order violation"); test_assert_sequence("ABC", "events order violation");
} }
test_end_step(2);
} }
static const testcase_t nasa_osal_test_001_004 = { static const testcase_t nasa_osal_test_001_004 = {

View File

@ -89,6 +89,7 @@ static void nasa_osal_test_002_001_execute(void) {
0); 0);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(1);
/* [2.1.2] OS_QueueCreate() is invoked with task_name set to NULL, an /* [2.1.2] OS_QueueCreate() is invoked with task_name set to NULL, an
error is expected.*/ error is expected.*/
@ -104,6 +105,7 @@ static void nasa_osal_test_002_001_execute(void) {
0); 0);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(2);
/* [2.1.3] OS_QueueCreate() is invoked with a very long task name, an /* [2.1.3] OS_QueueCreate() is invoked with a very long task name, an
error is expected.*/ error is expected.*/
@ -119,6 +121,7 @@ static void nasa_osal_test_002_001_execute(void) {
0); 0);
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
} }
test_end_step(3);
/* [2.1.4] OS_QueueDelete() is invoked with queue_id set to -1, an /* [2.1.4] OS_QueueDelete() is invoked with queue_id set to -1, an
error is expected.*/ error is expected.*/
@ -129,6 +132,7 @@ static void nasa_osal_test_002_001_execute(void) {
err = OS_QueueDelete((uint32)-1); err = OS_QueueDelete((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "wrong queue id not detected"); test_assert(err == OS_ERR_INVALID_ID, "wrong queue id not detected");
} }
test_end_step(4);
/* [2.1.5] OS_QueueCreate() is invoked twice with duplicated name, an /* [2.1.5] OS_QueueCreate() is invoked twice with duplicated name, an
error is expected, then the queue is deleted using error is expected, then the queue is deleted using
@ -147,6 +151,7 @@ static void nasa_osal_test_002_001_execute(void) {
err = OS_QueueDelete(qid1); err = OS_QueueDelete(qid1);
test_assert(err == OS_SUCCESS, "queue deletion failed"); test_assert(err == OS_SUCCESS, "queue deletion failed");
} }
test_end_step(5);
} }
static const testcase_t nasa_osal_test_002_001 = { static const testcase_t nasa_osal_test_002_001 = {
@ -183,6 +188,7 @@ static void nasa_osal_test_002_002_execute(void) {
err = OS_QueueGetIdByName(NULL, "queue"); err = OS_QueueGetIdByName(NULL, "queue");
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(1);
/* [2.2.2] OS_QueueGetIdByName() is invoked with queue_name set to /* [2.2.2] OS_QueueGetIdByName() is invoked with queue_name set to
NULL, an error is expected.*/ NULL, an error is expected.*/
@ -193,6 +199,7 @@ static void nasa_osal_test_002_002_execute(void) {
err = OS_QueueGetIdByName(&qid, NULL); err = OS_QueueGetIdByName(&qid, NULL);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(2);
/* [2.2.3] OS_QueueGetIdByName() is invoked with a very long task /* [2.2.3] OS_QueueGetIdByName() is invoked with a very long task
name, an error is expected.*/ name, an error is expected.*/
@ -203,6 +210,7 @@ static void nasa_osal_test_002_002_execute(void) {
err = OS_QueueGetIdByName(&qid, "very very long queue name"); err = OS_QueueGetIdByName(&qid, "very very long queue name");
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
} }
test_end_step(3);
} }
static const testcase_t nasa_osal_test_002_002 = { static const testcase_t nasa_osal_test_002_002 = {
@ -254,6 +262,7 @@ static void nasa_osal_test_002_003_execute(void) {
err = OS_QueueCreate(&qid, "test queue", 4, MESSAGE_SIZE, 0); err = OS_QueueCreate(&qid, "test queue", 4, MESSAGE_SIZE, 0);
test_assert(err == OS_SUCCESS, "queue creation failed"); test_assert(err == OS_SUCCESS, "queue creation failed");
} }
test_end_step(1);
/* [2.3.2] Creating the writer task.*/ /* [2.3.2] Creating the writer task.*/
test_set_step(2); test_set_step(2);
@ -269,6 +278,7 @@ static void nasa_osal_test_002_003_execute(void) {
0); 0);
test_assert(err == OS_SUCCESS, "writer task creation failed"); test_assert(err == OS_SUCCESS, "writer task creation failed");
} }
test_end_step(2);
/* [2.3.3] Reading messages from the writer task.*/ /* [2.3.3] Reading messages from the writer task.*/
test_set_step(3); test_set_step(3);
@ -284,6 +294,7 @@ static void nasa_osal_test_002_003_execute(void) {
"wrong message"); "wrong message");
} }
} }
test_end_step(3);
/* [2.3.4] Waiting for task termination then checking for errors.*/ /* [2.3.4] Waiting for task termination then checking for errors.*/
test_set_step(4); test_set_step(4);
@ -292,6 +303,7 @@ static void nasa_osal_test_002_003_execute(void) {
tid = 0; tid = 0;
test_assert_sequence("", "queue write errors occurred"); test_assert_sequence("", "queue write errors occurred");
} }
test_end_step(4);
} }
static const testcase_t nasa_osal_test_002_003 = { static const testcase_t nasa_osal_test_002_003 = {
@ -339,6 +351,7 @@ static void nasa_osal_test_002_004_execute(void) {
err = OS_QueueGetIdByName(&local_qid, "test queue"); err = OS_QueueGetIdByName(&local_qid, "test queue");
test_assert(err == OS_SUCCESS, "queue not found"); test_assert(err == OS_SUCCESS, "queue not found");
} }
test_end_step(1);
/* [2.4.2] Get operation with a one second timeout, an error is /* [2.4.2] Get operation with a one second timeout, an error is
expected.*/ expected.*/
@ -349,6 +362,7 @@ static void nasa_osal_test_002_004_execute(void) {
err = OS_QueueGet(qid, data, MESSAGE_SIZE, &copied, OS_Milli2Ticks(1000)); err = OS_QueueGet(qid, data, MESSAGE_SIZE, &copied, OS_Milli2Ticks(1000));
test_assert(err == OS_QUEUE_TIMEOUT, "unexpected error code"); test_assert(err == OS_QUEUE_TIMEOUT, "unexpected error code");
} }
test_end_step(2);
/* [2.4.3] Get operation in non-blocking mode, an error is /* [2.4.3] Get operation in non-blocking mode, an error is
expected.*/ expected.*/
@ -359,6 +373,7 @@ static void nasa_osal_test_002_004_execute(void) {
err = OS_QueueGet(qid, data, MESSAGE_SIZE, &copied, OS_CHECK); err = OS_QueueGet(qid, data, MESSAGE_SIZE, &copied, OS_CHECK);
test_assert(err == OS_QUEUE_EMPTY, "unexpected error code"); test_assert(err == OS_QUEUE_EMPTY, "unexpected error code");
} }
test_end_step(3);
} }
static const testcase_t nasa_osal_test_002_004 = { static const testcase_t nasa_osal_test_002_004 = {

View File

@ -87,6 +87,7 @@ static void nasa_osal_test_003_001_execute(void) {
tmr_callback); tmr_callback);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(1);
/* [3.1.2] OS_TimerCreate() is invoked with timer_name set to NULL, /* [3.1.2] OS_TimerCreate() is invoked with timer_name set to NULL,
an error is expected.*/ an error is expected.*/
@ -102,6 +103,7 @@ static void nasa_osal_test_003_001_execute(void) {
tmr_callback); tmr_callback);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(2);
/* [3.1.3] OS_TimerCreate() is invoked with accuracy set to NULL, an /* [3.1.3] OS_TimerCreate() is invoked with accuracy set to NULL, an
error is expected.*/ error is expected.*/
@ -116,6 +118,7 @@ static void nasa_osal_test_003_001_execute(void) {
tmr_callback); tmr_callback);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(3);
/* [3.1.4] OS_TimerCreate() is invoked with callback_ptr set to NULL, /* [3.1.4] OS_TimerCreate() is invoked with callback_ptr set to NULL,
an error is expected.*/ an error is expected.*/
@ -131,6 +134,7 @@ static void nasa_osal_test_003_001_execute(void) {
NULL); /* Error.*/ NULL); /* Error.*/
test_assert(err == OS_TIMER_ERR_INVALID_ARGS, "NULL not detected"); test_assert(err == OS_TIMER_ERR_INVALID_ARGS, "NULL not detected");
} }
test_end_step(4);
/* [3.1.5] OS_TimerCreate() is invoked with a very long timer name, /* [3.1.5] OS_TimerCreate() is invoked with a very long timer name,
an error is expected.*/ an error is expected.*/
@ -146,6 +150,7 @@ static void nasa_osal_test_003_001_execute(void) {
tmr_callback); tmr_callback);
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
} }
test_end_step(5);
/* [3.1.6] OS_TimerDelete() is invoked with timer_id set to -1, an /* [3.1.6] OS_TimerDelete() is invoked with timer_id set to -1, an
error is expected.*/ error is expected.*/
@ -156,6 +161,7 @@ static void nasa_osal_test_003_001_execute(void) {
err = OS_TimerDelete((uint32)-1); err = OS_TimerDelete((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "wrong timer id not detected"); test_assert(err == OS_ERR_INVALID_ID, "wrong timer id not detected");
} }
test_end_step(6);
/* [3.1.7] OS_TimerCreate() is invoked twice with duplicated name, an /* [3.1.7] OS_TimerCreate() is invoked twice with duplicated name, an
error is expected, then the queue is deleted using error is expected, then the queue is deleted using
@ -175,6 +181,7 @@ static void nasa_osal_test_003_001_execute(void) {
err = OS_TimerDelete(tmid1); err = OS_TimerDelete(tmid1);
test_assert(err == OS_SUCCESS, "timer deletion failed"); test_assert(err == OS_SUCCESS, "timer deletion failed");
} }
test_end_step(7);
} }
static const testcase_t nasa_osal_test_003_001 = { static const testcase_t nasa_osal_test_003_001 = {
@ -207,6 +214,7 @@ static void nasa_osal_test_003_002_execute(void) {
err = OS_TimerSet((uint32)-1, 10, 10); err = OS_TimerSet((uint32)-1, 10, 10);
test_assert(err == OS_ERR_INVALID_ID, "invalid timer_id not detected"); test_assert(err == OS_ERR_INVALID_ID, "invalid timer_id not detected");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_003_002 = { static const testcase_t nasa_osal_test_003_002 = {
@ -243,6 +251,7 @@ static void nasa_osal_test_003_003_execute(void) {
err = OS_TimerGetIdByName(NULL, "timer"); err = OS_TimerGetIdByName(NULL, "timer");
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(1);
/* [3.3.2] OS_TimerGetIdByName() is invoked with timer name set to /* [3.3.2] OS_TimerGetIdByName() is invoked with timer name set to
NULL, an error is expected.*/ NULL, an error is expected.*/
@ -253,6 +262,7 @@ static void nasa_osal_test_003_003_execute(void) {
err = OS_TimerGetIdByName(&tmid, NULL); err = OS_TimerGetIdByName(&tmid, NULL);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(2);
/* [3.3.3] OS_TimerGetIdByName() is invoked with a very long task /* [3.3.3] OS_TimerGetIdByName() is invoked with a very long task
name, an error is expected.*/ name, an error is expected.*/
@ -263,6 +273,7 @@ static void nasa_osal_test_003_003_execute(void) {
err = OS_TimerGetIdByName(&tmid, "very very long timer name"); err = OS_TimerGetIdByName(&tmid, "very very long timer name");
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
} }
test_end_step(3);
} }
static const testcase_t nasa_osal_test_003_003 = { static const testcase_t nasa_osal_test_003_003 = {
@ -310,6 +321,7 @@ static void nasa_osal_test_003_004_execute(void) {
err = OS_TimerGetIdByName(&local_tmid, "test timer"); err = OS_TimerGetIdByName(&local_tmid, "test timer");
test_assert(err == OS_SUCCESS, "timer not found"); test_assert(err == OS_SUCCESS, "timer not found");
} }
test_end_step(1);
/* [3.4.2] 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); test_set_step(2);
@ -319,6 +331,7 @@ static void nasa_osal_test_003_004_execute(void) {
err = OS_TimerSet(local_tmid, 70000, 0); err = OS_TimerSet(local_tmid, 70000, 0);
test_assert(err == OS_SUCCESS, "timer setup failed"); test_assert(err == OS_SUCCESS, "timer setup failed");
} }
test_end_step(2);
/* [3.4.3] Waiting one second then counting the occurred ticks.*/ /* [3.4.3] Waiting one second then counting the occurred ticks.*/
test_set_step(3); test_set_step(3);
@ -326,6 +339,7 @@ static void nasa_osal_test_003_004_execute(void) {
(void) OS_TaskDelay(1000); (void) OS_TaskDelay(1000);
test_assert(cnt == 1, "wrong ticks"); test_assert(cnt == 1, "wrong ticks");
} }
test_end_step(3);
} }
static const testcase_t nasa_osal_test_003_004 = { static const testcase_t nasa_osal_test_003_004 = {
@ -375,6 +389,7 @@ static void nasa_osal_test_003_005_execute(void) {
err = OS_TimerGetIdByName(&local_tmid, "test timer"); err = OS_TimerGetIdByName(&local_tmid, "test timer");
test_assert(err == OS_SUCCESS, "timer not found"); test_assert(err == OS_SUCCESS, "timer not found");
} }
test_end_step(1);
/* [3.5.2] 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); test_set_step(2);
@ -384,6 +399,7 @@ static void nasa_osal_test_003_005_execute(void) {
err = OS_TimerSet(local_tmid, 70000, 70000); err = OS_TimerSet(local_tmid, 70000, 70000);
test_assert(err == OS_SUCCESS, "timer setup failed"); test_assert(err == OS_SUCCESS, "timer setup failed");
} }
test_end_step(2);
/* [3.5.3] Waiting one second then counting the occurred ticks.*/ /* [3.5.3] Waiting one second then counting the occurred ticks.*/
test_set_step(3); test_set_step(3);
@ -391,6 +407,7 @@ static void nasa_osal_test_003_005_execute(void) {
(void) OS_TaskDelay(1000); (void) OS_TaskDelay(1000);
test_assert(cnt == 14, "wrong ticks"); test_assert(cnt == 14, "wrong ticks");
} }
test_end_step(3);
/* [3.5.4] Stopping the timer.*/ /* [3.5.4] Stopping the timer.*/
test_set_step(4); test_set_step(4);
@ -400,6 +417,7 @@ static void nasa_osal_test_003_005_execute(void) {
err = OS_TimerSet(local_tmid, 0, 0); err = OS_TimerSet(local_tmid, 0, 0);
test_assert(err == OS_SUCCESS, "timer stop failed"); test_assert(err == OS_SUCCESS, "timer stop failed");
} }
test_end_step(4);
} }
static const testcase_t nasa_osal_test_003_005 = { static const testcase_t nasa_osal_test_003_005 = {

View File

@ -76,6 +76,7 @@ static void nasa_osal_test_004_001_execute(void) {
0); 0);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(1);
/* [4.1.2] OS_BinSemCreate() is invoked with sem_name set to NULL, an /* [4.1.2] OS_BinSemCreate() is invoked with sem_name set to NULL, an
error is expected.*/ error is expected.*/
@ -89,6 +90,7 @@ static void nasa_osal_test_004_001_execute(void) {
0); 0);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(2);
/* [4.1.3] OS_BinSemCreate() is invoked with an invalid /* [4.1.3] OS_BinSemCreate() is invoked with an invalid
sem_initial_value, an error is expected.*/ sem_initial_value, an error is expected.*/
@ -102,6 +104,7 @@ static void nasa_osal_test_004_001_execute(void) {
0); 0);
test_assert(err == OS_INVALID_INT_NUM, "counter error not detected"); test_assert(err == OS_INVALID_INT_NUM, "counter error not detected");
} }
test_end_step(3);
/* [4.1.4] OS_BinSemCreate() is invoked with a very long timer name, /* [4.1.4] OS_BinSemCreate() is invoked with a very long timer name,
an error is expected.*/ an error is expected.*/
@ -117,6 +120,7 @@ static void nasa_osal_test_004_001_execute(void) {
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
#endif #endif
} }
test_end_step(4);
/* [4.1.5] OS_BinSemDelete() is invoked with timer_id set to -1, an /* [4.1.5] OS_BinSemDelete() is invoked with timer_id set to -1, an
error is expected.*/ error is expected.*/
@ -127,6 +131,7 @@ static void nasa_osal_test_004_001_execute(void) {
err = OS_BinSemDelete((uint32)-1); err = OS_BinSemDelete((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "wrong semaphore id not detected"); test_assert(err == OS_ERR_INVALID_ID, "wrong semaphore id not detected");
} }
test_end_step(5);
/* [4.1.6] OS_BinSemCreate() is invoked twice with duplicated name, /* [4.1.6] OS_BinSemCreate() is invoked twice with duplicated name,
an error is expected, then the queue is deleted using an error is expected, then the queue is deleted using
@ -147,6 +152,7 @@ static void nasa_osal_test_004_001_execute(void) {
err = OS_BinSemDelete(bsid1); err = OS_BinSemDelete(bsid1);
test_assert(err == OS_SUCCESS, "semaphore deletion failed"); test_assert(err == OS_SUCCESS, "semaphore deletion failed");
} }
test_end_step(6);
} }
static const testcase_t nasa_osal_test_004_001 = { static const testcase_t nasa_osal_test_004_001 = {
@ -179,6 +185,7 @@ static void nasa_osal_test_004_002_execute(void) {
err = OS_BinSemFlush((uint32)-1); err = OS_BinSemFlush((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected"); test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_004_002 = { static const testcase_t nasa_osal_test_004_002 = {
@ -211,6 +218,7 @@ static void nasa_osal_test_004_003_execute(void) {
err = OS_BinSemGive((uint32)-1); err = OS_BinSemGive((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected"); test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_004_003 = { static const testcase_t nasa_osal_test_004_003 = {
@ -243,6 +251,7 @@ static void nasa_osal_test_004_004_execute(void) {
err = OS_BinSemTake((uint32)-1); err = OS_BinSemTake((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected"); test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_004_004 = { static const testcase_t nasa_osal_test_004_004 = {
@ -288,6 +297,7 @@ static void nasa_osal_test_004_005_execute(void) {
err = OS_BinSemTimedWait((uint32)-1, 1000); err = OS_BinSemTimedWait((uint32)-1, 1000);
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected"); test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
} }
test_end_step(1);
/* [4.5.2] OS_BinSemTimedWait() is invoked with msecs set to 0, an /* [4.5.2] OS_BinSemTimedWait() is invoked with msecs set to 0, an
error is expected.*/ error is expected.*/
@ -298,6 +308,7 @@ static void nasa_osal_test_004_005_execute(void) {
err = OS_BinSemTimedWait(bsid, 0); err = OS_BinSemTimedWait(bsid, 0);
test_assert(err == OS_INVALID_INT_NUM, "invalid msec not detected"); test_assert(err == OS_INVALID_INT_NUM, "invalid msec not detected");
} }
test_end_step(2);
} }
static const testcase_t nasa_osal_test_004_005 = { static const testcase_t nasa_osal_test_004_005 = {
@ -334,6 +345,7 @@ static void nasa_osal_test_004_006_execute(void) {
err = OS_BinSemGetIdByName(NULL, "semaphore"); err = OS_BinSemGetIdByName(NULL, "semaphore");
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(1);
/* [4.6.2] OS_BinSemGetIdByName() is invoked with semaphore name set /* [4.6.2] OS_BinSemGetIdByName() is invoked with semaphore name set
to NULL, an error is expected.*/ to NULL, an error is expected.*/
@ -344,6 +356,7 @@ static void nasa_osal_test_004_006_execute(void) {
err = OS_BinSemGetIdByName(&bsid, NULL); err = OS_BinSemGetIdByName(&bsid, NULL);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(2);
/* [4.6.3] OS_BinSemGetIdByName() is invoked with a very long task /* [4.6.3] OS_BinSemGetIdByName() is invoked with a very long task
name, an error is expected.*/ name, an error is expected.*/
@ -354,6 +367,7 @@ static void nasa_osal_test_004_006_execute(void) {
err = OS_BinSemGetIdByName(&bsid, "very very long semaphore name"); err = OS_BinSemGetIdByName(&bsid, "very very long semaphore name");
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
} }
test_end_step(3);
} }
static const testcase_t nasa_osal_test_004_006 = { static const testcase_t nasa_osal_test_004_006 = {
@ -397,6 +411,7 @@ static void nasa_osal_test_004_007_execute(void) {
err = OS_BinSemTimedWait(bsid, 1000); err = OS_BinSemTimedWait(bsid, 1000);
test_assert(err == OS_SEM_TIMEOUT, "unexpected error code"); test_assert(err == OS_SEM_TIMEOUT, "unexpected error code");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_004_007 = { static const testcase_t nasa_osal_test_004_007 = {

View File

@ -75,6 +75,7 @@ static void nasa_osal_test_005_001_execute(void) {
0); 0);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(1);
/* [5.1.2] OS_CountSemCreate() is invoked with sem_name set to NULL, /* [5.1.2] OS_CountSemCreate() is invoked with sem_name set to NULL,
an error is expected.*/ an error is expected.*/
@ -88,6 +89,7 @@ static void nasa_osal_test_005_001_execute(void) {
0); 0);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(2);
/* [5.1.3] OS_CountSemCreate() is invoked with an invalid /* [5.1.3] OS_CountSemCreate() is invoked with an invalid
sem_initial_value, an error is expected.*/ sem_initial_value, an error is expected.*/
@ -101,6 +103,7 @@ static void nasa_osal_test_005_001_execute(void) {
0); 0);
test_assert(err == OS_INVALID_INT_NUM, "counter error not detected"); test_assert(err == OS_INVALID_INT_NUM, "counter error not detected");
} }
test_end_step(3);
/* [5.1.4] OS_CountSemCreate() is invoked with a very long timer /* [5.1.4] OS_CountSemCreate() is invoked with a very long timer
name, an error is expected.*/ name, an error is expected.*/
@ -116,6 +119,7 @@ static void nasa_osal_test_005_001_execute(void) {
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
#endif #endif
} }
test_end_step(4);
/* [5.1.5] OS_CountSemDelete() is invoked with timer_id set to -1, an /* [5.1.5] OS_CountSemDelete() is invoked with timer_id set to -1, an
error is expected.*/ error is expected.*/
@ -126,6 +130,7 @@ static void nasa_osal_test_005_001_execute(void) {
err = OS_CountSemDelete((uint32)-1); err = OS_CountSemDelete((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "wrong semaphore id not detected"); test_assert(err == OS_ERR_INVALID_ID, "wrong semaphore id not detected");
} }
test_end_step(5);
/* [5.1.6] OS_CountSemCreate() is invoked twice with duplicated name, /* [5.1.6] OS_CountSemCreate() is invoked twice with duplicated name,
an error is expected, then the queue is deleted using an error is expected, then the queue is deleted using
@ -146,6 +151,7 @@ static void nasa_osal_test_005_001_execute(void) {
err = OS_CountSemDelete(csid1); err = OS_CountSemDelete(csid1);
test_assert(err == OS_SUCCESS, "semaphore deletion failed"); test_assert(err == OS_SUCCESS, "semaphore deletion failed");
} }
test_end_step(6);
} }
static const testcase_t nasa_osal_test_005_001 = { static const testcase_t nasa_osal_test_005_001 = {
@ -178,6 +184,7 @@ static void nasa_osal_test_005_002_execute(void) {
err = OS_CountSemGive((uint32)-1); err = OS_CountSemGive((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected"); test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_005_002 = { static const testcase_t nasa_osal_test_005_002 = {
@ -210,6 +217,7 @@ static void nasa_osal_test_005_003_execute(void) {
err = OS_CountSemTake((uint32)-1); err = OS_CountSemTake((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected"); test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_005_003 = { static const testcase_t nasa_osal_test_005_003 = {
@ -255,6 +263,7 @@ static void nasa_osal_test_005_004_execute(void) {
err = OS_CountSemTimedWait((uint32)-1, 1000); err = OS_CountSemTimedWait((uint32)-1, 1000);
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected"); test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
} }
test_end_step(1);
/* [5.4.2] OS_CountSemTimedWait() is invoked with msecs set to 0, an /* [5.4.2] OS_CountSemTimedWait() is invoked with msecs set to 0, an
error is expected.*/ error is expected.*/
@ -265,6 +274,7 @@ static void nasa_osal_test_005_004_execute(void) {
err = OS_CountSemTimedWait(csid, 0); err = OS_CountSemTimedWait(csid, 0);
test_assert(err == OS_INVALID_INT_NUM, "invalid msec not detected"); test_assert(err == OS_INVALID_INT_NUM, "invalid msec not detected");
} }
test_end_step(2);
} }
static const testcase_t nasa_osal_test_005_004 = { static const testcase_t nasa_osal_test_005_004 = {
@ -301,6 +311,7 @@ static void nasa_osal_test_005_005_execute(void) {
err = OS_CountSemGetIdByName(NULL, "semaphore"); err = OS_CountSemGetIdByName(NULL, "semaphore");
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(1);
/* [5.5.2] OS_CountSemGetIdByName() is invoked with semaphore name /* [5.5.2] OS_CountSemGetIdByName() is invoked with semaphore name
set to NULL, an error is expected.*/ set to NULL, an error is expected.*/
@ -311,6 +322,7 @@ static void nasa_osal_test_005_005_execute(void) {
err = OS_CountSemGetIdByName(&csid, NULL); err = OS_CountSemGetIdByName(&csid, NULL);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(2);
/* [5.5.3] OS_CountSemGetIdByName() is invoked with a very long task /* [5.5.3] OS_CountSemGetIdByName() is invoked with a very long task
name, an error is expected.*/ name, an error is expected.*/
@ -321,6 +333,7 @@ static void nasa_osal_test_005_005_execute(void) {
err = OS_CountSemGetIdByName(&csid, "very very long semaphore name"); err = OS_CountSemGetIdByName(&csid, "very very long semaphore name");
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
} }
test_end_step(3);
} }
static const testcase_t nasa_osal_test_005_005 = { static const testcase_t nasa_osal_test_005_005 = {
@ -364,6 +377,7 @@ static void nasa_osal_test_005_006_execute(void) {
err = OS_CountSemTimedWait(csid, 1000); err = OS_CountSemTimedWait(csid, 1000);
test_assert(err == OS_SEM_TIMEOUT, "unexpected error code"); test_assert(err == OS_SEM_TIMEOUT, "unexpected error code");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_005_006 = { static const testcase_t nasa_osal_test_005_006 = {

View File

@ -70,6 +70,7 @@ static void nasa_osal_test_006_001_execute(void) {
0); 0);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(1);
/* [6.1.2] OS_MutSemCreate() is invoked with sem_name set to NULL, an /* [6.1.2] OS_MutSemCreate() is invoked with sem_name set to NULL, an
error is expected.*/ error is expected.*/
@ -82,6 +83,7 @@ static void nasa_osal_test_006_001_execute(void) {
0); 0);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(2);
/* [6.1.3] OS_MutSemCreate() is invoked with a very long timer name, /* [6.1.3] OS_MutSemCreate() is invoked with a very long timer name,
an error is expected.*/ an error is expected.*/
@ -96,6 +98,7 @@ static void nasa_osal_test_006_001_execute(void) {
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
#endif #endif
} }
test_end_step(3);
/* [6.1.4] OS_MutSemDelete() is invoked with timer_id set to -1, an /* [6.1.4] OS_MutSemDelete() is invoked with timer_id set to -1, an
error is expected.*/ error is expected.*/
@ -106,6 +109,7 @@ static void nasa_osal_test_006_001_execute(void) {
err = OS_MutSemDelete((uint32)-1); err = OS_MutSemDelete((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "wrong semaphore id not detected"); test_assert(err == OS_ERR_INVALID_ID, "wrong semaphore id not detected");
} }
test_end_step(4);
/* [6.1.5] OS_MutSemCreate() is invoked twice with duplicated name, /* [6.1.5] OS_MutSemCreate() is invoked twice with duplicated name,
an error is expected, then the queue is deleted using an error is expected, then the queue is deleted using
@ -126,6 +130,7 @@ static void nasa_osal_test_006_001_execute(void) {
err = OS_MutSemDelete(msid1); err = OS_MutSemDelete(msid1);
test_assert(err == OS_SUCCESS, "semaphore deletion failed"); test_assert(err == OS_SUCCESS, "semaphore deletion failed");
} }
test_end_step(5);
} }
static const testcase_t nasa_osal_test_006_001 = { static const testcase_t nasa_osal_test_006_001 = {
@ -158,6 +163,7 @@ static void nasa_osal_test_006_002_execute(void) {
err = OS_MutSemGive((uint32)-1); err = OS_MutSemGive((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected"); test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_006_002 = { static const testcase_t nasa_osal_test_006_002 = {
@ -190,6 +196,7 @@ static void nasa_osal_test_006_003_execute(void) {
err = OS_MutSemTake((uint32)-1); err = OS_MutSemTake((uint32)-1);
test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected"); test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
} }
test_end_step(1);
} }
static const testcase_t nasa_osal_test_006_003 = { static const testcase_t nasa_osal_test_006_003 = {
@ -226,6 +233,7 @@ static void nasa_osal_test_006_004_execute(void) {
err = OS_MutSemGetIdByName(NULL, "semaphore"); err = OS_MutSemGetIdByName(NULL, "semaphore");
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(1);
/* [6.4.2] OS_MutSemGetIdByName() is invoked with semaphore name set /* [6.4.2] OS_MutSemGetIdByName() is invoked with semaphore name set
to NULL, an error is expected.*/ to NULL, an error is expected.*/
@ -236,6 +244,7 @@ static void nasa_osal_test_006_004_execute(void) {
err = OS_MutSemGetIdByName(&msid, NULL); err = OS_MutSemGetIdByName(&msid, NULL);
test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert(err == OS_INVALID_POINTER, "NULL not detected");
} }
test_end_step(2);
/* [6.4.3] OS_MutSemGetIdByName() is invoked with a very long task /* [6.4.3] OS_MutSemGetIdByName() is invoked with a very long task
name, an error is expected.*/ name, an error is expected.*/
@ -246,6 +255,7 @@ static void nasa_osal_test_006_004_execute(void) {
err = OS_MutSemGetIdByName(&msid, "very very long semaphore name"); err = OS_MutSemGetIdByName(&msid, "very very long semaphore name");
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected"); test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
} }
test_end_step(3);
} }
static const testcase_t nasa_osal_test_006_004 = { static const testcase_t nasa_osal_test_006_004 = {

View File

@ -1,13 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<SPC5-Config version="1.0.0"> <instance locked="false"
<application name="ChibiOS/NIL Test Suite" version="1.0.0" standalone="true" locked="false"> id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
<description>Test Specification for ChibiOS/NIL.</description>
<component id="org.chibios.spc5.components.portable.generic_startup">
<component id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine" />
</component>
<instances>
<instance locked="false" id="org.chibios.spc5.components.portable.generic_startup" />
<instance locked="false" id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
<description> <description>
<brief> <brief>
<value>ChibiOS/NIL Test Suite.</value> <value>ChibiOS/NIL Test Suite.</value>
@ -30,7 +23,9 @@
*/]]></value> */]]></value>
</copyright> </copyright>
<introduction> <introduction>
<value>Test suite for ChibiOS/NIL. The purpose of this suite is to perform unit tests on the NIL modules and to converge to 100% code coverage through successive improvements.</value> <value>Test suite for ChibiOS/NIL. The purpose of this suite is to
perform unit tests on the NIL modules and to converge to 100%
code coverage through successive improvements.</value>
</introduction> </introduction>
</description> </description>
<global_data_and_code> <global_data_and_code>
@ -70,7 +65,8 @@ systime_t test_wait_tick(void) {
<value>Information.</value> <value>Information.</value>
</brief> </brief>
<description> <description>
<value>This sequence reports configuration and version information about the NIL kernel.</value> <value>This sequence reports configuration and version
information about the NIL kernel.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -217,7 +213,8 @@ test_println("");]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Prints the configuration options settings.</value> <value>Prints the configuration options settings.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -282,7 +279,8 @@ test_println("");]]></value>
<value>Time and Intervals Functionality.</value> <value>Time and Intervals Functionality.</value>
</brief> </brief>
<description> <description>
<value>This sequence tests the ChibiOS/NIL functionalities related to time and intervals management.</value> <value>This sequence tests the ChibiOS/NIL functionalities
related to time and intervals management.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -296,7 +294,8 @@ test_println("");]]></value>
<value>System Tick Counter functionality.</value> <value>System Tick Counter functionality.</value>
</brief> </brief>
<description> <description>
<value>The functionality of the API @p chVTGetSystemTimeX() is tested.</value> <value>The functionality of the API @p chVTGetSystemTimeX()
is tested.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -315,7 +314,8 @@ test_println("");]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>A System Tick Counter increment is expected, the test simply hangs if it does not happen.</value> <value>A System Tick Counter increment is expected, the
test simply hangs if it does not happen.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -333,7 +333,8 @@ while (time == chVTGetSystemTimeX()) {
<value>Time ranges functionality.</value> <value>Time ranges functionality.</value>
</brief> </brief>
<description> <description>
<value>The functionality of the API @p chTimeIsInRangeX() is tested.</value> <value>The functionality of the API @p chTimeIsInRangeX() is
tested.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -352,7 +353,8 @@ while (time == chVTGetSystemTimeX()) {
<steps> <steps>
<step> <step>
<description> <description>
<value>Checking case where start == end, it must always evaluate as not in range.</value> <value>Checking case where start == end, it must always
evaluate as not in range.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -428,7 +430,8 @@ test_assert(b == false, "in range");
<value>Threads Functionality.</value> <value>Threads Functionality.</value>
</brief> </brief>
<description> <description>
<value>This sequence tests the ChibiOS/NIL functionalities related to threading.</value> <value>This sequence tests the ChibiOS/NIL functionalities
related to threading.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -442,7 +445,8 @@ test_assert(b == false, "in range");
<value>Thread Sleep functionality.</value> <value>Thread Sleep functionality.</value>
</brief> </brief>
<description> <description>
<value>The functionality of @p chThdSleep() and derivatives is tested.</value> <value>The functionality of @p chThdSleep() and derivatives
is tested.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -461,7 +465,9 @@ test_assert(b == false, "in range");
<steps> <steps>
<step> <step>
<description> <description>
<value>The current system time is read then a sleep is performed for 100 system ticks and on exit the system time is verified again.</value> <value>The current system time is read then a sleep is
performed for 100 system ticks and on exit the system
time is verified again.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -476,7 +482,9 @@ test_assert_time_window(chTimeAddX(time, 100),
</step> </step>
<step> <step>
<description> <description>
<value>The current system time is read then a sleep is performed for 100000 microseconds and on exit the system time is verified again.</value> <value>The current system time is read then a sleep is
performed for 100000 microseconds and on exit the
system time is verified again.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -491,7 +499,9 @@ test_assert_time_window(chTimeAddX(time, TIME_US2I(100000)),
</step> </step>
<step> <step>
<description> <description>
<value>The current system time is read then a sleep is performed for 100 milliseconds and on exit the system time is verified again.</value> <value>The current system time is read then a sleep is
performed for 100 milliseconds and on exit the system
time is verified again.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -506,7 +516,9 @@ test_assert_time_window(chTimeAddX(time, TIME_MS2I(100)),
</step> </step>
<step> <step>
<description> <description>
<value>The current system time is read then a sleep is performed for 1 second and on exit the system time is verified again.</value> <value>The current system time is read then a sleep is
performed for 1 second and on exit the system time is
verified again.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -521,7 +533,8 @@ test_assert_time_window(chTimeAddX(time, TIME_S2I(1)),
</step> </step>
<step> <step>
<description> <description>
<value>Function chThdSleepUntil() is tested with a timeline of "now" + 100 ticks.</value> <value>Function chThdSleepUntil() is tested with a
timeline of "now" + 100 ticks.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -546,10 +559,11 @@ test_assert_time_window(chTimeAddX(time, 100),
<value>Semaphores.</value> <value>Semaphores.</value>
</brief> </brief>
<description> <description>
<value>This sequence tests the ChibiOS/NIL functionalities related to counter semaphores.</value> <value>This sequence tests the ChibiOS/NIL functionalities
related to counter semaphores.</value>
</description> </description>
<condition> <condition>
<value>CH_CFG_USE_SEMAPHORES</value> <value><![CDATA[CH_CFG_USE_SEMAPHORES == TRUE]]></value>
</condition> </condition>
<shared_code> <shared_code>
<value><![CDATA[#include "ch.h" <value><![CDATA[#include "ch.h"
@ -588,7 +602,8 @@ static THD_FUNCTION(signaler, arg) {
<value>Semaphore primitives, no state change.</value> <value>Semaphore primitives, no state change.</value>
</brief> </brief>
<description> <description>
<value>Wait, Signal and Reset primitives are tested. The testing thread does not trigger a state change.</value> <value>Wait, Signal and Reset primitives are tested. The
testing thread does not trigger a state change.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -607,7 +622,9 @@ static THD_FUNCTION(signaler, arg) {
<steps> <steps>
<step> <step>
<description> <description>
<value>The function chSemWait() is invoked, after return the counter and the returned message are tested.</value> <value>The function chSemWait() is invoked, after return
the counter and the returned message are tested.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -622,7 +639,8 @@ test_assert(MSG_OK == msg, "wrong returned message");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>The function chSemSignal() is invoked, after return the counter is tested.</value> <value>The function chSemSignal() is invoked, after
return the counter is tested.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -634,7 +652,8 @@ test_assert_lock(chSemGetCounterI(&sem1) == 1, "wrong counter value");]]></value
</step> </step>
<step> <step>
<description> <description>
<value>The function chSemReset() is invoked, after return the counter is tested.</value> <value>The function chSemReset() is invoked, after
return the counter is tested.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -651,7 +670,8 @@ test_assert_lock(chSemGetCounterI(&sem1) == 2, "wrong counter value");]]></value
<value>Semaphore primitives, with state change.</value> <value>Semaphore primitives, with state change.</value>
</brief> </brief>
<description> <description>
<value>Wait, Signal and Reset primitives are tested. The testing thread triggers a state change.</value> <value>Wait, Signal and Reset primitives are tested. The
testing thread triggers a state change.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -679,7 +699,9 @@ chThdWait(tp1);]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>The function chSemWait() is invoked, after return the counter and the returned message are tested. The semaphore is signaled by another thread.</value> <value>The function chSemWait() is invoked, after return
the counter and the returned message are tested. The
semaphore is signaled by another thread.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -694,7 +716,9 @@ test_assert(MSG_OK == msg, "wrong returned message");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>The function chSemWait() is invoked, after return the counter and the returned message are tested. The semaphore is reset by another thread.</value> <value>The function chSemWait() is invoked, after return
the counter and the returned message are tested. The
semaphore is reset by another thread.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -734,7 +758,9 @@ msg_t msg;]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>The function chSemWaitTimeout() is invoked a first time, after return the system time, the counter and the returned message are tested.</value> <value>The function chSemWaitTimeout() is invoked a
first time, after return the system time, the counter
and the returned message are tested.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -751,7 +777,9 @@ test_assert(MSG_TIMEOUT == msg, "wrong timeout message");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>The function chSemWaitTimeout() is invoked again, after return the system time, the counter and the returned message are tested.</value> <value>The function chSemWaitTimeout() is invoked again,
after return the system time, the counter and the
returned message are tested.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -778,7 +806,8 @@ test_assert(MSG_TIMEOUT == msg, "wrong timeout message");]]></value>
<value>Suspend/Resume.</value> <value>Suspend/Resume.</value>
</brief> </brief>
<description> <description>
<value>This sequence tests the ChibiOS/NIL functionalities related to threads suspend/resume.</value> <value>This sequence tests the ChibiOS/NIL functionalities
related to threads suspend/resume.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -811,7 +840,8 @@ static THD_FUNCTION(resumer, arg) {
<value>Suspend and Resume functionality.</value> <value>Suspend and Resume functionality.</value>
</brief> </brief>
<description> <description>
<value>The functionality of chThdSuspendTimeoutS() and chThdResumeI() is tested.</value> <value>The functionality of chThdSuspendTimeoutS() and
chThdResumeI() is tested.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -840,7 +870,10 @@ msg_t msg;]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>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.</value> <value>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.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -855,7 +888,10 @@ test_assert(MSG_OK == msg,"wrong returned message");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>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.</value> <value>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.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -886,10 +922,11 @@ test_assert(MSG_TIMEOUT == msg, "wrong returned message");]]></value>
<value>Event Sources and Event Flags.</value> <value>Event Sources and Event Flags.</value>
</brief> </brief>
<description> <description>
<value>This module implements the test sequence for the Events subsystem.</value> <value>This module implements the test sequence for the Events
subsystem.</value>
</description> </description>
<condition> <condition>
<value>CH_CFG_USE_EVENTS</value> <value><![CDATA[CH_CFG_USE_EVENTS == TRUE]]></value>
</condition> </condition>
<shared_code> <shared_code>
<value><![CDATA[static EVENTSOURCE_DECL(es1); <value><![CDATA[static EVENTSOURCE_DECL(es1);
@ -926,8 +963,13 @@ static THD_FUNCTION(evtthd2, p) {
<value>Events registration.</value> <value>Events registration.</value>
</brief> </brief>
<description> <description>
<value>Two event listeners are registered on an event source and then unregistered in the same order.&lt;br&gt;&#xD; <value>Two event listeners are registered on an event source
The test expects that the even source has listeners after the registrations and after the first unregistration, then, after the second unegistration, the test expects no more listeners.</value> and then unregistered in the same order.&lt;br&gt;&#xD;
The test expects that the even source has listeners after
the registrations and after the first unregistration,
then, after the second unegistration, the test expects no
more listeners.
</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -957,7 +999,9 @@ The test expects that the even source has listeners after the registrations and
</step> </step>
<step> <step>
<description> <description>
<value>Two Event Listeners are registered on the Event Source, the Event Source is tested to have listeners.</value> <value>Two Event Listeners are registered on the Event
Source, the Event Source is tested to have listeners.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -970,7 +1014,8 @@ test_assert_lock(chEvtIsListeningI(&es1), "no listener");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>An Event Listener is unregistered, the Event Source must still have listeners.</value> <value>An Event Listener is unregistered, the Event
Source must still have listeners.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -982,7 +1027,8 @@ test_assert_lock(chEvtIsListeningI(&es1), "no listener");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>An Event Listener is unregistered, the Event Source must not have listeners.</value> <value>An Event Listener is unregistered, the Event
Source must not have listeners.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -999,7 +1045,9 @@ test_assert_lock(!chEvtIsListeningI(&es1), "stuck listener");]]></value>
<value>Event Flags dispatching.</value> <value>Event Flags dispatching.</value>
</brief> </brief>
<description> <description>
<value>The test dispatches three event flags and verifies that the associated event handlers are invoked in LSb-first order.</value> <value>The test dispatches three event flags and verifies
that the associated event handlers are invoked in
LSb-first order.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1018,7 +1066,9 @@ test_assert_lock(!chEvtIsListeningI(&es1), "stuck listener");]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Three evenf flag bits are raised then chEvtDispatch() is invoked, the sequence of handlers calls is tested.</value> <value>Three evenf flag bits are raised then
chEvtDispatch() is invoked, the sequence of handlers
calls is tested.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1035,7 +1085,8 @@ test_assert_sequence("ABC", "invalid sequence");]]></value>
<value>Events Flags wait using chEvtWaitOne().</value> <value>Events Flags wait using chEvtWaitOne().</value>
</brief> </brief>
<description> <description>
<value>Functionality of chEvtWaitOne() is tested under various scenarios.</value> <value>Functionality of chEvtWaitOne() is tested under
various scenarios.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1067,7 +1118,9 @@ thread_t *tp;]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Calling chEvtWaitOne() three times, each time a single flag must be returned in order of priority.</value> <value>Calling chEvtWaitOne() three times, each time a
single flag must be returned in order of priority.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1085,7 +1138,9 @@ test_assert(m == 0, "stuck event");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Getting current time and starting a signaler thread, the thread will set an event flag after 50mS.</value> <value>Getting current time and starting a signaler
thread, the thread will set an event flag after 50mS.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1105,7 +1160,9 @@ tp = chThdCreate(&td);]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Calling chEvtWaitOne() then verifying that the event has been received after 50mS and that the event flags mask has been emptied.</value> <value>Calling chEvtWaitOne() then verifying that the
event has been received after 50mS and that the event
flags mask has been emptied.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1128,7 +1185,8 @@ chThdWait(tp);]]></value>
<value>Events Flags wait using chEvtWaitAny().</value> <value>Events Flags wait using chEvtWaitAny().</value>
</brief> </brief>
<description> <description>
<value>Functionality of chEvtWaitAny() is tested under various scenarios.</value> <value>Functionality of chEvtWaitAny() is tested under
various scenarios.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1160,7 +1218,8 @@ thread_t *tp;]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Calling chEvtWaitAny() one time, the two flags must be returned.</value> <value>Calling chEvtWaitAny() one time, the two flags
must be returned.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1174,7 +1233,9 @@ test_assert(m == 0, "stuck event");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Getting current time and starting a signaler thread, the thread will set an event flag after 50mS.</value> <value>Getting current time and starting a signaler
thread, the thread will set an event flag after 50mS.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1194,7 +1255,9 @@ tp = chThdCreate(&td);]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Calling chEvtWaitAny() then verifying that the event has been received after 50mS and that the event flags mask has been emptied.</value> <value>Calling chEvtWaitAny() then verifying that the
event has been received after 50mS and that the event
flags mask has been emptied.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1217,7 +1280,8 @@ chThdWait(tp);]]></value>
<value>Events Flags wait using chEvtWaitAll().</value> <value>Events Flags wait using chEvtWaitAll().</value>
</brief> </brief>
<description> <description>
<value>Functionality of chEvtWaitAll() is tested under various scenarios.</value> <value>Functionality of chEvtWaitAll() is tested under
various scenarios.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1249,7 +1313,8 @@ thread_t *tp;]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Calling chEvtWaitAll() one time, the two flags must be returned.</value> <value>Calling chEvtWaitAll() one time, the two flags
must be returned.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1274,7 +1339,9 @@ test_assert(m == 0, "stuck event");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Getting current time and starting a signaler thread, the thread will set another event flag after 50mS.</value> <value>Getting current time and starting a signaler
thread, the thread will set another event flag after
50mS.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1294,7 +1361,9 @@ tp = chThdCreate(&td);]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Calling chEvtWaitAll() then verifying that both event flags have been received after 50mS and that the event flags mask has been emptied.</value> <value>Calling chEvtWaitAll() then verifying that both
event flags have been received after 50mS and that the
event flags mask has been emptied.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1317,7 +1386,9 @@ chThdWait(tp);]]></value>
<value>Events Flags wait timeouts.</value> <value>Events Flags wait timeouts.</value>
</brief> </brief>
<description> <description>
<value>Timeout functionality is tested for chEvtWaitOneTimeout(), chEvtWaitAnyTimeout() and chEvtWaitAllTimeout().</value> <value>Timeout functionality is tested for
chEvtWaitOneTimeout(), chEvtWaitAnyTimeout() and
chEvtWaitAllTimeout().</value>
</description> </description>
<condition> <condition>
<value></value> <value></value>
@ -1328,7 +1399,8 @@ chThdWait(tp);]]></value>
</setup_code> </setup_code>
<teardown_code> <teardown_code>
<value /> <value />
</teardown_code>F </teardown_code>
F
<local_variables> <local_variables>
<value><![CDATA[eventmask_t m;]]></value> <value><![CDATA[eventmask_t m;]]></value>
</local_variables> </local_variables>
@ -1336,7 +1408,9 @@ chThdWait(tp);]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>The functions are invoked first with TIME_IMMEDIATE timeout, the timeout condition is tested.</value> <value>The functions are invoked first with
TIME_IMMEDIATE timeout, the timeout condition is
tested.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1352,7 +1426,8 @@ test_assert(m == 0, "spurious event");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>The functions are invoked first with a 50mS timeout, the timeout condition is tested.</value> <value>The functions are invoked first with a 50mS
timeout, the timeout condition is tested.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1397,7 +1472,8 @@ thread_t *tp;]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Registering on two event sources associating them with flags 1 and 4.</value> <value>Registering on two event sources associating them
with flags 1 and 4.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1409,7 +1485,9 @@ chEvtRegisterMask(&es2, &el2, 4);]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Getting current time and starting a broadcaster thread, the thread broadcast the first Event Source immediately and the other after 50mS.</value> <value>Getting current time and starting a broadcaster
thread, the thread broadcast the first Event Source
immediately and the other after 50mS.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1429,7 +1507,9 @@ tp = chThdCreate(&td);]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Calling chEvtWaitAll() then verifying that both event flags have been received after 50mS and that the event flags mask has been emptied.</value> <value>Calling chEvtWaitAll() then verifying that both
event flags have been received after 50mS and that the
event flags mask has been emptied.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1470,10 +1550,11 @@ test_assert(!chEvtIsListeningI(&es2), "stuck listener");]]></value>
<value>Synchronous Messages.</value> <value>Synchronous Messages.</value>
</brief> </brief>
<description> <description>
<value>This module implements the test sequence for the Synchronous Messages subsystem.</value> <value>This module implements the test sequence for the
Synchronous Messages subsystem.</value>
</description> </description>
<condition> <condition>
<value>CH_CFG_USE_MESSAGES</value> <value><![CDATA[CH_CFG_USE_MESSAGES == TRUE]]></value>
</condition> </condition>
<shared_code> <shared_code>
<value><![CDATA[/* <value><![CDATA[/*
@ -1493,8 +1574,11 @@ static THD_FUNCTION(messenger, p) {
<value>Messages Server loop.</value> <value>Messages Server loop.</value>
</brief> </brief>
<description> <description>
<value>A messenger thread is spawned that sends four messages back to the tester thread.&lt;br&gt;&#xD; <value>A messenger thread is spawned that sends four
The test expect to receive the messages in the correct sequence and to not find a fifth message waiting.</value> messages back to the tester thread.&lt;br&gt;&#xD;
The test expect to receive the messages in the correct sequence and
to not find a fifth message waiting.
</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1534,7 +1618,8 @@ tp1 = chThdCreate(&td);]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Waiting for four messages then testing the receive order.</value> <value>Waiting for four messages then testing the
receive order.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1564,8 +1649,14 @@ test_assert_sequence("ABCD", "invalid sequence");]]></value>
<value>Benchmarks.</value> <value>Benchmarks.</value>
</brief> </brief>
<description> <description>
<value>This module implements a series of system benchmarks. The benchmarks are useful as a stress test and as a reference when comparing ChibiOS/RT with similar systems.&lt;br&gt;&#xD; <value>This module implements a series of system benchmarks. The
Objective of the test sequence is to provide a performance index for the most critical system subsystems. The performance numbers allow to discover performance regressions between successive ChibiOS/RT releases.</value> benchmarks are useful as a stress test and as a reference when
comparing ChibiOS/RT with similar systems.&lt;br&gt;&#xD;
Objective of the test sequence is to provide a performance
index for the most critical system subsystems. The performance
numbers allow to discover performance regressions between
successive ChibiOS/RT releases.
</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1633,10 +1724,13 @@ static THD_FUNCTION(bmk_thread4, p) {
<value>Messages performance #1.</value> <value>Messages performance #1.</value>
</brief> </brief>
<description> <description>
<value>A message server thread is created with a lower priority than the client thread, the messages throughput per second is measured and the result printed on the output log.</value> <value>A message server thread is created with a lower
priority than the client thread, the messages throughput
per second is measured and the result printed on the
output log.</value>
</description> </description>
<condition> <condition>
<value>CH_CFG_USE_MESSAGES</value> <value><![CDATA[CH_CFG_USE_MESSAGES == TRUE]]></value>
</condition> </condition>
<various_code> <various_code>
<setup_code> <setup_code>
@ -1653,7 +1747,8 @@ thread_t *tp;]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>The messenger thread is started at a lower priority than the current thread.</value> <value>The messenger thread is started at a lower
priority than the current thread.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1673,7 +1768,8 @@ tp = chThdCreate(&td);]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>The number of messages exchanged is counted in a one second time window.</value> <value>The number of messages exchanged is counted in a
one second time window.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1705,10 +1801,13 @@ test_println(" ctxswc/S");]]></value>
<value>Messages performance #2.</value> <value>Messages performance #2.</value>
</brief> </brief>
<description> <description>
<value>A message server thread is created with an higher priority than the client thread, the messages throughput per second is measured and the result printed on the output log.</value> <value>A message server thread is created with an higher
priority than the client thread, the messages throughput
per second is measured and the result printed on the
output log.</value>
</description> </description>
<condition> <condition>
<value>CH_CFG_USE_MESSAGES</value> <value><![CDATA[CH_CFG_USE_MESSAGES == TRUE]]></value>
</condition> </condition>
<various_code> <various_code>
<setup_code> <setup_code>
@ -1725,7 +1824,8 @@ thread_t *tp;]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>The messenger thread is started at an higher priority than the current thread.</value> <value>The messenger thread is started at an higher
priority than the current thread.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1745,7 +1845,8 @@ tp = chThdCreate(&td);]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>The number of messages exchanged is counted in a one second time window.</value> <value>The number of messages exchanged is counted in a
one second time window.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1777,8 +1878,12 @@ test_println(" ctxswc/S");]]></value>
<value>Context Switch performance.</value> <value>Context Switch performance.</value>
</brief> </brief>
<description> <description>
<value>A thread is created that just performs a @p chSchGoSleepS() into a loop, the thread is awakened as fast is possible by the tester thread.&lt;br&gt;&#xD; <value>A thread is created that just performs a @p
The Context Switch performance is calculated by measuring the number of iterations after a second of continuous operations.</value> chSchGoSleepS() into a loop, the thread is awakened as
fast is possible by the tester thread.&lt;br&gt;&#xD;
The Context Switch performance is calculated by measuring the number
of iterations after a second of continuous operations.
</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1798,7 +1903,8 @@ uint32_t n;]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>Starting the target thread at an higher priority level.</value> <value>Starting the target thread at an higher priority
level.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1818,7 +1924,8 @@ tp = chThdCreate(&td);]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>Waking up the thread as fast as possible in a one second time window.</value> <value>Waking up the thread as fast as possible in a one
second time window.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1874,8 +1981,13 @@ test_println(" ctxswc/S");]]></value>
<value>Threads performance, full cycle.</value> <value>Threads performance, full cycle.</value>
</brief> </brief>
<description> <description>
<value>Threads are continuously created and terminated into a loop. A full chThdCreateStatic() / @p chThdExit() / @p chThdWait() cycle is performed in each iteration.&lt;br&gt;&#xD; <value>Threads are continuously created and terminated into
The performance is calculated by measuring the number of iterations after a second of continuous operations.</value> a loop. A full chThdCreateStatic() / @p chThdExit() / @p
chThdWait() cycle is performed in each
iteration.&lt;br&gt;&#xD;
The performance is calculated by measuring the number of iterations
after a second of continuous operations.
</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1894,7 +2006,10 @@ The performance is calculated by measuring the number of iterations after a seco
<steps> <steps>
<step> <step>
<description> <description>
<value>A thread is created at a lower priority level and its termination detected using @p chThdWait(). The operation is repeated continuously in a one-second time window.</value> <value>A thread is created at a lower priority level and
its termination detected using @p chThdWait(). The
operation is repeated continuously in a one-second
time window.</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -1939,7 +2054,14 @@ test_println(" threads/S");]]></value>
<value>Threads performance, create/exit only.</value> <value>Threads performance, create/exit only.</value>
</brief> </brief>
<description> <description>
<value>Threads are continuously created and terminated into a loop. A partial @p chThdCreateStatic() / @p chThdExit() cycle is performed in each iteration, the @p chThdWait() is not necessary because the thread is created at an higher priority so there is no need to wait for it to terminate.&lt;br&gt; The performance is calculated by measuring the number of iterations after a second of continuous operations.</value> <value>Threads are continuously created and terminated into
a loop. A partial @p chThdCreateStatic() / @p chThdExit()
cycle is performed in each iteration, the @p chThdWait()
is not necessary because the thread is created at an
higher priority so there is no need to wait for it to
terminate.&lt;br&gt; The performance is calculated by
measuring the number of iterations after a second of
continuous operations.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -1958,7 +2080,10 @@ test_println(" threads/S");]]></value>
<steps> <steps>
<step> <step>
<description> <description>
<value>A thread is created at an higher priority level and let terminate immediately. The operation is repeated continuously in a one-second time window.</value> <value>A thread is created at an higher priority level
and let terminate immediately. The operation is
repeated continuously in a one-second time window.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -2003,11 +2128,15 @@ test_println(" threads/S");]]></value>
<value>Semaphores wait/signal performance</value> <value>Semaphores wait/signal performance</value>
</brief> </brief>
<description> <description>
<value>A counting semaphore is taken/released into a continuous loop, no Context Switch happens because the counter is always non negative.&lt;br&gt;&#xD; <value>A counting semaphore is taken/released into a
The performance is calculated by measuring the number of iterations after a second of continuous operations.</value> continuous loop, no Context Switch happens because the
counter is always non negative.&lt;br&gt;&#xD;
The performance is calculated by measuring the number of iterations
after a second of continuous operations.
</value>
</description> </description>
<condition> <condition>
<value>CH_CFG_USE_SEMAPHORES</value> <value><![CDATA[CH_CFG_USE_SEMAPHORES == TRUE]]></value>
</condition> </condition>
<various_code> <various_code>
<setup_code> <setup_code>
@ -2023,7 +2152,9 @@ The performance is calculated by measuring the number of iterations after a seco
<steps> <steps>
<step> <step>
<description> <description>
<value>A semaphore is teken and released. The operation is repeated continuously in a one-second time window.</value> <value>A semaphore is teken and released. The operation
is repeated continuously in a one-second time window.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -2070,7 +2201,8 @@ test_println(" wait+signal/S");]]></value>
<value>RAM Footprint.</value> <value>RAM Footprint.</value>
</brief> </brief>
<description> <description>
<value>The memory size of the various kernel objects is printed.</value> <value>The memory size of the various kernel objects is
printed.</value>
</description> </description>
<condition> <condition>
<value /> <value />
@ -2102,7 +2234,8 @@ test_println(" bytes");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>The size of a thread structure is printed.</value> <value>The size of a thread structure is printed.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -2115,7 +2248,8 @@ test_println(" bytes");]]></value>
</step> </step>
<step> <step>
<description> <description>
<value>The size of a semaphore structure is printed.</value> <value>The size of a semaphore structure is printed.
</value>
</description> </description>
<tags> <tags>
<value /> <value />
@ -2179,7 +2313,3 @@ test_println(" bytes");
</sequence> </sequence>
</sequences> </sequences>
</instance> </instance>
</instances>
<exportedFeatures />
</application>
</SPC5-Config>

View File

@ -53,14 +53,14 @@ const testsequence_t * const nil_test_suite_array[] = {
&nil_test_sequence_001, &nil_test_sequence_001,
&nil_test_sequence_002, &nil_test_sequence_002,
&nil_test_sequence_003, &nil_test_sequence_003,
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
&nil_test_sequence_004, &nil_test_sequence_004,
#endif #endif
&nil_test_sequence_005, &nil_test_sequence_005,
#if (CH_CFG_USE_EVENTS) || defined(__DOXYGEN__) #if (CH_CFG_USE_EVENTS == TRUE) || defined(__DOXYGEN__)
&nil_test_sequence_006, &nil_test_sequence_006,
#endif #endif
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
&nil_test_sequence_007, &nil_test_sequence_007,
#endif #endif
&nil_test_sequence_008, &nil_test_sequence_008,

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_SEMAPHORES * - CH_CFG_USE_SEMAPHORES == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -42,7 +42,7 @@
* . * .
*/ */
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -305,4 +305,4 @@ const testsequence_t nil_test_sequence_004 = {
nil_test_sequence_004_array nil_test_sequence_004_array
}; };
#endif /* CH_CFG_USE_SEMAPHORES */ #endif /* CH_CFG_USE_SEMAPHORES == TRUE */

View File

@ -31,7 +31,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_EVENTS * - CH_CFG_USE_EVENTS == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -45,7 +45,7 @@
* . * .
*/ */
#if (CH_CFG_USE_EVENTS) || defined(__DOXYGEN__) #if (CH_CFG_USE_EVENTS == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -629,4 +629,4 @@ const testsequence_t nil_test_sequence_006 = {
nil_test_sequence_006_array nil_test_sequence_006_array
}; };
#endif /* CH_CFG_USE_EVENTS */ #endif /* CH_CFG_USE_EVENTS == TRUE */

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MESSAGES * - CH_CFG_USE_MESSAGES == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -40,7 +40,7 @@
* . * .
*/ */
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -139,4 +139,4 @@ const testsequence_t nil_test_sequence_007 = {
nil_test_sequence_007_array nil_test_sequence_007_array
}; };
#endif /* CH_CFG_USE_MESSAGES */ #endif /* CH_CFG_USE_MESSAGES == TRUE */

View File

@ -108,7 +108,7 @@ static THD_FUNCTION(bmk_thread4, p) {
* Test cases. * Test cases.
****************************************************************************/ ****************************************************************************/
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page nil_test_008_001 [8.1] Messages performance #1 * @page nil_test_008_001 [8.1] Messages performance #1
* *
@ -120,7 +120,7 @@ static THD_FUNCTION(bmk_thread4, p) {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MESSAGES * - CH_CFG_USE_MESSAGES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -179,9 +179,9 @@ static const testcase_t nil_test_008_001 = {
NULL, NULL,
nil_test_008_001_execute nil_test_008_001_execute
}; };
#endif /* CH_CFG_USE_MESSAGES */ #endif /* CH_CFG_USE_MESSAGES == TRUE */
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page nil_test_008_002 [8.2] Messages performance #2 * @page nil_test_008_002 [8.2] Messages performance #2
* *
@ -193,7 +193,7 @@ static const testcase_t nil_test_008_001 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MESSAGES * - CH_CFG_USE_MESSAGES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -252,7 +252,7 @@ static const testcase_t nil_test_008_002 = {
NULL, NULL,
nil_test_008_002_execute nil_test_008_002_execute
}; };
#endif /* CH_CFG_USE_MESSAGES */ #endif /* CH_CFG_USE_MESSAGES == TRUE */
/** /**
* @page nil_test_008_003 [8.3] Context Switch performance * @page nil_test_008_003 [8.3] Context Switch performance
@ -467,7 +467,7 @@ static const testcase_t nil_test_008_005 = {
nil_test_008_005_execute nil_test_008_005_execute
}; };
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page nil_test_008_006 [8.6] Semaphores wait/signal performance * @page nil_test_008_006 [8.6] Semaphores wait/signal performance
* *
@ -480,7 +480,7 @@ static const testcase_t nil_test_008_005 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_SEMAPHORES * - CH_CFG_USE_SEMAPHORES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -539,7 +539,7 @@ static const testcase_t nil_test_008_006 = {
NULL, NULL,
nil_test_008_006_execute nil_test_008_006_execute
}; };
#endif /* CH_CFG_USE_SEMAPHORES */ #endif /* CH_CFG_USE_SEMAPHORES == TRUE */
/** /**
* @page nil_test_008_007 [8.7] RAM Footprint * @page nil_test_008_007 [8.7] RAM Footprint
@ -637,16 +637,16 @@ static const testcase_t nil_test_008_007 = {
* @brief Array of test cases. * @brief Array of test cases.
*/ */
const testcase_t * const nil_test_sequence_008_array[] = { const testcase_t * const nil_test_sequence_008_array[] = {
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
&nil_test_008_001, &nil_test_008_001,
#endif #endif
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
&nil_test_008_002, &nil_test_008_002,
#endif #endif
&nil_test_008_003, &nil_test_008_003,
&nil_test_008_004, &nil_test_008_004,
&nil_test_008_005, &nil_test_008_005,
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
&nil_test_008_006, &nil_test_008_006,
#endif #endif
&nil_test_008_007, &nil_test_008_007,

File diff suppressed because it is too large Load Diff

View File

@ -52,25 +52,25 @@
*/ */
const testsequence_t * const oslib_test_suite_array[] = { const testsequence_t * const oslib_test_suite_array[] = {
&oslib_test_sequence_001, &oslib_test_sequence_001,
#if (CH_CFG_USE_MAILBOXES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MAILBOXES == TRUE) || defined(__DOXYGEN__)
&oslib_test_sequence_002, &oslib_test_sequence_002,
#endif #endif
#if (CH_CFG_USE_PIPES) || defined(__DOXYGEN__) #if (CH_CFG_USE_PIPES == TRUE) || defined(__DOXYGEN__)
&oslib_test_sequence_003, &oslib_test_sequence_003,
#endif #endif
#if (CH_CFG_USE_JOBS) || defined(__DOXYGEN__) #if (CH_CFG_USE_JOBS == TRUE) || defined(__DOXYGEN__)
&oslib_test_sequence_004, &oslib_test_sequence_004,
#endif #endif
#if (CH_CFG_USE_DELEGATES) || defined(__DOXYGEN__) #if (CH_CFG_USE_DELEGATES == TRUE) || defined(__DOXYGEN__)
&oslib_test_sequence_005, &oslib_test_sequence_005,
#endif #endif
#if (CH_CFG_USE_OBJ_CACHES) || defined(__DOXYGEN__) #if (CH_CFG_USE_OBJ_CACHES == TRUE) || defined(__DOXYGEN__)
&oslib_test_sequence_006, &oslib_test_sequence_006,
#endif #endif
#if (CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__) #if (CH_CFG_USE_MEMPOOLS == TRUE) || defined(__DOXYGEN__)
&oslib_test_sequence_007, &oslib_test_sequence_007,
#endif #endif
#if (CH_CFG_USE_HEAP) || defined(__DOXYGEN__) #if (CH_CFG_USE_HEAP == TRUE) || defined(__DOXYGEN__)
&oslib_test_sequence_008, &oslib_test_sequence_008,
#endif #endif
#if ((CH_CFG_USE_FACTORY == TRUE) && (CH_CFG_USE_MEMPOOLS == TRUE) && (CH_CFG_USE_HEAP == TRUE)) || defined(__DOXYGEN__) #if ((CH_CFG_USE_FACTORY == TRUE) && (CH_CFG_USE_MEMPOOLS == TRUE) && (CH_CFG_USE_HEAP == TRUE)) || defined(__DOXYGEN__)

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MAILBOXES * - CH_CFG_USE_MAILBOXES == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -42,7 +42,7 @@
* . * .
*/ */
#if (CH_CFG_USE_MAILBOXES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MAILBOXES == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -432,4 +432,4 @@ const testsequence_t oslib_test_sequence_002 = {
oslib_test_sequence_002_array oslib_test_sequence_002_array
}; };
#endif /* CH_CFG_USE_MAILBOXES */ #endif /* CH_CFG_USE_MAILBOXES == TRUE */

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_PIPES * - CH_CFG_USE_PIPES == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -41,7 +41,7 @@
* . * .
*/ */
#if (CH_CFG_USE_PIPES) || defined(__DOXYGEN__) #if (CH_CFG_USE_PIPES == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -377,4 +377,4 @@ const testsequence_t oslib_test_sequence_003 = {
oslib_test_sequence_003_array oslib_test_sequence_003_array
}; };
#endif /* CH_CFG_USE_PIPES */ #endif /* CH_CFG_USE_PIPES == TRUE */

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_JOBS * - CH_CFG_USE_JOBS == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -40,7 +40,7 @@
* . * .
*/ */
#if (CH_CFG_USE_JOBS) || defined(__DOXYGEN__) #if (CH_CFG_USE_JOBS == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -185,4 +185,4 @@ const testsequence_t oslib_test_sequence_004 = {
oslib_test_sequence_004_array oslib_test_sequence_004_array
}; };
#endif /* CH_CFG_USE_JOBS */ #endif /* CH_CFG_USE_JOBS == TRUE */

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_DELEGATES * - CH_CFG_USE_DELEGATES == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -40,7 +40,7 @@
* . * .
*/ */
#if (CH_CFG_USE_DELEGATES) || defined(__DOXYGEN__) #if (CH_CFG_USE_DELEGATES == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -210,4 +210,4 @@ const testsequence_t oslib_test_sequence_005 = {
oslib_test_sequence_005_array oslib_test_sequence_005_array
}; };
#endif /* CH_CFG_USE_DELEGATES */ #endif /* CH_CFG_USE_DELEGATES == TRUE */

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_OBJ_CACHES * - CH_CFG_USE_OBJ_CACHES == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -40,7 +40,7 @@
* . * .
*/ */
#if (CH_CFG_USE_OBJ_CACHES) || defined(__DOXYGEN__) #if (CH_CFG_USE_OBJ_CACHES == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -263,4 +263,4 @@ const testsequence_t oslib_test_sequence_006 = {
oslib_test_sequence_006_array oslib_test_sequence_006_array
}; };
#endif /* CH_CFG_USE_OBJ_CACHES */ #endif /* CH_CFG_USE_OBJ_CACHES == TRUE */

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MEMPOOLS * - CH_CFG_USE_MEMPOOLS == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -42,7 +42,7 @@
* . * .
*/ */
#if (CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__) #if (CH_CFG_USE_MEMPOOLS == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -157,7 +157,7 @@ static const testcase_t oslib_test_007_001 = {
oslib_test_007_001_execute oslib_test_007_001_execute
}; };
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page oslib_test_007_002 [7.2] Loading and emptying a guarded memory pool without waiting * @page oslib_test_007_002 [7.2] Loading and emptying a guarded memory pool without waiting
* *
@ -168,7 +168,7 @@ static const testcase_t oslib_test_007_001 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_SEMAPHORES * - CH_CFG_USE_SEMAPHORES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -244,9 +244,9 @@ static const testcase_t oslib_test_007_002 = {
NULL, NULL,
oslib_test_007_002_execute oslib_test_007_002_execute
}; };
#endif /* CH_CFG_USE_SEMAPHORES */ #endif /* CH_CFG_USE_SEMAPHORES == TRUE */
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page oslib_test_007_003 [7.3] Guarded Memory Pools timeout * @page oslib_test_007_003 [7.3] Guarded Memory Pools timeout
* *
@ -256,7 +256,7 @@ static const testcase_t oslib_test_007_002 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_SEMAPHORES * - CH_CFG_USE_SEMAPHORES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -286,7 +286,7 @@ static const testcase_t oslib_test_007_003 = {
NULL, NULL,
oslib_test_007_003_execute oslib_test_007_003_execute
}; };
#endif /* CH_CFG_USE_SEMAPHORES */ #endif /* CH_CFG_USE_SEMAPHORES == TRUE */
/**************************************************************************** /****************************************************************************
* Exported data. * Exported data.
@ -297,10 +297,10 @@ static const testcase_t oslib_test_007_003 = {
*/ */
const testcase_t * const oslib_test_sequence_007_array[] = { const testcase_t * const oslib_test_sequence_007_array[] = {
&oslib_test_007_001, &oslib_test_007_001,
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
&oslib_test_007_002, &oslib_test_007_002,
#endif #endif
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
&oslib_test_007_003, &oslib_test_007_003,
#endif #endif
NULL NULL
@ -314,4 +314,4 @@ const testsequence_t oslib_test_sequence_007 = {
oslib_test_sequence_007_array oslib_test_sequence_007_array
}; };
#endif /* CH_CFG_USE_MEMPOOLS */ #endif /* CH_CFG_USE_MEMPOOLS == TRUE */

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_HEAP * - CH_CFG_USE_HEAP == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -41,7 +41,7 @@
* . * .
*/ */
#if (CH_CFG_USE_HEAP) || defined(__DOXYGEN__) #if (CH_CFG_USE_HEAP == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -289,4 +289,4 @@ const testsequence_t oslib_test_sequence_008 = {
oslib_test_sequence_008_array oslib_test_sequence_008_array
}; };
#endif /* CH_CFG_USE_HEAP */ #endif /* CH_CFG_USE_HEAP == TRUE */

File diff suppressed because it is too large Load Diff

View File

@ -60,19 +60,19 @@ const testsequence_t * const rt_test_suite_array[] = {
&rt_test_sequence_004, &rt_test_sequence_004,
&rt_test_sequence_005, &rt_test_sequence_005,
&rt_test_sequence_006, &rt_test_sequence_006,
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
&rt_test_sequence_007, &rt_test_sequence_007,
#endif #endif
#if (CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MUTEXES == TRUE) || defined(__DOXYGEN__)
&rt_test_sequence_008, &rt_test_sequence_008,
#endif #endif
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
&rt_test_sequence_009, &rt_test_sequence_009,
#endif #endif
#if (CH_CFG_USE_EVENTS) || defined(__DOXYGEN__) #if (CH_CFG_USE_EVENTS == TRUE) || defined(__DOXYGEN__)
&rt_test_sequence_010, &rt_test_sequence_010,
#endif #endif
#if (CH_CFG_USE_DYNAMIC) || defined(__DOXYGEN__) #if (CH_CFG_USE_DYNAMIC == TRUE) || defined(__DOXYGEN__)
&rt_test_sequence_011, &rt_test_sequence_011,
#endif #endif
&rt_test_sequence_012, &rt_test_sequence_012,

View File

@ -264,7 +264,7 @@ static const testcase_t rt_test_005_003 = {
rt_test_005_003_execute rt_test_005_003_execute
}; };
#if (CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MUTEXES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_005_004 [5.4] Priority change test with Priority Inheritance * @page rt_test_005_004 [5.4] Priority change test with Priority Inheritance
* *
@ -275,7 +275,7 @@ static const testcase_t rt_test_005_003 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MUTEXES * - CH_CFG_USE_MUTEXES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -337,7 +337,7 @@ static const testcase_t rt_test_005_004 = {
NULL, NULL,
rt_test_005_004_execute rt_test_005_004_execute
}; };
#endif /* CH_CFG_USE_MUTEXES */ #endif /* CH_CFG_USE_MUTEXES == TRUE */
/**************************************************************************** /****************************************************************************
* Exported data. * Exported data.
@ -350,7 +350,7 @@ const testcase_t * const rt_test_sequence_005_array[] = {
&rt_test_005_001, &rt_test_005_001,
&rt_test_005_002, &rt_test_005_002,
&rt_test_005_003, &rt_test_005_003,
#if (CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MUTEXES == TRUE) || defined(__DOXYGEN__)
&rt_test_005_004, &rt_test_005_004,
#endif #endif
NULL NULL

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_SEMAPHORES * - CH_CFG_USE_SEMAPHORES == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -45,7 +45,7 @@
* . * .
*/ */
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -532,4 +532,4 @@ const testsequence_t rt_test_sequence_007 = {
rt_test_sequence_007_array rt_test_sequence_007_array
}; };
#endif /* CH_CFG_USE_SEMAPHORES */ #endif /* CH_CFG_USE_SEMAPHORES == TRUE */

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MUTEXES * - CH_CFG_USE_MUTEXES == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -48,7 +48,7 @@
* . * .
*/ */
#if (CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MUTEXES == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -305,7 +305,7 @@ static const testcase_t rt_test_008_001 = {
rt_test_008_001_execute rt_test_008_001_execute
}; };
#if (CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__) #if (CH_DBG_THREADS_PROFILING == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_008_002 [8.2] Priority inheritance, simple case * @page rt_test_008_002 [8.2] Priority inheritance, simple case
* *
@ -320,7 +320,7 @@ static const testcase_t rt_test_008_001 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_DBG_THREADS_PROFILING * - CH_DBG_THREADS_PROFILING == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -377,9 +377,9 @@ static const testcase_t rt_test_008_002 = {
NULL, NULL,
rt_test_008_002_execute rt_test_008_002_execute
}; };
#endif /* CH_DBG_THREADS_PROFILING */ #endif /* CH_DBG_THREADS_PROFILING == TRUE */
#if (CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__) #if (CH_DBG_THREADS_PROFILING == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_008_003 [8.3] Priority inheritance, complex case * @page rt_test_008_003 [8.3] Priority inheritance, complex case
* *
@ -393,7 +393,7 @@ static const testcase_t rt_test_008_002 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_DBG_THREADS_PROFILING * - CH_DBG_THREADS_PROFILING == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -453,7 +453,7 @@ static const testcase_t rt_test_008_003 = {
NULL, NULL,
rt_test_008_003_execute rt_test_008_003_execute
}; };
#endif /* CH_DBG_THREADS_PROFILING */ #endif /* CH_DBG_THREADS_PROFILING == TRUE */
/** /**
* @page rt_test_008_004 [8.4] Priority return verification * @page rt_test_008_004 [8.4] Priority return verification
@ -581,7 +581,7 @@ static const testcase_t rt_test_008_004 = {
rt_test_008_004_execute rt_test_008_004_execute
}; };
#if (!CH_CFG_USE_MUTEXES_RECURSIVE) || defined(__DOXYGEN__) #if (CH_CFG_USE_MUTEXES_RECURSIVE == FALSE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_008_005 [8.5] Repeated locks, non recursive scenario * @page rt_test_008_005 [8.5] Repeated locks, non recursive scenario
* *
@ -592,7 +592,7 @@ static const testcase_t rt_test_008_004 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - !CH_CFG_USE_MUTEXES_RECURSIVE * - CH_CFG_USE_MUTEXES_RECURSIVE == FALSE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -687,9 +687,9 @@ static const testcase_t rt_test_008_005 = {
NULL, NULL,
rt_test_008_005_execute rt_test_008_005_execute
}; };
#endif /* !CH_CFG_USE_MUTEXES_RECURSIVE */ #endif /* CH_CFG_USE_MUTEXES_RECURSIVE == FALSE */
#if (CH_CFG_USE_MUTEXES_RECURSIVE) || defined(__DOXYGEN__) #if (CH_CFG_USE_MUTEXES_RECURSIVE == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_008_006 [8.6] Repeated locks using, recursive scenario * @page rt_test_008_006 [8.6] Repeated locks using, recursive scenario
* *
@ -700,7 +700,7 @@ static const testcase_t rt_test_008_005 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MUTEXES_RECURSIVE * - CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -833,9 +833,9 @@ static const testcase_t rt_test_008_006 = {
NULL, NULL,
rt_test_008_006_execute rt_test_008_006_execute
}; };
#endif /* CH_CFG_USE_MUTEXES_RECURSIVE */ #endif /* CH_CFG_USE_MUTEXES_RECURSIVE == TRUE */
#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__) #if (CH_CFG_USE_CONDVARS == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_008_007 [8.7] Condition Variable signal test * @page rt_test_008_007 [8.7] Condition Variable signal test
* *
@ -849,7 +849,7 @@ static const testcase_t rt_test_008_006 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_CONDVARS * - CH_CFG_USE_CONDVARS == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -906,9 +906,9 @@ static const testcase_t rt_test_008_007 = {
NULL, NULL,
rt_test_008_007_execute rt_test_008_007_execute
}; };
#endif /* CH_CFG_USE_CONDVARS */ #endif /* CH_CFG_USE_CONDVARS == TRUE */
#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__) #if (CH_CFG_USE_CONDVARS == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_008_008 [8.8] Condition Variable broadcast test * @page rt_test_008_008 [8.8] Condition Variable broadcast test
* *
@ -921,7 +921,7 @@ static const testcase_t rt_test_008_007 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_CONDVARS * - CH_CFG_USE_CONDVARS == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -969,9 +969,9 @@ static const testcase_t rt_test_008_008 = {
NULL, NULL,
rt_test_008_008_execute rt_test_008_008_execute
}; };
#endif /* CH_CFG_USE_CONDVARS */ #endif /* CH_CFG_USE_CONDVARS == TRUE */
#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__) #if (CH_CFG_USE_CONDVARS == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_008_009 [8.9] Condition Variable priority boost test * @page rt_test_008_009 [8.9] Condition Variable priority boost test
* *
@ -986,7 +986,7 @@ static const testcase_t rt_test_008_008 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_CONDVARS * - CH_CFG_USE_CONDVARS == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -1076,7 +1076,7 @@ static const testcase_t rt_test_008_009 = {
NULL, NULL,
rt_test_008_009_execute rt_test_008_009_execute
}; };
#endif /* CH_CFG_USE_CONDVARS */ #endif /* CH_CFG_USE_CONDVARS == TRUE */
/**************************************************************************** /****************************************************************************
* Exported data. * Exported data.
@ -1087,26 +1087,26 @@ static const testcase_t rt_test_008_009 = {
*/ */
const testcase_t * const rt_test_sequence_008_array[] = { const testcase_t * const rt_test_sequence_008_array[] = {
&rt_test_008_001, &rt_test_008_001,
#if (CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__) #if (CH_DBG_THREADS_PROFILING == TRUE) || defined(__DOXYGEN__)
&rt_test_008_002, &rt_test_008_002,
#endif #endif
#if (CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__) #if (CH_DBG_THREADS_PROFILING == TRUE) || defined(__DOXYGEN__)
&rt_test_008_003, &rt_test_008_003,
#endif #endif
&rt_test_008_004, &rt_test_008_004,
#if (!CH_CFG_USE_MUTEXES_RECURSIVE) || defined(__DOXYGEN__) #if (CH_CFG_USE_MUTEXES_RECURSIVE == FALSE) || defined(__DOXYGEN__)
&rt_test_008_005, &rt_test_008_005,
#endif #endif
#if (CH_CFG_USE_MUTEXES_RECURSIVE) || defined(__DOXYGEN__) #if (CH_CFG_USE_MUTEXES_RECURSIVE == TRUE) || defined(__DOXYGEN__)
&rt_test_008_006, &rt_test_008_006,
#endif #endif
#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__) #if (CH_CFG_USE_CONDVARS == TRUE) || defined(__DOXYGEN__)
&rt_test_008_007, &rt_test_008_007,
#endif #endif
#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__) #if (CH_CFG_USE_CONDVARS == TRUE) || defined(__DOXYGEN__)
&rt_test_008_008, &rt_test_008_008,
#endif #endif
#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__) #if (CH_CFG_USE_CONDVARS == TRUE) || defined(__DOXYGEN__)
&rt_test_008_009, &rt_test_008_009,
#endif #endif
NULL NULL
@ -1120,4 +1120,4 @@ const testsequence_t rt_test_sequence_008 = {
rt_test_sequence_008_array rt_test_sequence_008_array
}; };
#endif /* CH_CFG_USE_MUTEXES */ #endif /* CH_CFG_USE_MUTEXES == TRUE */

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MESSAGES * - CH_CFG_USE_MESSAGES == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -40,7 +40,7 @@
* . * .
*/ */
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -129,4 +129,4 @@ const testsequence_t rt_test_sequence_009 = {
rt_test_sequence_009_array rt_test_sequence_009_array
}; };
#endif /* CH_CFG_USE_MESSAGES */ #endif /* CH_CFG_USE_MESSAGES == TRUE */

View File

@ -31,7 +31,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_EVENTS * - CH_CFG_USE_EVENTS == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -45,7 +45,7 @@
* . * .
*/ */
#if (CH_CFG_USE_EVENTS) || defined(__DOXYGEN__) #if (CH_CFG_USE_EVENTS == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -426,7 +426,7 @@ static const testcase_t rt_test_010_005 = {
rt_test_010_005_execute rt_test_010_005_execute
}; };
#if (CH_CFG_USE_EVENTS_TIMEOUT) || defined(__DOXYGEN__) #if (CH_CFG_USE_EVENTS_TIMEOUT == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_010_006 [10.6] Events Flags wait timeouts * @page rt_test_010_006 [10.6] Events Flags wait timeouts
* *
@ -437,7 +437,7 @@ static const testcase_t rt_test_010_005 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_EVENTS_TIMEOUT * - CH_CFG_USE_EVENTS_TIMEOUT == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -488,7 +488,7 @@ static const testcase_t rt_test_010_006 = {
NULL, NULL,
rt_test_010_006_execute rt_test_010_006_execute
}; };
#endif /* CH_CFG_USE_EVENTS_TIMEOUT */ #endif /* CH_CFG_USE_EVENTS_TIMEOUT == TRUE */
/** /**
* @page rt_test_010_007 [10.7] Broadcasting using chEvtBroadcast() * @page rt_test_010_007 [10.7] Broadcasting using chEvtBroadcast()
@ -586,7 +586,7 @@ const testcase_t * const rt_test_sequence_010_array[] = {
&rt_test_010_003, &rt_test_010_003,
&rt_test_010_004, &rt_test_010_004,
&rt_test_010_005, &rt_test_010_005,
#if (CH_CFG_USE_EVENTS_TIMEOUT) || defined(__DOXYGEN__) #if (CH_CFG_USE_EVENTS_TIMEOUT == TRUE) || defined(__DOXYGEN__)
&rt_test_010_006, &rt_test_010_006,
#endif #endif
&rt_test_010_007, &rt_test_010_007,
@ -601,4 +601,4 @@ const testsequence_t rt_test_sequence_010 = {
rt_test_sequence_010_array rt_test_sequence_010_array
}; };
#endif /* CH_CFG_USE_EVENTS */ #endif /* CH_CFG_USE_EVENTS == TRUE */

View File

@ -32,7 +32,7 @@
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition * This sequence is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_DYNAMIC * - CH_CFG_USE_DYNAMIC == TRUE
* . * .
* *
* <h2>Test Cases</h2> * <h2>Test Cases</h2>
@ -41,7 +41,7 @@
* . * .
*/ */
#if (CH_CFG_USE_DYNAMIC) || defined(__DOXYGEN__) #if (CH_CFG_USE_DYNAMIC == TRUE) || defined(__DOXYGEN__)
/**************************************************************************** /****************************************************************************
* Shared code. * Shared code.
@ -63,7 +63,7 @@ static THD_FUNCTION(dyn_thread1, p) {
* Test cases. * Test cases.
****************************************************************************/ ****************************************************************************/
#if (CH_CFG_USE_HEAP) || defined(__DOXYGEN__) #if (CH_CFG_USE_HEAP == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_011_001 [11.1] Threads creation from Memory Heap * @page rt_test_011_001 [11.1] Threads creation from Memory Heap
* *
@ -76,7 +76,7 @@ static THD_FUNCTION(dyn_thread1, p) {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_HEAP * - CH_CFG_USE_HEAP == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -174,9 +174,9 @@ static const testcase_t rt_test_011_001 = {
NULL, NULL,
rt_test_011_001_execute rt_test_011_001_execute
}; };
#endif /* CH_CFG_USE_HEAP */ #endif /* CH_CFG_USE_HEAP == TRUE */
#if (CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__) #if (CH_CFG_USE_MEMPOOLS == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_011_002 [11.2] Threads creation from Memory Pool * @page rt_test_011_002 [11.2] Threads creation from Memory Pool
* *
@ -188,7 +188,7 @@ static const testcase_t rt_test_011_001 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MEMPOOLS * - CH_CFG_USE_MEMPOOLS == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -274,7 +274,7 @@ static const testcase_t rt_test_011_002 = {
NULL, NULL,
rt_test_011_002_execute rt_test_011_002_execute
}; };
#endif /* CH_CFG_USE_MEMPOOLS */ #endif /* CH_CFG_USE_MEMPOOLS == TRUE */
/**************************************************************************** /****************************************************************************
* Exported data. * Exported data.
@ -284,10 +284,10 @@ static const testcase_t rt_test_011_002 = {
* @brief Array of test cases. * @brief Array of test cases.
*/ */
const testcase_t * const rt_test_sequence_011_array[] = { const testcase_t * const rt_test_sequence_011_array[] = {
#if (CH_CFG_USE_HEAP) || defined(__DOXYGEN__) #if (CH_CFG_USE_HEAP == TRUE) || defined(__DOXYGEN__)
&rt_test_011_001, &rt_test_011_001,
#endif #endif
#if (CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__) #if (CH_CFG_USE_MEMPOOLS == TRUE) || defined(__DOXYGEN__)
&rt_test_011_002, &rt_test_011_002,
#endif #endif
NULL NULL
@ -301,4 +301,4 @@ const testsequence_t rt_test_sequence_011 = {
rt_test_sequence_011_array rt_test_sequence_011_array
}; };
#endif /* CH_CFG_USE_DYNAMIC */ #endif /* CH_CFG_USE_DYNAMIC == TRUE */

View File

@ -142,7 +142,7 @@ static THD_FUNCTION(bmk_thread8, p) {
* Test cases. * Test cases.
****************************************************************************/ ****************************************************************************/
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_012_001 [12.1] Messages performance #1 * @page rt_test_012_001 [12.1] Messages performance #1
* *
@ -154,7 +154,7 @@ static THD_FUNCTION(bmk_thread8, p) {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MESSAGES * - CH_CFG_USE_MESSAGES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -204,9 +204,9 @@ static const testcase_t rt_test_012_001 = {
NULL, NULL,
rt_test_012_001_execute rt_test_012_001_execute
}; };
#endif /* CH_CFG_USE_MESSAGES */ #endif /* CH_CFG_USE_MESSAGES == TRUE */
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_012_002 [12.2] Messages performance #2 * @page rt_test_012_002 [12.2] Messages performance #2
* *
@ -218,7 +218,7 @@ static const testcase_t rt_test_012_001 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MESSAGES * - CH_CFG_USE_MESSAGES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -268,9 +268,9 @@ static const testcase_t rt_test_012_002 = {
NULL, NULL,
rt_test_012_002_execute rt_test_012_002_execute
}; };
#endif /* CH_CFG_USE_MESSAGES */ #endif /* CH_CFG_USE_MESSAGES == TRUE */
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_012_003 [12.3] Messages performance #3 * @page rt_test_012_003 [12.3] Messages performance #3
* *
@ -283,7 +283,7 @@ static const testcase_t rt_test_012_002 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MESSAGES * - CH_CFG_USE_MESSAGES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -346,7 +346,7 @@ static const testcase_t rt_test_012_003 = {
NULL, NULL,
rt_test_012_003_execute rt_test_012_003_execute
}; };
#endif /* CH_CFG_USE_MESSAGES */ #endif /* CH_CFG_USE_MESSAGES == TRUE */
/** /**
* @page rt_test_012_004 [12.4] Context Switch performance * @page rt_test_012_004 [12.4] Context Switch performance
@ -551,7 +551,7 @@ static const testcase_t rt_test_012_006 = {
rt_test_012_006_execute rt_test_012_006_execute
}; };
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_012_007 [12.7] Mass reschedule performance * @page rt_test_012_007 [12.7] Mass reschedule performance
* *
@ -564,7 +564,7 @@ static const testcase_t rt_test_012_006 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_SEMAPHORES * - CH_CFG_USE_SEMAPHORES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -642,7 +642,7 @@ static const testcase_t rt_test_012_007 = {
NULL, NULL,
rt_test_012_007_execute rt_test_012_007_execute
}; };
#endif /* CH_CFG_USE_SEMAPHORES */ #endif /* CH_CFG_USE_SEMAPHORES == TRUE */
/** /**
* @page rt_test_012_008 [12.8] Round-Robin voluntary reschedule * @page rt_test_012_008 [12.8] Round-Robin voluntary reschedule
@ -768,7 +768,7 @@ static const testcase_t rt_test_012_009 = {
rt_test_012_009_execute rt_test_012_009_execute
}; };
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_012_010 [12.10] Semaphores wait/signal performance * @page rt_test_012_010 [12.10] Semaphores wait/signal performance
* *
@ -781,7 +781,7 @@ static const testcase_t rt_test_012_009 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_SEMAPHORES * - CH_CFG_USE_SEMAPHORES == TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -840,9 +840,9 @@ static const testcase_t rt_test_012_010 = {
NULL, NULL,
rt_test_012_010_execute rt_test_012_010_execute
}; };
#endif /* CH_CFG_USE_SEMAPHORES */ #endif /* CH_CFG_USE_SEMAPHORES == TRUE */
#if (CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MUTEXES ==TRUE) || defined(__DOXYGEN__)
/** /**
* @page rt_test_012_011 [12.11] Mutexes lock/unlock performance * @page rt_test_012_011 [12.11] Mutexes lock/unlock performance
* *
@ -855,7 +855,7 @@ static const testcase_t rt_test_012_010 = {
* <h2>Conditions</h2> * <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition * This test is only executed if the following preprocessor condition
* evaluates to true: * evaluates to true:
* - CH_CFG_USE_MUTEXES * - CH_CFG_USE_MUTEXES ==TRUE
* . * .
* *
* <h2>Test Steps</h2> * <h2>Test Steps</h2>
@ -914,7 +914,7 @@ static const testcase_t rt_test_012_011 = {
NULL, NULL,
rt_test_012_011_execute rt_test_012_011_execute
}; };
#endif /* CH_CFG_USE_MUTEXES */ #endif /* CH_CFG_USE_MUTEXES ==TRUE */
/** /**
* @page rt_test_012_012 [12.12] RAM Footprint * @page rt_test_012_012 [12.12] RAM Footprint
@ -1046,27 +1046,27 @@ static const testcase_t rt_test_012_012 = {
* @brief Array of test cases. * @brief Array of test cases.
*/ */
const testcase_t * const rt_test_sequence_012_array[] = { const testcase_t * const rt_test_sequence_012_array[] = {
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
&rt_test_012_001, &rt_test_012_001,
#endif #endif
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
&rt_test_012_002, &rt_test_012_002,
#endif #endif
#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
&rt_test_012_003, &rt_test_012_003,
#endif #endif
&rt_test_012_004, &rt_test_012_004,
&rt_test_012_005, &rt_test_012_005,
&rt_test_012_006, &rt_test_012_006,
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
&rt_test_012_007, &rt_test_012_007,
#endif #endif
&rt_test_012_008, &rt_test_012_008,
&rt_test_012_009, &rt_test_012_009,
#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
&rt_test_012_010, &rt_test_012_010,
#endif #endif
#if (CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) #if (CH_CFG_USE_MUTEXES ==TRUE) || defined(__DOXYGEN__)
&rt_test_012_011, &rt_test_012_011,
#endif #endif
&rt_test_012_012, &rt_test_012_012,