diff --git a/readme.txt b/readme.txt index 471f823de..058e397ee 100644 --- a/readme.txt +++ b/readme.txt @@ -74,6 +74,7 @@ ***************************************************************************** *** Next *** +- NEW: Simplified test XML schema. - NEW: Simplified interface between ports and RT/NIL. - NEW: Removed duplicated files for ARM ports: chtypes.h. - NEW: Removed duplicated files for all ports: chcore_timer.h. diff --git a/release_note_next.txt b/release_note_next.txt index 8b7ee6b24..2a9715e90 100644 --- a/release_note_next.txt +++ b/release_note_next.txt @@ -24,6 +24,7 @@ integrated in our structure: WolfSSL, FatFS and lwIP. - Updated CMSIS headers for STM32F7, G0, G4, H7, L0, L4, L4+. - Mail Queues test implementation in CMSIS RTOS wrapper. - Added latency measurement test application. +- Simplified test XML schema. *** What's new in RT/NIL ports *** diff --git a/test/crypto/configuration.xml b/test/crypto/configuration.xml index a06e67e98..e54f79770 100644 --- a/test/crypto/configuration.xml +++ b/test/crypto/configuration.xml @@ -1,19 +1,12 @@ - - - - Test Specification for Hal Crypto - - - - - - - - - Chibios Hal Crypto Test Suite. - - - + + + Chibios Hal Crypto Test Suite. + + + - - - 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. - - - - - cry_ - - - + + 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. + + + + + cry_ + + + - - - + + - - + + - - - - Internal Tests - - - AES ECB - - - AES ECB - - - - - - + + + Internal Tests + + + AES ECB + + + AES ECB + + + + + + #include "ref_aes.h" static const CRYConfig config_Polling = { @@ -228,62 +223,62 @@ static const CRYConfig config_DMA = { AES_CFBS_128 //cfbs }; ]]> - - - - - AES ECB Polling - - - testing AES ECB with various Keys - - - - - - - + + + + AES ECB Polling + + + testing AES ECB with various Keys + + + + + + + - - - - - - + + + + + - - - - - - loading the key with 16 byte size - - - - - - + + + + + loading the key with 16 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 24 byte size - - - - - - + + + + loading the key with 24 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 32 byte size - - - - - - + + + + loading the key with 32 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - - - AES ECB DMA - - - testing AES ECB with various Keys - - - - - - - + + + + + + AES ECB DMA + + + testing AES ECB with various Keys + + + + + + + - - - - - - + + + + + - - - - - - loading the key with 16 byte size - - - - - - + + + + + loading the key with 16 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 24 byte size - - - - - - + + + + loading the key with 24 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 32 byte size - - - - - - + + + + loading the key with 32 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - - + + + + + + - - - Internal Tests - - - AES CFB - - - AES CFB - - - - - - + + Internal Tests + + + AES CFB + + + AES CFB + + + + + + #include "ref_aes.h" static const CRYConfig config_Polling = { @@ -679,62 +674,62 @@ static const CRYConfig config_DMA = { AES_CFBS_128 //cfbs }; ]]> - - - - - AES CFB Polling - - - testing AES CFB with various Keys - - - - - - - + + + + AES CFB Polling + + + testing AES CFB with various Keys + + + + + + + - - - - - - + + + + + - - - - - - loading the key with 16 byte size - - - - - - + + + + + loading the key with 16 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 24 byte size - - - - - - + + + + loading the key with 24 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 32 byte size - - - - - - + + + + loading the key with 32 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - - - AES CFB DMA - - - testing AES CFB with various Keys - - - - - - - + + + + + + AES CFB DMA + + + testing AES CFB with various Keys + + + + + + + - - - - - - + + + + + - - - - - - loading the key with 16 byte size - - - - - - + + + + + loading the key with 16 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 24 byte size - - - - - - + + + + loading the key with 24 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 32 byte size - - - - - - + + + + loading the key with 32 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - - + + + + + + - - - Internal Tests - - - AES CBC - - - AES CBC - - - - - - + + Internal Tests + + + AES CBC + + + AES CBC + + + + + + #include "ref_aes.h" static const CRYConfig config_Polling = { @@ -1130,62 +1125,62 @@ static const CRYConfig config_DMA = { AES_CFBS_128 //cfbs }; ]]> - - - - - AES CBC Polling - - - testing AES CBC with various Keys - - - - - - - + + + + AES CBC Polling + + + testing AES CBC with various Keys + + + + + + + - - - - - - + + + + + - - - - - - loading the key with 16 byte size - - - - - - + + + + + loading the key with 16 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 24 byte size - - - - - - + + + + loading the key with 24 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 32 byte size - - - - - - + + + + loading the key with 32 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - - - AES CBC DMA - - - testing AES CBC with various Keys - - - - - - - + + + + + + AES CBC DMA + + + testing AES CBC with various Keys + + + + + + + - - - - - - + + + + + - - - - - - loading the key with 16 byte size - - - - - - + + + + + loading the key with 16 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 24 byte size - - - - - - + + + + loading the key with 24 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - loading the key with 32 byte size - - - - - - + + + + loading the key with 32 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - - - + + + + + + - - - - Internal Tests - - - (T)DES - - - (T)DES testing - - - - - - + + Internal Tests + + + (T)DES + + + (T)DES testing + + + + + + #include "ref_des.h" static const CRYConfig configDES_Polling= @@ -1584,62 +1575,62 @@ static const CRYConfig configDES_DMA= }; ]]> - - - - - DES Polling - - - testing DES in polled mode - - - - - - - + + + + DES Polling + + + testing DES in polled mode + + + + + + + - - - - - - + + + + + - - - - - - loading the key with 8 byte size - - - - - - + + + + + loading the key with 8 byte size + + + + + + - - - - - Encrypt - - - - - - + + + + Encrypt + + + + + + - - - - - Decrypt - - - - - - + + + + Decrypt + + + + + + - - - - + + - - - - - - - - TDES CBC Polling - - - testing TDES CBC in polled mode - - - - - - - - - - - - - - - - - - - loading the key with 16 byte size - - - - - - - - - - - Encrypt - - - - - - + -for (int i = 0; i < TEST_DATA_WORD_LEN; i++) { - test_assert(msg_encrypted[i] == ((uint32_t*) refTDES_CBC_16)[i], "encrypt mismatch"); -} - -]]> - - - - - Decrypt - - - - - - - - - - - loading the key with 24 byte size - - - - - - - - - - - Encrypt - - - - - - - - - - - Decrypt - - - - - - - - - - - - - - - - TDES ECB Polling - - - testing TDES ECB in polling mode - - - - - - - - - - - - - - - - - - - loading the key with 16 byte size - - - - - - - - - - - Encrypt - - - - - - - - - - - Decrypt - - - - - - - - - - - loading the key with 24 byte size - - - - - - - - - - - Encrypt - - - - - - - - - - - Decrypt - - - - - - - - - - - - - - - - - - - TDES CBC DMA - - - testing TDES CBC in polled mode - - - - - - - - - - - - - - - - - - - loading the key with 16 byte size - - - - - - - - - - - Encrypt - - - - - - - - - - - Decrypt - - - - - - - - - - - loading the key with 24 byte size - - - - - - - - - - - Encrypt - - - - - - - - - - - Decrypt - - - - - - - - - - - - - - - - TDES ECB DMA - - - testing TDES ECB in DMA mode - - - - - - - - - - - - - - - - - - - loading the key with 16 byte size - - - - - - - - - - - Encrypt - - - - - - - - - - - Decrypt - - - - - - - - - - - loading the key with 24 byte size - - - - - - - - - - - Encrypt - - - - - - - - - - - Decrypt - - - - - - - - - - - - - - - - - - - - - - - - Internal Tests - - - TRNG - - - TRNG testing - - - - - + + + TDES CBC Polling + + + testing TDES CBC in polled mode + + + + + + + + + + + + + + + + + + loading the key with 16 byte size + + + + + + + + + + + Encrypt + + + + + + + + + + + Decrypt + + + + + + + + + + + loading the key with 24 byte size + + + + + + + + + + + Encrypt + + + + + + + + + + + Decrypt + + + + + + + + + + + + + + + + TDES ECB Polling + + + testing TDES ECB in polling mode + + + + + + + + + + + + + + + + + + + loading the key with 16 byte size + + + + + + + + + + + Encrypt + + + + + + + + + + + Decrypt + + + + + + + + + + + loading the key with 24 byte size + + + + + + + + + + + Encrypt + + + + + + + + + + + Decrypt + + + + + + + + + + + + + + + + + + + TDES CBC DMA + + + testing TDES CBC in polled mode + + + + + + + + + + + + + + + + + + + loading the key with 16 byte size + + + + + + + + + + + Encrypt + + + + + + + + + + + Decrypt + + + + + + + + + + + loading the key with 24 byte size + + + + + + + + + + + Encrypt + + + + + + + + + + + Decrypt + + + + + + + + + + + + + + + + TDES ECB DMA + + + testing TDES ECB in DMA mode + + + + + + + + + + + + + + + + + + + loading the key with 16 byte size + + + + + + + + + + + Encrypt + + + + + + + + + + + Decrypt + + + + + + + + + + + loading the key with 24 byte size + + + + + + + + + + + Encrypt + + + + + + + + + + + Decrypt + + + + + + + + + + + + + + + + + + + + + + + + Internal Tests + + + TRNG + + + TRNG testing + + + + + + static const CRYConfig configTRNG_Polling= @@ -2330,45 +2321,45 @@ static const CRYConfig configTRNG_Polling= }; ]]> - - - - - TRNG Polling - - - testing TRNG in polled mode - - - - - - - + + + + TRNG Polling + + + testing TRNG in polled mode + + + + + + + - - - - - - + + + + + - - - - - - - Random generation and test - - - - - - + + + + + + Random generation and test + + + + + + - - - - + + + + + + + + + + - - - - - - - + - - - Internal Tests - - - SHA - - - SHA testing - - - - - - + + Internal Tests + + + SHA + + + SHA testing + + + + + + #include "ref_sha.h" @@ -2500,49 +2491,49 @@ static cryerror_t crySHA512(CRYDriver *cryp, size_t size,const uint8_t *in, uint } ]]> - - - - - SHA1 Polling - - - testing SHA1 in polled mode - - - - - - - + + + + SHA1 Polling + + + testing SHA1 in polled mode + + + + + + + - - - - - - + + + + + - - - - - - - Digest - - - - - - + + + + + + Digest + + + + + + - - - - + + - - - - - - - - SHA256 Polling - - - testing SHA256 in polled mode - - - - - - - + + + + + SHA256 Polling + + + testing SHA256 in polled mode + + + + + + + - - - - - - + + + + + - - - - - - - Digest - - - - - - + + + + + + Digest + + + + + + - - - - + + - - - - - - - SHA512 Polling - - - testing SHA512 in polled mode - - - - - - - + + + + SHA512 Polling + + + testing SHA512 in polled mode + + + + + + + - - - - - - + + + + + - - - - - - - Digest - - - - - - + + + + + + Digest + + + + + + - - - - + + - - - - + + + + + + - + - - - Internal Tests - - - SHA - - - SHA testing - - - - - - + + Internal Tests + + + SHA + + + SHA testing + + + + + + #include "ref_sha.h" @@ -2949,49 +2940,49 @@ static cryerror_t crySHA512(CRYDriver *cryp, size_t size,const uint8_t *in, uint } ]]> - - - - - SHA1 DMA - - - testing SHA1 in DMA mode - - - - - - - + + + + SHA1 DMA + + + testing SHA1 in DMA mode + + + + + + + - - - - - - + + + + + - - - - - - - Digest - - - - - - + + + + + + Digest + + + + + + - - - - + + - - - - - - - - SHA256 DMA - - - testing SHA256 in DMA mode - - - - - - - + + + + + SHA256 DMA + + + testing SHA256 in DMA mode + + + + + + + - - - - - - + + + + + - - - - - - - Digest - - - - - - + + + + + + Digest + + + + + + - - - - + + - - - - - - - SHA512 DMA - - - testing SHA512 in DMA mode - - - - - - - + + + + SHA512 DMA + + + testing SHA512 in DMA mode + + + + + + + - - - - - - + + + + + - - - - - - - Digest - - - - - - + + + + + + Digest + + + + + + - - - - + + - - - - - - - - - - Internal Tests - - - GCM - - - GCM testing - - - - - - + + + + + + + Internal Tests + + + GCM + + + GCM testing + + + + + + #include "ref_gcm.h" #define plaintext msg_clear @@ -3364,48 +3355,48 @@ const struct test_gcm_t test_gcm_k[TEST_GCM_LEN]={ ]]> - - - - - GCM Polling - - - testing GCM in polled mode - - - - - - - + + + + GCM Polling + + + testing GCM in polled mode + + + + + + + - - - - - - + + + + + - - - - - - loading the key, encrypt and decrypt - - - - - - + + + + + loading the key, encrypt and decrypt + + + + + + - - + + - - - - - - - - - - GCM DMA - - - testing GCM in DMA mode - - - - - - - + + + + + + GCM DMA + + + testing GCM in DMA mode + + + + + + + - - - - - - + + + + + - - - - - - loading the key, encrypt and decrypt - - - - - - + + + + + loading the key, encrypt and decrypt + + + + + + - - + + - - - - - - - - - - - - - Internal Tests - - - HMAC - - - HMAC testing - - - - - - + + + + + + + + + + Internal Tests + + + HMAC + + + HMAC testing + + + + + + #include "ref_hmac.h" #define plaintext msg_clear @@ -3764,113 +3755,107 @@ static void cryHMAC512(CRYDriver *cryp) { } ]]> - - - - - HMAC Polling - - - testing HMAC in polled mode - - - - - - - + + + + HMAC Polling + + + testing HMAC in polled mode + + + + + + + - - - - - - + + + + + - - - - - - hmac 256 - - - - - - + + + + + hmac 256 + + + + + + - - - - - hmac 512 - - - - - - + + + + hmac 512 + + + + + + - - - - - - - - - - - - - HMAC DMA - - - testing HMAC in DMA mode - - - - - - - + + + + + + HMAC DMA + + + testing HMAC in DMA mode + + + + + + + - - - - - - + + + + + - - - - - - hmac 256 - - - - - - + + + + + hmac 256 + + + + + + - - - - - - hmac 512 - - - - - - + + + + hmac 512 + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + diff --git a/test/crypto/source/test/cry_test_sequence_001.c b/test/crypto/source/test/cry_test_sequence_001.c index e4cf6d1f6..276406597 100644 --- a/test/crypto/source/test/cry_test_sequence_001.c +++ b/test/crypto/source/test/cry_test_sequence_001.c @@ -97,6 +97,7 @@ static void cry_test_001_001_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [1.1.2] Encrypt.*/ test_set_step(2); @@ -112,6 +113,7 @@ static void cry_test_001_001_execute(void) { } } + test_end_step(2); /* [1.1.3] Decrypt.*/ 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.*/ 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_end_step(4); /* [1.1.5] Encrypt.*/ test_set_step(5); @@ -150,6 +154,7 @@ static void cry_test_001_001_execute(void) { } } + test_end_step(5); /* [1.1.6] Decrypt.*/ 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.*/ 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_end_step(7); /* [1.1.8] Encrypt.*/ test_set_step(8); @@ -188,6 +195,7 @@ static void cry_test_001_001_execute(void) { } } + test_end_step(8); /* [1.1.9] Decrypt.*/ 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 = { @@ -254,6 +263,7 @@ static void cry_test_001_002_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [1.2.2] Encrypt.*/ test_set_step(2); @@ -269,6 +279,7 @@ static void cry_test_001_002_execute(void) { } } + test_end_step(2); /* [1.2.3] Decrypt.*/ 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.*/ 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_end_step(4); /* [1.2.5] Encrypt.*/ test_set_step(5); @@ -307,6 +320,7 @@ static void cry_test_001_002_execute(void) { } } + test_end_step(5); /* [1.2.6] Decrypt.*/ 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.*/ 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_end_step(7); /* [1.2.8] Encrypt.*/ test_set_step(8); @@ -345,6 +361,7 @@ static void cry_test_001_002_execute(void) { } } + test_end_step(8); /* [1.2.9] Decrypt.*/ 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 = { diff --git a/test/crypto/source/test/cry_test_sequence_002.c b/test/crypto/source/test/cry_test_sequence_002.c index e683fd0f7..b35988f74 100644 --- a/test/crypto/source/test/cry_test_sequence_002.c +++ b/test/crypto/source/test/cry_test_sequence_002.c @@ -97,6 +97,7 @@ static void cry_test_002_001_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [2.1.2] Encrypt.*/ test_set_step(2); @@ -112,6 +113,7 @@ static void cry_test_002_001_execute(void) { } } + test_end_step(2); /* [2.1.3] Decrypt.*/ 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.*/ 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_end_step(4); /* [2.1.5] Encrypt.*/ test_set_step(5); @@ -150,6 +154,7 @@ static void cry_test_002_001_execute(void) { } } + test_end_step(5); /* [2.1.6] Decrypt.*/ 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.*/ 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_end_step(7); /* [2.1.8] Encrypt.*/ test_set_step(8); @@ -188,6 +195,7 @@ static void cry_test_002_001_execute(void) { } } + test_end_step(8); /* [2.1.9] Decrypt.*/ 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 = { @@ -254,6 +263,7 @@ static void cry_test_002_002_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [2.2.2] Encrypt.*/ test_set_step(2); @@ -269,6 +279,7 @@ static void cry_test_002_002_execute(void) { } } + test_end_step(2); /* [2.2.3] Decrypt.*/ 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.*/ 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_end_step(4); /* [2.2.5] Encrypt.*/ test_set_step(5); @@ -307,6 +320,7 @@ static void cry_test_002_002_execute(void) { } } + test_end_step(5); /* [2.2.6] Decrypt.*/ 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.*/ 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_end_step(7); /* [2.2.8] Encrypt.*/ test_set_step(8); @@ -345,6 +361,7 @@ static void cry_test_002_002_execute(void) { } } + test_end_step(8); /* [2.2.9] Decrypt.*/ 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 = { diff --git a/test/crypto/source/test/cry_test_sequence_003.c b/test/crypto/source/test/cry_test_sequence_003.c index 856ae5302..37035b647 100644 --- a/test/crypto/source/test/cry_test_sequence_003.c +++ b/test/crypto/source/test/cry_test_sequence_003.c @@ -97,6 +97,7 @@ static void cry_test_003_001_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [3.1.2] Encrypt.*/ 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++) { test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_128)[i], "encrypt mismatch"); } - } + test_end_step(2); /* [3.1.3] Decrypt.*/ 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++) { test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch"); } - } + test_end_step(3); /* [3.1.4] loading the key with 24 byte size.*/ 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_end_step(4); /* [3.1.5] Encrypt.*/ 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++) { test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_192)[i], "encrypt mismatch"); } - } + test_end_step(5); /* [3.1.6] Decrypt.*/ 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++) { test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch"); } - } + test_end_step(6); /* [3.1.7] loading the key with 32 byte size.*/ 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_end_step(7); /* [3.1.8] Encrypt.*/ test_set_step(8); @@ -188,6 +191,7 @@ static void cry_test_003_001_execute(void) { } } + test_end_step(8); /* [3.1.9] Decrypt.*/ 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 = { @@ -254,6 +259,7 @@ static void cry_test_003_002_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [3.2.2] Encrypt.*/ test_set_step(2); @@ -269,6 +275,7 @@ static void cry_test_003_002_execute(void) { } } + test_end_step(2); /* [3.2.3] Decrypt.*/ 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.*/ 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_end_step(4); /* [3.2.5] Encrypt.*/ test_set_step(5); @@ -307,6 +316,7 @@ static void cry_test_003_002_execute(void) { } } + test_end_step(5); /* [3.2.6] Decrypt.*/ 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.*/ 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_end_step(7); /* [3.2.8] Encrypt.*/ test_set_step(8); @@ -345,6 +357,7 @@ static void cry_test_003_002_execute(void) { } } + test_end_step(8); /* [3.2.9] Decrypt.*/ 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 = { diff --git a/test/crypto/source/test/cry_test_sequence_004.c b/test/crypto/source/test/cry_test_sequence_004.c index d5a5442c2..00842685f 100644 --- a/test/crypto/source/test/cry_test_sequence_004.c +++ b/test/crypto/source/test/cry_test_sequence_004.c @@ -97,6 +97,7 @@ static void cry_test_004_001_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [4.1.2] Encrypt.*/ test_set_step(2); @@ -112,6 +113,7 @@ static void cry_test_004_001_execute(void) { } } + test_end_step(2); /* [4.1.3] Decrypt.*/ 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 = { @@ -175,6 +178,7 @@ static void cry_test_004_002_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [4.2.2] Encrypt.*/ test_set_step(2); @@ -190,6 +194,7 @@ static void cry_test_004_002_execute(void) { } } + test_end_step(2); /* [4.2.3] Decrypt.*/ 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.*/ 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_end_step(4); /* [4.2.5] Encrypt.*/ test_set_step(5); @@ -228,6 +235,7 @@ static void cry_test_004_002_execute(void) { } } + test_end_step(5); /* [4.2.6] Decrypt.*/ 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 = { @@ -291,6 +300,7 @@ static void cry_test_004_003_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [4.3.2] Encrypt.*/ test_set_step(2); @@ -306,6 +316,7 @@ static void cry_test_004_003_execute(void) { } } + test_end_step(2); /* [4.3.3] Decrypt.*/ 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.*/ 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_end_step(4); /* [4.3.5] Encrypt.*/ test_set_step(5); @@ -344,6 +357,7 @@ static void cry_test_004_003_execute(void) { } } + test_end_step(5); /* [4.3.6] Decrypt.*/ 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 = { @@ -407,6 +422,7 @@ static void cry_test_004_004_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [4.4.2] Encrypt.*/ test_set_step(2); @@ -422,6 +438,7 @@ static void cry_test_004_004_execute(void) { } } + test_end_step(2); /* [4.4.3] Decrypt.*/ 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.*/ 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_end_step(4); /* [4.4.5] Encrypt.*/ test_set_step(5); @@ -460,6 +479,7 @@ static void cry_test_004_004_execute(void) { } } + test_end_step(5); /* [4.4.6] Decrypt.*/ 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 = { @@ -523,6 +544,7 @@ static void cry_test_004_005_execute(void) { test_assert(ret == CRY_NOERROR, "failed load transient key"); } + test_end_step(1); /* [4.5.2] Encrypt.*/ test_set_step(2); @@ -538,6 +560,7 @@ static void cry_test_004_005_execute(void) { } } + test_end_step(2); /* [4.5.3] Decrypt.*/ 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.*/ 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_end_step(4); /* [4.5.5] Encrypt.*/ test_set_step(5); @@ -576,6 +601,7 @@ static void cry_test_004_005_execute(void) { } } + test_end_step(5); /* [4.5.6] Decrypt.*/ 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 = { diff --git a/test/crypto/source/test/cry_test_sequence_005.c b/test/crypto/source/test/cry_test_sequence_005.c index 6649d39a6..67a609518 100644 --- a/test/crypto/source/test/cry_test_sequence_005.c +++ b/test/crypto/source/test/cry_test_sequence_005.c @@ -97,6 +97,7 @@ static void cry_test_005_001_execute(void) { } + test_end_step(1); } static const testcase_t cry_test_005_001 = { diff --git a/test/crypto/source/test/cry_test_sequence_006.c b/test/crypto/source/test/cry_test_sequence_006.c index 9b9f30a85..7d25e3865 100644 --- a/test/crypto/source/test/cry_test_sequence_006.c +++ b/test/crypto/source/test/cry_test_sequence_006.c @@ -233,6 +233,7 @@ static void cry_test_006_001_execute(void) { } + test_end_step(1); } 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 = { @@ -437,6 +439,7 @@ static void cry_test_006_003_execute(void) { } + test_end_step(1); } static const testcase_t cry_test_006_003 = { diff --git a/test/crypto/source/test/cry_test_sequence_007.c b/test/crypto/source/test/cry_test_sequence_007.c index 52f8e2c0e..f4781b337 100644 --- a/test/crypto/source/test/cry_test_sequence_007.c +++ b/test/crypto/source/test/cry_test_sequence_007.c @@ -227,6 +227,7 @@ static void cry_test_007_001_execute(void) { } } + test_end_step(1); } 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 = { @@ -430,6 +432,7 @@ static void cry_test_007_003_execute(void) { } } + test_end_step(1); } static const testcase_t cry_test_007_003 = { diff --git a/test/crypto/source/test/cry_test_sequence_008.c b/test/crypto/source/test/cry_test_sequence_008.c index d22d6b020..29347b3a4 100644 --- a/test/crypto/source/test/cry_test_sequence_008.c +++ b/test/crypto/source/test/cry_test_sequence_008.c @@ -203,6 +203,7 @@ static void cry_test_008_001_execute(void) { } } + test_end_step(1); } 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 = { diff --git a/test/crypto/source/test/cry_test_sequence_009.c b/test/crypto/source/test/cry_test_sequence_009.c index c0023ea7e..d84d119fe 100644 --- a/test/crypto/source/test/cry_test_sequence_009.c +++ b/test/crypto/source/test/cry_test_sequence_009.c @@ -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_end_step(1); /* [9.1.2] hmac 512.*/ 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_end_step(2); } 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_end_step(1); /* [9.2.2] hmac 512.*/ 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_end_step(2); } static const testcase_t cry_test_009_002 = { diff --git a/test/mfs/configuration.xml b/test/mfs/configuration.xml index 089f95f10..e2ade2eb1 100644 --- a/test/mfs/configuration.xml +++ b/test/mfs/configuration.xml @@ -1,19 +1,12 @@ - - - - Test Specification for ChibiOS/HAL MFS Complex Driver. - - - - - - - - - ChibiOS/HAL MFS Test Suite. - - - + + + ChibiOS/HAL MFS Test Suite. + + + - - - 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. - - - - - mfs_ - - - + + 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. + + + + + mfs_ + + + - - - + + - - - - - - Internal Tests - - - Functional tests. - - - The APIs are tested for functionality, correct cases and expected error cases are tested. - - - - - - + + + + + + Internal Tests + + + Functional tests. + + + The APIs are tested for functionality, correct cases and + expected error cases are tested. + + + + + + #include "hal_mfs.h"]]> - - - - - Testing mfsStart() behavior. - - - The initialization function is tested. This function can fail only in case of Flash Array failures or in case of unexpected internal errors. - - - - - - - - - - - - - - - - - - - Erasing the flash array using a low level function. - - - - - - + + + + Testing mfsStart() behavior. + + + The initialization function is tested. This function + can fail only in case of Flash Array failures or in case + of unexpected internal errors. + + + + + + + + + + + + + + + + + + + Erasing the flash array using a low level + function. + + + + + + - - - - - Calling mfsStart() on an uninitialized flash array, MFS_NO_ERROR is expected. - - - - - - + + + + Calling mfsStart() on an uninitialized flash + array, MFS_NO_ERROR is expected. + + + + + + - - - - - Calling mfsStart() on a newly initialized flash array, MFS_NO_ERROR is expected. - - - - - - + + + + Calling mfsStart() on a newly initialized flash + array, MFS_NO_ERROR is expected. + + + + + + - - - - - - - Checking for non existing record. - - - The records space is explored with an initialized but empty managed storage, no record should exist. - - - - - - - - - - - - - - - - - - - Exploring the records space, MFS_ERR_NOT_FOUND is expected for each index. - - - - - - + + + + + + Checking for non existing record. + + + The records space is explored with an initialized but + empty managed storage, no record should exist. + + + + + + + + + + + + + + + + + + + Exploring the records space, MFS_ERR_NOT_FOUND is + expected for each index. + + + + + + - - - - - - - Creating, updating and erasing a record. - - - A record is created, updated several times with different payloads and finally erased. - - - - - - - - - - - - - - - - - - - The record must not already exists, MFS_ERR_NOT_FOUND is expected. - - - - - - + + + + + + Creating, updating and erasing a record. + + + A record is created, updated several times with + different payloads and finally erased. + + + + + + + + + + + + + + + + + + + The record must not already exists, + MFS_ERR_NOT_FOUND is expected. + + + + + + - - - - - Creating the record then retrieving it again, MFS_NO_ERROR is expected, record content and size are compared with the original. - - - - - - + + + + Creating the record then retrieving it again, + MFS_NO_ERROR is expected, record content and size are + compared with the original. + + + + + + - - - - - Updating the record then retrieving it again, MFS_NO_ERROR is expected, record content and size are compared with the original. - - - - - - + + + + Updating the record then retrieving it again, + MFS_NO_ERROR is expected, record content and size are + compared with the original. + + + + + + - - - - - Erasing the record then trying to retrieve it again, MFS_NO_ERROR is expected on erase, MFS_ERR_NOT_FOUND is expected on retrieve. - - - - - - + + + + Erasing the record then trying to retrieve it + again, MFS_NO_ERROR is expected on erase, + MFS_ERR_NOT_FOUND is expected on retrieve. + + + + + + - - - - - - - Erasing the whole storage and re-initialization. - - - The managed storage is erased, initialized and re-mounted. - - - - - - - + + + + + + Erasing the whole storage and re-initialization. + + + + The managed storage is erased, initialized and + re-mounted. + + + + + + + - - - - - - - - - - - - Creating records 1, 2 and 3, MFS_NO_ERROR is expected. - - - - - - + + + + + + + + + + + Creating records 1, 2 and 3, MFS_NO_ERROR is + expected. + + + + + + - - - - - Records must exist. - - - - - - + + + + Records must exist. + + + + + + - - - - - Re-mounting, records must still exist. - - - - - - + + + + Re-mounting, records must still exist. + + + + + + - - - - - 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. - - - - - - + + + + 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. + + + + + + - - - - - - - Testing storage size limit. - - - The storage is entirely filled with different records and the final error is tested. - - - - - - - + + + + + + Testing storage size limit. + + + The storage is entirely filled with different records + and the final error is tested. + + + + + + + - - - - - - - - - - - - Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected. - - - - - - + + + + + + + + + + + Filling up the storage by writing records with + increasing IDs, MFS_NO_ERROR is expected. + + + + + + - - - - - Creating one more record, should fail, MFS_ERR_OUT_OF_MEM is expected. - - - - - - + + + + Creating one more record, should fail, + MFS_ERR_OUT_OF_MEM is expected. + + + + + + - - - - - Adding a smaller record to fill the final gap. A reinitialization is performed and MFS_NO_ERROR is expected. - - - - - - + + + + Adding a smaller record to fill the final gap. A + reinitialization is performed and MFS_NO_ERROR is + expected. + + + + + + - - - - - - - Testing garbage collection by writing. - - - The garbage collection procedure is triggeredby a write operation and the state of both banks is checked. - - - - - - - + + + + + + Testing garbage collection by writing. + + + The garbage collection procedure is triggeredby a + write operation and the state of both banks is checked. + + + + + + + + - - - - - - - - - - - - Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected. - - - - - - + + + + + + + + + + + Filling up the storage by writing records with + increasing IDs, MFS_NO_ERROR is expected. + + + + + + - - - - - Erasing one record, MFS_NO_ERROR is expected. - - - - - - + + + + Erasing one record, MFS_NO_ERROR is expected. + + + + + + + - - - - - Writing one more record triggers garbage collection, MFS_WARN_GC is expected, KS state is checked for correctness after the operation. - - - - - - + + + + Writing one more record triggers garbage + collection, MFS_WARN_GC is expected, KS state is + checked for correctness after the operation. + + + + + + - - - - - Checking for all records in the new bank, MFS_NOERROR is expected for each record. - - - - - - + + + + Checking for all records in the new bank, + MFS_NOERROR is expected for each record. + + + + + + - - - - - Erasing one record, MFS_NO_ERROR is expected. - - - - - - + + + + Erasing one record, MFS_NO_ERROR is expected. + + + + + + + - - - - - Writing one more record triggers garbage collection, MFS_WARN_GC is expected, MFS object state is checked for correctness after the operation. - - - - - - + + + + Writing one more record triggers garbage + collection, MFS_WARN_GC is expected, MFS object state + is checked for correctness after the operation. + + + + + + + - - - - - Checking for all records in the new bank, MFS_NO_ERROR is expected for each record. - - - - - - + + + + Checking for all records in the new bank, + MFS_NO_ERROR is expected for each record. + + + + + + - - - - - - - Testing garbage collection by erasing - - - The garbage collection procedure is triggered by an erase operation and the state of both banks is checked. - - - - - - - + + + + + + Testing garbage collection by erasing + + + The garbage collection procedure is triggered by an + erase operation and the state of both banks is checked. + + + + + + + + - - - - - - - - - - - - Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected. - - - - - - + + + + + + + + + + + Filling up the storage by writing records with + increasing IDs, MFS_NO_ERROR is expected. + + + + + + - - - - - Erase records until the flash bank is filled entirely. - - - - - - + + + + Erase records until the flash bank is filled + entirely. + + + + + + - - - - - Erasing one more record triggers garbage collection, MFS_WARN_GC is expected, KS state is checked for correctness after the operation. - - - - - - + + + + Erasing one more record triggers garbage + collection, MFS_WARN_GC is expected, KS state is + checked for correctness after the operation. + + + + + + - - - - - - - - - Internal Tests - - - Transaction Mode tests. - - - This sequence tests the MFS behavior when used in transaction mode, correct cases and expected error cases are tested. - - - - - - + + + + + + + + + Internal Tests + + + Transaction Mode tests. + + + This sequence tests the MFS behavior when used in + transaction mode, correct cases and expected error cases are + tested. + + + + + + #include "hal_mfs.h"]]> - - - - - Committing a transaction - - - A set of new/existing records are written/erased within a transaction then the transaction is committed, the state is checked afterward. - - - - - - - + + + + Committing a transaction + + + A set of new/existing records are written/erased + within a transaction then the transaction is committed, + the state is checked afterward. + + + + + + + - - - - - - + + + + + - - - - - - Records 1, 2 and 3 are created, MFS_NO_ERROR is expected. - - - - - - + + + + + Records 1, 2 and 3 are created, MFS_NO_ERROR is + expected. + + + + + + - - - - - Presence of records 1, 2 and 3 is verified, MFS_NO_ERROR is expected. - - - - - - + + + + Presence of records 1, 2 and 3 is verified, + MFS_NO_ERROR is expected. + + + + + + - - - - - Starting a transaction with sufficient pre-allocated space, MFS_NO_ERROR is expected. - - - - - - + + + + Starting a transaction with sufficient + pre-allocated space, MFS_NO_ERROR is expected. + + + + + + - - - - - Atomically erasing record 1, updating record 2, reading record 3. - - - - - - + + + + Atomically erasing record 1, updating record 2, + reading record 3. + + + + + + - - - - - Committing the transaction, MFS_NO_ERROR is expected. - - - - - - + + + + Committing the transaction, MFS_NO_ERROR is + expected. + + + + + + - - - - - Testing outcome, records 1 must not be present, record 2 must contain the new value and record 3 must be unchanged. - - - - - - + + + + Testing outcome, records 1 must not be present, + record 2 must contain the new value and record 3 must + be unchanged. + + + + + + - - - - - Re-mounting the manage storage, MFS_NO_ERROR is expected. - - - - - - + + + + Re-mounting the manage storage, MFS_NO_ERROR is + expected. + + + + + + - - - - - Testing outcome again after re-start. - - - - - - + + + + Testing outcome again after re-start. + + + + + + - - - - - Performing a garbage collection, the result must - not change. - - - - - - + + + + Performing a garbage collection, the result must + not change. + + + + + + + - - - - - Testing outcome again after garbage collection. - - - - - - + + + + Testing outcome again after garbage collection. + + + + + + + - - - - - - - Rolling back a transaction. - - - A set of new/existing records are written/erased within a transaction then the transaction is rolled back, the state is checked afterward. - - - - - - - + + + + + + Rolling back a transaction. + + + A set of new/existing records are written/erased + within a transaction then the transaction is rolled back, + the state is checked afterward. + + + + + + + - - - - - - + + + + + - - - - - - Records 1, 2 and 3 are created, MFS_NO_ERROR is expected. - - - - - - + + + + + Records 1, 2 and 3 are created, MFS_NO_ERROR is + expected. + + + + + + - - - - - Presence of records 1, 2 and 3 is verified, MFS_NO_ERROR is expected. - - - - - - + + + + Presence of records 1, 2 and 3 is verified, + MFS_NO_ERROR is expected. + + + + + + - - - - - Starting a transaction with sufficient pre-allocated space, MFS_NO_ERROR is expected.. - - - - - - + + + + Starting a transaction with sufficient + pre-allocated space, MFS_NO_ERROR is expected.. + + + + + + + - - - - - Atomically erasing record 1, updating record 2, reading record 3. - - - - - - + + + + Atomically erasing record 1, updating record 2, + reading record 3. + + + + + + - - - - - Rolling back the transaction, MFS_NO_ERROR is expected. - - - - - - + + + + Rolling back the transaction, MFS_NO_ERROR is + expected. + + + + + + - - - - - State must not have changed, records 1, 2 and 3 must still be there unchanged. - - - - - - + + + + State must not have changed, records 1, 2 and 3 + must still be there unchanged. + + + + + + - - - - - - - Transaction triggering an early garbage collect. - - - A transaction is started with sufficient space but not contiguous, a garbage collection is triggered. - - - - - - - + + + + + + Transaction triggering an early garbage collect. + + + + A transaction is started with sufficient space but + not contiguous, a garbage collection is triggered. + + + + + + + - - - - - - - - - - - - Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected. - - - - - - + + + + + + + + + + + Filling up the storage by writing records with + increasing IDs, MFS_NO_ERROR is expected. + + + + + + - - - - - Erasing one record, MFS_NO_ERROR is expected. - - - - - - + + + + Erasing one record, MFS_NO_ERROR is expected. + + + + + + + - - - - - Starting a transaction with the whole remaining space, MFS_ERR_OUT_OF_MEM is expected. - - - - - - + + + + Starting a transaction with the whole remaining + space, MFS_ERR_OUT_OF_MEM is expected. + + + + + + bank_size - mfs1.used_space; err = mfsStartTransaction(&mfs1, size); test_assert(err == MFS_ERR_OUT_OF_MEM, "invalid error code");]]> - - - - - Starting a transaction with insufficient space for one more header, MFS_ERR_OUT_OF_MEM is expected. - - - - - - + + + + Starting a transaction with insufficient space + for one more header, MFS_ERR_OUT_OF_MEM is expected. + + + + + + + bank_size - mfs1.used_space) - sizeof (mfs_data_header_t)) + 1; err = mfsStartTransaction(&mfs1, size); test_assert(err == MFS_ERR_OUT_OF_MEM, "invalid error code");]]> - - - - - Starting a transaction with just enough space for one more header, MFS_NO_ERROR is expected. - - - - - - + + + + Starting a transaction with just enough space for + one more header, MFS_NO_ERROR is expected. + + + + + + bank_size - mfs1.used_space) - sizeof (mfs_data_header_t); err = mfsStartTransaction(&mfs1, size); test_assert(err == MFS_NO_ERROR, "error starting transaction");]]> - - - - - Rolling back, MFS_NO_ERROR is expected. - - - - - - + + + + Rolling back, MFS_NO_ERROR is expected. + + + + + + - - - - - - - - - Internal Tests - - - API Invalid Cases tests. - - - This test sequence tests the error coded returned by the various APIs when called when the system is not initialized. - - + + + + + + + + + Internal Tests + + + API Invalid Cases tests. + + + This test sequence tests the error coded returned by the + various APIs when called when the system is not initialized. + + + + + + + + + + + + Initialization error from APIs. + + + The API functions are invoked without prior + initialization. + + + + + + - - - - - - - - Initialization error from APIs. - - - The API functions are invoked without prior initialization. - - - - - - - - - - - - - - - - - - - The function mfsErase() is called, MFS_ERR_INV_STATE is expected. - - - - - - + + + + + + + + + + + The function mfsErase() is called, + MFS_ERR_INV_STATE is expected. + + + + + + - - - - - The function mfsWriteRecord() is called, MFS_ERR_INV_STATE is expected. - - - - - - + + + + The function mfsWriteRecord() is called, + MFS_ERR_INV_STATE is expected. + + + + + + - - - - - The function mfsEraseRecord() is called, MFS_ERR_INV_STATE is expected. - - - - - - + + + + The function mfsEraseRecord() is called, + MFS_ERR_INV_STATE is expected. + + + + + + - - - - - The function mfsReadRecord() is called, MFS_ERR_INV_STATE is expected. - - - - - - + + + + The function mfsReadRecord() is called, + MFS_ERR_INV_STATE is expected. + + + + + + - - - - - The function mfsPerformGarbageCollection() is called, MFS_ERR_INV_STATE is expected. - - - - - - + + + + The function mfsPerformGarbageCollection() is + called, MFS_ERR_INV_STATE is expected. + + + + + + - - - - - - - Erasing non existing record. - - - An erase operation is attempted on an non-existing record. - - - - - - - + + + + + + Erasing non existing record. + + + An erase operation is attempted on an non-existing + record. + + + + + + + - - - - - - - - - - - - Record one is erased, the error MFS_ERR_NOT_FOUND is expected. - - - - - - + + + + + + + + + + + Record one is erased, the error MFS_ERR_NOT_FOUND + is expected. + + + + + + - - - - - - - - - - - - + + + + + + + + diff --git a/test/nasa_osal/configuration.xml b/test/nasa_osal/configuration.xml index f1b2a3aa2..518b336e6 100644 --- a/test/nasa_osal/configuration.xml +++ b/test/nasa_osal/configuration.xml @@ -1,30 +1,26 @@ - - - - Test specification for the NASA OSAL ChibiOS extension. - - - - - - - - - NASA OSAL Test Suite. - - - - - - Test suite for NASA OSAL implementation over ChibiOS/RT. The purpose of this suite is to perform unit tests on the OSAL module and to converge to 100% code coverage through successive improvements. - - - - - nasa_osal_ - - - + + + NASA OSAL Test Suite. + + + + + + Test suite for NASA OSAL implementation over ChibiOS/RT. + The purpose of this suite is to perform unit tests on the OSAL + module and to converge to 100% code coverage through successive + improvements. + + + + + nasa_osal_ + + + - - - + + - - - - - - Internal Tests - - - Tasks Functionality - - - This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to threading. - - - - - - + + + + + Internal Tests + + + Tasks Functionality + + + This sequence tests the NASA OSAL over ChibiOS/RT + functionalities related to threading. + + + + + + - - - - - OS_TaskCreate() errors - - - Parameters checking in OS_TaskCreate() is tested. - - - - - - - - - - - - - - - - - - - OS_TaskCreate() is invoked with task_id set to NULL, an error is expected. - - - - - - + + + + OS_TaskCreate() errors + + + Parameters checking in OS_TaskCreate() is tested. + + + + + + + + + + + + + + + + + + + + OS_TaskCreate() is invoked with task_id set to + NULL, an error is expected. + + + + + + - - - - - OS_TaskCreate() is invoked with task_name set to NULL, an error is expected. - - - - - - + + + + OS_TaskCreate() is invoked with task_name set to + NULL, an error is expected. + + + + + + - - - - - OS_TaskCreate() is invoked with stack_pointer set to NULL, an error is expected. - - - - - - + + + + OS_TaskCreate() is invoked with stack_pointer set + to NULL, an error is expected. + + + + + + - - - - - OS_TaskCreate() is invoked with a very long task name, an error is expected. - - - - - - + + + + OS_TaskCreate() is invoked with a very long task + name, an error is expected. + + + + + + - - - - - OS_TaskCreate() is invoked with priority below and above allowed range, an error is expected. - - - - - - + + + + OS_TaskCreate() is invoked with priority below + and above allowed range, an error is expected. + + + + + + - - - - - OS_TaskCreate() is invoked with a stack size below minimum, an error is expected. - - - - - - + + + + OS_TaskCreate() is invoked with a stack size + below minimum, an error is expected. + + + + + + - - - - - OS_TaskCreate() is invoked twice with duplicated name and then duplicated stack, an error is expected in both cases. - - - - - - + + + + OS_TaskCreate() is invoked twice with duplicated + name and then duplicated stack, an error is expected + in both cases. + + + + + + - - - - - - - OS_TaskCreate() priority ordering - - - Four tasks are created at different priorities and in different order. The execution order must happen in order of priority regardless the creation order. - - - - - - - - - - - - - - - - - - - Four tasks are created in priority order from low to high. - - - - - - + + + + + + OS_TaskCreate() priority ordering + + + Four tasks are created at different priorities and in + different order. The execution order must happen in order + of priority regardless the creation order. + + + + + + + + + + + + + + + + + + + Four tasks are created in priority order from low + to high. + + + + + + - - - - - Tasks are made runnable atomically and their execution order tested. - - - - - - + + + + Tasks are made runnable atomically and their + execution order tested. + + + + + + - - - - - Four tasks are created in priority order from high to low. - - - - - - + + + + Four tasks are created in priority order from + high to low. + + + + + + - - - - - Tasks are made runnable atomically and their execution order tested. - - - - - - + + + + Tasks are made runnable atomically and their + execution order tested. + + + + + + - - - - - Four tasks are created in an not ordered way. - - - - - - + + + + Four tasks are created in an not ordered way. + + + + + + + - - - - - Tasks are made runnable atomically and their execution order tested. - - - - - - + + + + Tasks are made runnable atomically and their + execution order tested. + + + + + + - - - - - - - OS_TaskDelete() errors - - - Parameters checking in OS_TaskDelete() is tested. - - - - - - - - - - - - - - - - - - - OS_TaskDelete() is invoked with task_id set to -1, an error is expected. - - - - - - + + + + + + OS_TaskDelete() errors + + + Parameters checking in OS_TaskDelete() is tested. + + + + + + + + + + + + + + + + + + + + OS_TaskDelete() is invoked with task_id set to + -1, an error is expected. + + + + + + - - - - - - - OS_TaskDelete() and OS_TaskInstallDeleteHandler() functionality - - - OS_TaskDelete() and OS_TaskInstallDeleteHandler() are tested for functionality. - - - - - - - - - - - - - - - - - - - Creating a task executing an infinite loop. - - - - - - + + + + + + OS_TaskDelete() and OS_TaskInstallDeleteHandler() functionality + + + OS_TaskDelete() and OS_TaskInstallDeleteHandler() are + tested for functionality. + + + + + + + + + + + + + + + + + + + Creating a task executing an infinite loop. + + + + + + + - - - - - Letting the task run for a while then deleting it. A check is performed on the correct execution of the delete handler. - - - - - - + + + + Letting the task run for a while then deleting + it. A check is performed on the correct execution of + the delete handler. + + + + + + - - - - - - - - - Internal Tests - - - Queues Functionality - - - This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to queues - - - - - - + + + + + + + + + Internal Tests + + + Queues Functionality + + + This sequence tests the NASA OSAL over ChibiOS/RT + functionalities related to queues + + + + + + #include "osapi.h" @@ -653,39 +674,41 @@ static void test_task_writer(void) { } } }]]> - - - - - OS_QueueCreate() and OS_QueueDelete() errors - - - Parameters checking in OS_QueueCreate() and OS_QueueDelete() is tested. - - - - - - - - - - - - - - - - - - - OS_QueueCreate() is invoked with queue_id set to NULL, an error is expected. - - - - - - + + + + OS_QueueCreate() and OS_QueueDelete() errors + + + Parameters checking in OS_QueueCreate() and + OS_QueueDelete() is tested. + + + + + + + + + + + + + + + + + + + OS_QueueCreate() is invoked with queue_id set to + NULL, an error is expected. + + + + + + - - - - - OS_QueueCreate() is invoked with task_name set to NULL, an error is expected. - - - - - - + + + + OS_QueueCreate() is invoked with task_name set to + NULL, an error is expected. + + + + + + - - - - - OS_QueueCreate() is invoked with a very long task name, an error is expected. - - - - - - + + + + OS_QueueCreate() is invoked with a very long task + name, an error is expected. + + + + + + - - - - - OS_QueueDelete() is invoked with queue_id set to -1, an error is expected. - - - - - - + + + + OS_QueueDelete() is invoked with queue_id set to + -1, an error is expected. + + + + + + - - - - - OS_QueueCreate() is invoked twice with duplicated name, an error is expected, then the queue is deleted using OS_QueueDelete(). - - - - - - + + + + OS_QueueCreate() is invoked twice with duplicated + name, an error is expected, then the queue is deleted + using OS_QueueDelete(). + + + + + + - - - - - - - OS_QueueGetIdByName() errors - - - Parameters checking in OS_QueueGetIdByName() is tested. - - - - - - - - - - - - - - - - - - - OS_QueueGetIdByName() is invoked with queue_id set to NULL, an error is expected. - - - - - - + + + + + + OS_QueueGetIdByName() errors + + + Parameters checking in OS_QueueGetIdByName() is + tested. + + + + + + + + + + + + + + + + + + + OS_QueueGetIdByName() is invoked with queue_id + set to NULL, an error is expected. + + + + + + - - - - - OS_QueueGetIdByName() is invoked with queue_name set to NULL, an error is expected. - - - - - - + + + + OS_QueueGetIdByName() is invoked with queue_name + set to NULL, an error is expected. + + + + + + - - - - - OS_QueueGetIdByName() is invoked with a very long task name, an error is expected. - - - - - - + + + + OS_QueueGetIdByName() is invoked with a very long + task name, an error is expected. + + + + + + - - - - - - - OS_QueuePut() and OS_QueueGet() functionality - - - A task writes on a queue, the messages are retrieved on the other side in blocking mode. - - - - - - - + + + + + + OS_QueuePut() and OS_QueueGet() functionality + + + A task writes on a queue, the messages are retrieved + on the other side in blocking mode. + + + + + + + - - - + + - - - + + - - - - - - Creataing a queue with depth 4 and message size 20 - - - - - - + + + + + Creataing a queue with depth 4 and message size + 20 + + + + + + - - - - - Creating the writer task. - - - - - - + + + + Creating the writer task. + + + + + + - - - - - Reading messages from the writer task. - - - - - - + + + + Reading messages from the writer task. + + + + + + test_assert(strncmp(data, "Hello World", sizeof (data)) == 0, "wrong message"); }]]> - - - - - Waiting for task termination then checking for errors. - - - - - - + + + + Waiting for task termination then checking for + errors. + + + + + + - - - - - - - OS_QueueGet() with timeout functionality - - - OS_QueueGet() timeout functionality is tested. - - - - - - - + + + + + + OS_QueueGet() with timeout functionality + + + OS_QueueGet() timeout functionality is tested. + + + + + + + + - - - + + - - - + + - - - - - - Retrieving the queue by name. - - - - - - + + + + + Retrieving the queue by name. + + + + + + - - - - - Get operation with a one second timeout, an error is expected. - - - - - - + + + + Get operation with a one second timeout, an error + is expected. + + + + + + - - - - - Get operation in non-blocking mode, an error is expected. - - - - - - + + + + Get operation in non-blocking mode, an error is + expected. + + + + + + - - - - - - - - - Internal Tests - - - Timers Functionality - - - This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to timers - - - - - - + + + + + + + + + Internal Tests + + + Timers Functionality + + + This sequence tests the NASA OSAL over ChibiOS/RT + functionalities related to timers + + + + + + #include "osapi.h" @@ -1035,39 +1074,41 @@ static void tmr_callback(uint32 timer_id) { cnt++; }]]> - - - - - OS_TimerCreate() and OS_TimerDelete() errors - - - Parameters checking in OS_TimerCreate() and OS_TimerDelete() is tested. - - - - - - - - - - - - - - - - - - - OS_TimerCreate() is invoked with timer_id set to NULL, an error is expected. - - - - - - + + + + OS_TimerCreate() and OS_TimerDelete() errors + + + Parameters checking in OS_TimerCreate() and + OS_TimerDelete() is tested. + + + + + + + + + + + + + + + + + + + OS_TimerCreate() is invoked with timer_id set to + NULL, an error is expected. + + + + + + - - - - - OS_TimerCreate() is invoked with timer_name set to NULL, an error is expected. - - - - - - + + + + OS_TimerCreate() is invoked with timer_name set + to NULL, an error is expected. + + + + + + - - - - - OS_TimerCreate() is invoked with accuracy set to NULL, an error is expected. - - - - - - + + + + OS_TimerCreate() is invoked with accuracy set to + NULL, an error is expected. + + + + + + - - - - - OS_TimerCreate() is invoked with callback_ptr set to NULL, an error is expected. - - - - - - + + + + OS_TimerCreate() is invoked with callback_ptr set + to NULL, an error is expected. + + + + + + - - - - - OS_TimerCreate() is invoked with a very long timer name, an error is expected. - - - - - - + + + + OS_TimerCreate() is invoked with a very long + timer name, an error is expected. + + + + + + - - - - - OS_TimerDelete() is invoked with timer_id set to -1, an error is expected. - - - - - - + + + + OS_TimerDelete() is invoked with timer_id set to + -1, an error is expected. + + + + + + - - - - - OS_TimerCreate() is invoked twice with duplicated name, an error is expected, then the queue is deleted using OS_TimerDelete(). - - - - - - + + + + OS_TimerCreate() is invoked twice with duplicated + name, an error is expected, then the queue is deleted + using OS_TimerDelete(). + + + + + + - - - - - - - OS_TimerSet() errors - - - Parameters checking in OS_TimerSet() is tested. - - - - - - - - - - - - - - - - - - - OS_TimerSet() is invoked with timer_id set to -1, an error is expected. - - - - - - + + + + + + OS_TimerSet() errors + + + Parameters checking in OS_TimerSet() is tested. + + + + + + + + + + + + + + + + + + + + OS_TimerSet() is invoked with timer_id set to -1, + an error is expected. + + + + + + - - - - - - - OS_TimerGetIdByName() errors - - - Parameters checking in OS_TimerGetIdByName() is tested. - - - - - - - - - - - - - - - - - - - OS_TimerGetIdByName() is invoked with timer_id set to NULL, an error is expected. - - - - - - + + + + + + OS_TimerGetIdByName() errors + + + Parameters checking in OS_TimerGetIdByName() is + tested. + + + + + + + + + + + + + + + + + + + OS_TimerGetIdByName() is invoked with timer_id + set to NULL, an error is expected. + + + + + + - - - - - OS_TimerGetIdByName() is invoked with timer name set to NULL, an error is expected. - - - - - - + + + + OS_TimerGetIdByName() is invoked with timer name + set to NULL, an error is expected. + + + + + + - - - - - OS_TimerGetIdByName() is invoked with a very long task name, an error is expected. - - - - - - + + + + OS_TimerGetIdByName() is invoked with a very long + task name, an error is expected. + + + + + + - - - - - - - OS_TimerSet() one-shot functionality - - - A timer is tested in one-shot mode. - - - - - - - + + + + + + OS_TimerSet() one-shot functionality + + + A timer is tested in one-shot mode. + + + + + + + - - - + + - - - - - - - - - Retrieving the timer by name. - - - - - - + + + + + + + + Retrieving the timer by name. + + + + + + - - - - - Setting up the timer for a 70mS one-shot tick. - - - - - - + + + + Setting up the timer for a 70mS one-shot tick. + + + + + + + - - - - - Waiting one second then counting the occurred ticks. - - - - - - + + + + Waiting one second then counting the occurred + ticks. + + + + + + - - - - - - - OS_TimerSet() periodic functionality - - - A timer is tested in periodic mode. - - - - - - - + + + + + + OS_TimerSet() periodic functionality + + + A timer is tested in periodic mode. + + + + + + + - - - + + - - - - - - - - - Retrieving the timer by name. - - - - - - + + + + + + + + Retrieving the timer by name. + + + + + + - - - - - Setting up the timer for a 70mS periodic tick. - - - - - - + + + + Setting up the timer for a 70mS periodic tick. + + + + + + + - - - - - Waiting one second then counting the occurred ticks. - - - - - - + + + + Waiting one second then counting the occurred + ticks. + + + + + + - - - - - Stopping the timer. - - - - - - + + + + Stopping the timer. + + + + + + - - - - - - - - - Internal Tests - - - Binary Semaphores Functionality - - - This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to binary semaphores. - - - - - - + + + + + + + + Internal Tests + + + Binary Semaphores Functionality + + + This sequence tests the NASA OSAL over ChibiOS/RT + functionalities related to binary semaphores. + + + + + + - - - - - OS_BinSemCreate() and OS_BinSemDelete() errors - - - Parameters checking in OS_BinSemCreate() and OS_BinSemDelete() is tested. - - - - - - - - - - - - - - - - - - - OS_BinSemCreate() is invoked with sem_id set to NULL, an error is expected. - - - - - - + + + + OS_BinSemCreate() and OS_BinSemDelete() errors + + + + Parameters checking in OS_BinSemCreate() and + OS_BinSemDelete() is tested. + + + + + + + + + + + + + + + + + + + OS_BinSemCreate() is invoked with sem_id set to + NULL, an error is expected. + + + + + + - - - - - OS_BinSemCreate() is invoked with sem_name set to NULL, an error is expected. - - - - - - + + + + OS_BinSemCreate() is invoked with sem_name set to + NULL, an error is expected. + + + + + + - - - - - OS_BinSemCreate() is invoked with an invalid sem_initial_value, an error is expected. - - - - - - + + + + OS_BinSemCreate() is invoked with an invalid + sem_initial_value, an error is expected. + + + + + + - - - - - OS_BinSemCreate() is invoked with a very long timer name, an error is expected. - - - - - - + + + + OS_BinSemCreate() is invoked with a very long + timer name, an error is expected. + + + + + + - - - - - OS_BinSemDelete() is invoked with timer_id set to -1, an error is expected. - - - - - - + + + + OS_BinSemDelete() is invoked with timer_id set to + -1, an error is expected. + + + + + + - - - - - OS_BinSemCreate() is invoked twice with duplicated name, an error is expected, then the queue is deleted using OS_BinSemDelete(). - - - - - - + + + + OS_BinSemCreate() is invoked twice with + duplicated name, an error is expected, then the queue + is deleted using OS_BinSemDelete(). + + + + + + - - - - - - - OS_BinSemFlush() errors - - - Parameters checking in OS_BinSemFlush() is tested. - - - - - - - - - - - - - - - - - - - OS_BinSemFlush() is invoked with sem_id set to -1, an error is expected. - - - - - - + + + + + + OS_BinSemFlush() errors + + + Parameters checking in OS_BinSemFlush() is tested. + + + + + + + + + + + + + + + + + + + + OS_BinSemFlush() is invoked with sem_id set to + -1, an error is expected. + + + + + + - - - - - - - OS_BinSemGive() errors - - - Parameters checking in OS_BinSemGive() is tested. - - - - - - - - - - - - - - - - - - - OS_BinSemGive() is invoked with sem_id set to -1, an error is expected. - - - - - - + + + + + + OS_BinSemGive() errors + + + Parameters checking in OS_BinSemGive() is tested. + + + + + + + + + + + + + + + + + + + + OS_BinSemGive() is invoked with sem_id set to -1, + an error is expected. + + + + + + - - - - - - - OS_BinSemTake() errors - - - Parameters checking in OS_BinSemTake() is tested. - - - - - - - - - - - - - - - - - - - OS_BinSemTake() is invoked with sem_id set to -1, an error is expected. - - - - - - + + + + + + OS_BinSemTake() errors + + + Parameters checking in OS_BinSemTake() is tested. + + + + + + + + + + + + + + + + + + + + OS_BinSemTake() is invoked with sem_id set to -1, + an error is expected. + + + + + + - - - - - - - OS_BinSemTimedWait() errors - - - Parameters checking in OS_BinSemTimedWait() is tested. - - - - - - - + + + + + + OS_BinSemTimedWait() errors + + + Parameters checking in OS_BinSemTimedWait() is + tested. + + + + + + + - - - 0) { + + + 0) { (void) OS_BinSemDelete(bsid); }]]> - - - - - - - - - OS_BinSemTimedWait() is invoked with sem_id set to -1, an error is expected. - - - - - - + + + + + + + + OS_BinSemTimedWait() is invoked with sem_id set + to -1, an error is expected. + + + + + + - - - - - OS_BinSemTimedWait() is invoked with msecs set to 0, an error is expected. - - - - - - + + + + OS_BinSemTimedWait() is invoked with msecs set to + 0, an error is expected. + + + + + + - - - - - - - OS_BinSemGetIdByName() errors - - - Parameters checking in OS_BinSemGetIdByName() is tested. - - - - - - - - - - - - - - - - - - - OS_BinSemGetIdByName() is invoked with sem_id set to NULL, an error is expected. - - - - - - + + + + + + OS_BinSemGetIdByName() errors + + + Parameters checking in OS_BinSemGetIdByName() is + tested. + + + + + + + + + + + + + + + + + + + OS_BinSemGetIdByName() is invoked with sem_id set + to NULL, an error is expected. + + + + + + - - - - - OS_BinSemGetIdByName() is invoked with semaphore name set to NULL, an error is expected. - - - - - - + + + + OS_BinSemGetIdByName() is invoked with semaphore + name set to NULL, an error is expected. + + + + + + - - - - - OS_BinSemGetIdByName() is invoked with a very long task name, an error is expected. - - - - - - + + + + OS_BinSemGetIdByName() is invoked with a very + long task name, an error is expected. + + + + + + - - - - - - - OS_BinSemTimedWait() timeout functionality - - - OS_BinSemCreate() timeout functionality is tested. - - - - - - - + + + + + + OS_BinSemTimedWait() timeout functionality + + + OS_BinSemCreate() timeout functionality is tested. + + + + + + + + - - - 0) { + + + 0) { (void) OS_BinSemDelete(bsid); }]]> - - - - - - - - - OS_BinSemTimedWait() is invoked with timeout set to one second, an error is expected. - - - - - - + + + + + + + + OS_BinSemTimedWait() is invoked with timeout set + to one second, an error is expected. + + + + + + - - - - - - - - - Internal Tests - - - Counter Semaphores Functionality - - - This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to counter semaphores. - - - - - - + + + + + + + + Internal Tests + + + Counter Semaphores Functionality + + + This sequence tests the NASA OSAL over ChibiOS/RT + functionalities related to counter semaphores. + + + + + + - - - - - OS_CountSemCreate() and OS_CountSemDelete() errors - - - Parameters checking in OS_CountSemCreate() and OS_CountSemDelete() is tested. - - - - - - - - - - - - - - - - - - - OS_CountSemCreate() is invoked with sem_id set to NULL, an error is expected. - - - - - - + + + + OS_CountSemCreate() and OS_CountSemDelete() errors + + + + Parameters checking in OS_CountSemCreate() and + OS_CountSemDelete() is tested. + + + + + + + + + + + + + + + + + + + OS_CountSemCreate() is invoked with sem_id set to + NULL, an error is expected. + + + + + + - - - - - OS_CountSemCreate() is invoked with sem_name set to NULL, an error is expected. - - - - - - + + + + OS_CountSemCreate() is invoked with sem_name set + to NULL, an error is expected. + + + + + + - - - - - OS_CountSemCreate() is invoked with an invalid sem_initial_value, an error is expected. - - - - - - + + + + OS_CountSemCreate() is invoked with an invalid + sem_initial_value, an error is expected. + + + + + + - - - - - OS_CountSemCreate() is invoked with a very long timer name, an error is expected. - - - - - - + + + + OS_CountSemCreate() is invoked with a very long + timer name, an error is expected. + + + + + + - - - - - OS_CountSemDelete() is invoked with timer_id set to -1, an error is expected. - - - - - - + + + + OS_CountSemDelete() is invoked with timer_id set + to -1, an error is expected. + + + + + + - - - - - OS_CountSemCreate() is invoked twice with duplicated name, an error is expected, then the queue is deleted using OS_CountSemDelete(). - - - - - - + + + + OS_CountSemCreate() is invoked twice with + duplicated name, an error is expected, then the queue + is deleted using OS_CountSemDelete(). + + + + + + - - - - - - - OS_CountSemGive() errors - - - Parameters checking in OS_CountSemGive() is tested. - - - - - - - - - - - - - - - - - - - OS_CountSemGive() is invoked with sem_id set to -1, an error is expected. - - - - - - + + + + + + OS_CountSemGive() errors + + + Parameters checking in OS_CountSemGive() is tested. + + + + + + + + + + + + + + + + + + + + OS_CountSemGive() is invoked with sem_id set to + -1, an error is expected. + + + + + + - - - - - - - OS_CountSemTake() errors - - - Parameters checking in OS_CountSemTake() is tested. - - - - - - - - - - - - - - - - - - - OS_CountSemTake() is invoked with sem_id set to -1, an error is expected. - - - - - - + + + + + + OS_CountSemTake() errors + + + Parameters checking in OS_CountSemTake() is tested. + + + + + + + + + + + + + + + + + + + + OS_CountSemTake() is invoked with sem_id set to + -1, an error is expected. + + + + + + - - - - - - - OS_CountSemTimedWait() errors - - - Parameters checking in OS_CountSemTimedWait() is tested. - - - - - - - + + + + + + OS_CountSemTimedWait() errors + + + Parameters checking in OS_CountSemTimedWait() is + tested. + + + + + + + - - - 0) { + + + 0) { (void) OS_CountSemDelete(csid); }]]> - - - - - - - - - OS_CountSemTimedWait() is invoked with sem_id set to -1, an error is expected. - - - - - - + + + + + + + + OS_CountSemTimedWait() is invoked with sem_id set + to -1, an error is expected. + + + + + + - - - - - OS_CountSemTimedWait() is invoked with msecs set to 0, an error is expected. - - - - - - + + + + OS_CountSemTimedWait() is invoked with msecs set + to 0, an error is expected. + + + + + + - - - - - - - OS_CountSemGetIdByName() errors - - - Parameters checking in OS_CountSemGetIdByName() is tested. - - - - - - - - - - - - - - - - - - - OS_CountSemGetIdByName() is invoked with sem_id set to NULL, an error is expected. - - - - - - + + + + + + OS_CountSemGetIdByName() errors + + + Parameters checking in OS_CountSemGetIdByName() is + tested. + + + + + + + + + + + + + + + + + + + OS_CountSemGetIdByName() is invoked with sem_id + set to NULL, an error is expected. + + + + + + - - - - - OS_CountSemGetIdByName() is invoked with semaphore name set to NULL, an error is expected. - - - - - - + + + + OS_CountSemGetIdByName() is invoked with + semaphore name set to NULL, an error is expected. + + + + + + + - - - - - OS_CountSemGetIdByName() is invoked with a very long task name, an error is expected. - - - - - - + + + + OS_CountSemGetIdByName() is invoked with a very + long task name, an error is expected. + + + + + + - - - - - - - OS_CountSemTimedWait() timeout functionality - - - OS_CountSemCreate() timeout functionality is tested. - - - - - - - + + + + + + OS_CountSemTimedWait() timeout functionality + + + OS_CountSemCreate() timeout functionality is tested. + + + + + + + + - - - 0) { + + + 0) { (void) OS_CountSemDelete(csid); }]]> - - - - - - - - - OS_CountSemTimedWait() is invoked with timeout set to one second, an error is expected. - - - - - - + + + + + + + + OS_CountSemTimedWait() is invoked with timeout + set to one second, an error is expected. + + + + + + - - - - - - - - - Internal Tests - - - Mutex Semaphores Functionality - - - This sequence tests the NASA OSAL over ChibiOS/RT functionalities related to mutex semaphores. - - - - - - + + + + + + + + Internal Tests + + + Mutex Semaphores Functionality + + + This sequence tests the NASA OSAL over ChibiOS/RT + functionalities related to mutex semaphores. + + + + + + - - - - - OS_MutSemCreate() and OS_MutSemDelete() errors - - - Parameters checking in OS_MutSemCreate() and OS_MutSemDelete() is tested. - - - - - - - - - - - - - - - - - - - OS_MutSemCreate() is invoked with sem_id set to NULL, an error is expected. - - - - - - + + + + OS_MutSemCreate() and OS_MutSemDelete() errors + + + + Parameters checking in OS_MutSemCreate() and + OS_MutSemDelete() is tested. + + + + + + + + + + + + + + + + + + + OS_MutSemCreate() is invoked with sem_id set to + NULL, an error is expected. + + + + + + - - - - - OS_MutSemCreate() is invoked with sem_name set to NULL, an error is expected. - - - - - - + + + + OS_MutSemCreate() is invoked with sem_name set to + NULL, an error is expected. + + + + + + - - - - - OS_MutSemCreate() is invoked with a very long timer name, an error is expected. - - - - - - + + + + OS_MutSemCreate() is invoked with a very long + timer name, an error is expected. + + + + + + - - - - - OS_MutSemDelete() is invoked with timer_id set to -1, an error is expected. - - - - - - + + + + OS_MutSemDelete() is invoked with timer_id set to + -1, an error is expected. + + + + + + - - - - - OS_MutSemCreate() is invoked twice with duplicated name, an error is expected, then the queue is deleted using OS_MutSemDelete(). - - - - - - + + + + OS_MutSemCreate() is invoked twice with + duplicated name, an error is expected, then the queue + is deleted using OS_MutSemDelete(). + + + + + + - - - - - - - OS_MutSemGive() errors - - - Parameters checking in OS_MutSemGive() is tested. - - - - - - - - - - - - - - - - - - - OS_MutSemGive() is invoked with sem_id set to -1, an error is expected. - - - - - - + + + + + + OS_MutSemGive() errors + + + Parameters checking in OS_MutSemGive() is tested. + + + + + + + + + + + + + + + + + + + + OS_MutSemGive() is invoked with sem_id set to -1, + an error is expected. + + + + + + - - - - - - - OS_MutSemTake() errors - - - Parameters checking in OS_MutSemTake() is tested. - - - - - - - - - - - - - - - - - - - OS_MutSemTake() is invoked with sem_id set to -1, an error is expected. - - - - - - + + + + + + OS_MutSemTake() errors + + + Parameters checking in OS_MutSemTake() is tested. + + + + + + + + + + + + + + + + + + + + OS_MutSemTake() is invoked with sem_id set to -1, + an error is expected. + + + + + + - - - - - - - OS_MutSemGetIdByName() errors - - - Parameters checking in OS_MutSemGetIdByName() is tested. - - - - - - - - - - - - - - - - - - - OS_MutSemGetIdByName() is invoked with sem_id set to NULL, an error is expected. - - - - - - + + + + + + OS_MutSemGetIdByName() errors + + + Parameters checking in OS_MutSemGetIdByName() is + tested. + + + + + + + + + + + + + + + + + + + OS_MutSemGetIdByName() is invoked with sem_id set + to NULL, an error is expected. + + + + + + - - - - - OS_MutSemGetIdByName() is invoked with semaphore name set to NULL, an error is expected. - - - - - - + + + + OS_MutSemGetIdByName() is invoked with semaphore + name set to NULL, an error is expected. + + + + + + - - - - - OS_MutSemGetIdByName() is invoked with a very long task name, an error is expected. - - - - - - + + + + OS_MutSemGetIdByName() is invoked with a very + long task name, an error is expected. + + + + + + - - - - - - - - - - - - + + + + + + + + diff --git a/test/nasa_osal/source/test/nasa_osal_test_sequence_001.c b/test/nasa_osal/source/test/nasa_osal_test_sequence_001.c index b26f9911c..f16dc37bb 100644 --- a/test/nasa_osal/source/test/nasa_osal_test_sequence_001.c +++ b/test/nasa_osal/source/test/nasa_osal_test_sequence_001.c @@ -110,6 +110,7 @@ static void nasa_osal_test_001_001_execute(void) { test_assert(err == OS_INVALID_POINTER, "NULL not detected"); test_assert_sequence("", "task executed"); } + test_end_step(1); /* [1.1.2] OS_TaskCreate() is invoked with task_name set to NULL, an 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_sequence("", "task executed"); } + test_end_step(2); /* [1.1.3] OS_TaskCreate() is invoked with stack_pointer set to NULL, 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_sequence("", "task executed"); } + test_end_step(3); /* [1.1.4] OS_TaskCreate() is invoked with a very long task name, an 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_sequence("", "task executed"); } + test_end_step(4); /* [1.1.5] OS_TaskCreate() is invoked with priority below and above 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_sequence("", "task executed"); } + test_end_step(5); /* [1.1.6] OS_TaskCreate() is invoked with a stack size below 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_sequence("", "task executed"); } + test_end_step(6); /* [1.1.7] OS_TaskCreate() is invoked twice with duplicated name and 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_sequence("A", "task not executed"); } + test_end_step(7); } static const testcase_t nasa_osal_test_001_001 = { @@ -337,6 +344,7 @@ static void nasa_osal_test_001_002_execute(void) { 0); test_assert(err == OS_SUCCESS, "task 1 creation failed"); } + test_end_step(1); /* [1.2.2] Tasks are made runnable atomically and their execution order tested.*/ @@ -345,6 +353,7 @@ static void nasa_osal_test_001_002_execute(void) { OS_TaskDelay(5); test_assert_sequence("ABCD", "task order violation"); } + test_end_step(2); /* [1.2.3] Four tasks are created in priority order from high to low.*/ @@ -389,6 +398,7 @@ static void nasa_osal_test_001_002_execute(void) { 0); test_assert(err == OS_SUCCESS, "task 4 creation failed"); } + test_end_step(3); /* [1.2.4] Tasks are made runnable atomically and their execution order tested.*/ @@ -397,6 +407,7 @@ static void nasa_osal_test_001_002_execute(void) { OS_TaskDelay(5); test_assert_sequence("ABCD", "task order violation"); } + test_end_step(4); /* [1.2.5] Four tasks are created in an not ordered way.*/ test_set_step(5); @@ -440,6 +451,7 @@ static void nasa_osal_test_001_002_execute(void) { 0); test_assert(err == OS_SUCCESS, "task 3 creation failed"); } + test_end_step(5); /* [1.2.6] Tasks are made runnable atomically and their execution order tested.*/ @@ -448,6 +460,7 @@ static void nasa_osal_test_001_002_execute(void) { OS_TaskDelay(5); test_assert_sequence("ABCD", "task order violation"); } + test_end_step(6); } 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); 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 = { @@ -520,6 +534,7 @@ static void nasa_osal_test_001_004_execute(void) { 0); 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 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_sequence("ABC", "events order violation"); } + test_end_step(2); } static const testcase_t nasa_osal_test_001_004 = { diff --git a/test/nasa_osal/source/test/nasa_osal_test_sequence_002.c b/test/nasa_osal/source/test/nasa_osal_test_sequence_002.c index 392e70211..a06243b5b 100644 --- a/test/nasa_osal/source/test/nasa_osal_test_sequence_002.c +++ b/test/nasa_osal/source/test/nasa_osal_test_sequence_002.c @@ -89,6 +89,7 @@ static void nasa_osal_test_002_001_execute(void) { 0); 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 error is expected.*/ @@ -104,6 +105,7 @@ static void nasa_osal_test_002_001_execute(void) { 0); 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 error is expected.*/ @@ -119,6 +121,7 @@ static void nasa_osal_test_002_001_execute(void) { 0); 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 error is expected.*/ @@ -129,6 +132,7 @@ static void nasa_osal_test_002_001_execute(void) { err = OS_QueueDelete((uint32)-1); 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 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); test_assert(err == OS_SUCCESS, "queue deletion failed"); } + test_end_step(5); } 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"); 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 NULL, an error is expected.*/ @@ -193,6 +199,7 @@ static void nasa_osal_test_002_002_execute(void) { err = OS_QueueGetIdByName(&qid, NULL); 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 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"); 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 = { @@ -254,6 +262,7 @@ static void nasa_osal_test_002_003_execute(void) { err = OS_QueueCreate(&qid, "test queue", 4, MESSAGE_SIZE, 0); test_assert(err == OS_SUCCESS, "queue creation failed"); } + test_end_step(1); /* [2.3.2] Creating the writer task.*/ test_set_step(2); @@ -269,6 +278,7 @@ static void nasa_osal_test_002_003_execute(void) { 0); test_assert(err == OS_SUCCESS, "writer task creation failed"); } + test_end_step(2); /* [2.3.3] Reading messages from the writer task.*/ test_set_step(3); @@ -284,6 +294,7 @@ static void nasa_osal_test_002_003_execute(void) { "wrong message"); } } + test_end_step(3); /* [2.3.4] Waiting for task termination then checking for errors.*/ test_set_step(4); @@ -292,6 +303,7 @@ static void nasa_osal_test_002_003_execute(void) { tid = 0; test_assert_sequence("", "queue write errors occurred"); } + test_end_step(4); } 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"); 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 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)); 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 expected.*/ @@ -359,6 +373,7 @@ static void nasa_osal_test_002_004_execute(void) { err = OS_QueueGet(qid, data, MESSAGE_SIZE, &copied, OS_CHECK); test_assert(err == OS_QUEUE_EMPTY, "unexpected error code"); } + test_end_step(3); } static const testcase_t nasa_osal_test_002_004 = { diff --git a/test/nasa_osal/source/test/nasa_osal_test_sequence_003.c b/test/nasa_osal/source/test/nasa_osal_test_sequence_003.c index 699ad0f60..698547c9d 100644 --- a/test/nasa_osal/source/test/nasa_osal_test_sequence_003.c +++ b/test/nasa_osal/source/test/nasa_osal_test_sequence_003.c @@ -87,6 +87,7 @@ static void nasa_osal_test_003_001_execute(void) { tmr_callback); 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, an error is expected.*/ @@ -102,6 +103,7 @@ static void nasa_osal_test_003_001_execute(void) { tmr_callback); 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 error is expected.*/ @@ -116,6 +118,7 @@ static void nasa_osal_test_003_001_execute(void) { tmr_callback); 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, an error is expected.*/ @@ -131,6 +134,7 @@ static void nasa_osal_test_003_001_execute(void) { NULL); /* Error.*/ 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, an error is expected.*/ @@ -146,6 +150,7 @@ static void nasa_osal_test_003_001_execute(void) { tmr_callback); 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 error is expected.*/ @@ -156,6 +161,7 @@ static void nasa_osal_test_003_001_execute(void) { err = OS_TimerDelete((uint32)-1); 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 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); test_assert(err == OS_SUCCESS, "timer deletion failed"); } + test_end_step(7); } 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); 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 = { @@ -243,6 +251,7 @@ static void nasa_osal_test_003_003_execute(void) { err = OS_TimerGetIdByName(NULL, "timer"); 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 NULL, an error is expected.*/ @@ -253,6 +262,7 @@ static void nasa_osal_test_003_003_execute(void) { err = OS_TimerGetIdByName(&tmid, NULL); 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 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"); 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 = { @@ -310,6 +321,7 @@ static void nasa_osal_test_003_004_execute(void) { err = OS_TimerGetIdByName(&local_tmid, "test timer"); 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.*/ test_set_step(2); @@ -319,6 +331,7 @@ static void nasa_osal_test_003_004_execute(void) { err = OS_TimerSet(local_tmid, 70000, 0); test_assert(err == OS_SUCCESS, "timer setup failed"); } + test_end_step(2); /* [3.4.3] Waiting one second then counting the occurred ticks.*/ test_set_step(3); @@ -326,6 +339,7 @@ static void nasa_osal_test_003_004_execute(void) { (void) OS_TaskDelay(1000); test_assert(cnt == 1, "wrong ticks"); } + test_end_step(3); } 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"); test_assert(err == OS_SUCCESS, "timer not found"); } + test_end_step(1); /* [3.5.2] Setting up the timer for a 70mS periodic tick.*/ test_set_step(2); @@ -384,6 +399,7 @@ static void nasa_osal_test_003_005_execute(void) { err = OS_TimerSet(local_tmid, 70000, 70000); test_assert(err == OS_SUCCESS, "timer setup failed"); } + test_end_step(2); /* [3.5.3] Waiting one second then counting the occurred ticks.*/ test_set_step(3); @@ -391,6 +407,7 @@ static void nasa_osal_test_003_005_execute(void) { (void) OS_TaskDelay(1000); test_assert(cnt == 14, "wrong ticks"); } + test_end_step(3); /* [3.5.4] Stopping the timer.*/ test_set_step(4); @@ -400,6 +417,7 @@ static void nasa_osal_test_003_005_execute(void) { err = OS_TimerSet(local_tmid, 0, 0); test_assert(err == OS_SUCCESS, "timer stop failed"); } + test_end_step(4); } static const testcase_t nasa_osal_test_003_005 = { diff --git a/test/nasa_osal/source/test/nasa_osal_test_sequence_004.c b/test/nasa_osal/source/test/nasa_osal_test_sequence_004.c index e9f346d06..533c5823a 100644 --- a/test/nasa_osal/source/test/nasa_osal_test_sequence_004.c +++ b/test/nasa_osal/source/test/nasa_osal_test_sequence_004.c @@ -76,6 +76,7 @@ static void nasa_osal_test_004_001_execute(void) { 0); 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 error is expected.*/ @@ -89,6 +90,7 @@ static void nasa_osal_test_004_001_execute(void) { 0); test_assert(err == OS_INVALID_POINTER, "NULL not detected"); } + test_end_step(2); /* [4.1.3] OS_BinSemCreate() is invoked with an invalid sem_initial_value, an error is expected.*/ @@ -102,6 +104,7 @@ static void nasa_osal_test_004_001_execute(void) { 0); 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, 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"); #endif } + test_end_step(4); /* [4.1.5] OS_BinSemDelete() is invoked with timer_id set to -1, an error is expected.*/ @@ -127,6 +131,7 @@ static void nasa_osal_test_004_001_execute(void) { err = OS_BinSemDelete((uint32)-1); 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, 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); test_assert(err == OS_SUCCESS, "semaphore deletion failed"); } + test_end_step(6); } 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); 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 = { @@ -211,6 +218,7 @@ static void nasa_osal_test_004_003_execute(void) { err = OS_BinSemGive((uint32)-1); 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 = { @@ -243,6 +251,7 @@ static void nasa_osal_test_004_004_execute(void) { err = OS_BinSemTake((uint32)-1); 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 = { @@ -288,6 +297,7 @@ static void nasa_osal_test_004_005_execute(void) { err = OS_BinSemTimedWait((uint32)-1, 1000); 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 error is expected.*/ @@ -298,6 +308,7 @@ static void nasa_osal_test_004_005_execute(void) { err = OS_BinSemTimedWait(bsid, 0); test_assert(err == OS_INVALID_INT_NUM, "invalid msec not detected"); } + test_end_step(2); } 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"); test_assert(err == OS_INVALID_POINTER, "NULL not detected"); } + test_end_step(1); /* [4.6.2] OS_BinSemGetIdByName() is invoked with semaphore name set to NULL, an error is expected.*/ @@ -344,6 +356,7 @@ static void nasa_osal_test_004_006_execute(void) { err = OS_BinSemGetIdByName(&bsid, NULL); 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 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"); 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 = { @@ -397,6 +411,7 @@ static void nasa_osal_test_004_007_execute(void) { err = OS_BinSemTimedWait(bsid, 1000); test_assert(err == OS_SEM_TIMEOUT, "unexpected error code"); } + test_end_step(1); } static const testcase_t nasa_osal_test_004_007 = { diff --git a/test/nasa_osal/source/test/nasa_osal_test_sequence_005.c b/test/nasa_osal/source/test/nasa_osal_test_sequence_005.c index ad0aecd18..073c53174 100644 --- a/test/nasa_osal/source/test/nasa_osal_test_sequence_005.c +++ b/test/nasa_osal/source/test/nasa_osal_test_sequence_005.c @@ -75,6 +75,7 @@ static void nasa_osal_test_005_001_execute(void) { 0); 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, an error is expected.*/ @@ -88,6 +89,7 @@ static void nasa_osal_test_005_001_execute(void) { 0); test_assert(err == OS_INVALID_POINTER, "NULL not detected"); } + test_end_step(2); /* [5.1.3] OS_CountSemCreate() is invoked with an invalid sem_initial_value, an error is expected.*/ @@ -101,6 +103,7 @@ static void nasa_osal_test_005_001_execute(void) { 0); 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 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"); #endif } + test_end_step(4); /* [5.1.5] OS_CountSemDelete() is invoked with timer_id set to -1, an error is expected.*/ @@ -126,6 +130,7 @@ static void nasa_osal_test_005_001_execute(void) { err = OS_CountSemDelete((uint32)-1); 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, 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); test_assert(err == OS_SUCCESS, "semaphore deletion failed"); } + test_end_step(6); } 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); 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 = { @@ -210,6 +217,7 @@ static void nasa_osal_test_005_003_execute(void) { err = OS_CountSemTake((uint32)-1); 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 = { @@ -255,6 +263,7 @@ static void nasa_osal_test_005_004_execute(void) { err = OS_CountSemTimedWait((uint32)-1, 1000); 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 error is expected.*/ @@ -265,6 +274,7 @@ static void nasa_osal_test_005_004_execute(void) { err = OS_CountSemTimedWait(csid, 0); test_assert(err == OS_INVALID_INT_NUM, "invalid msec not detected"); } + test_end_step(2); } 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"); test_assert(err == OS_INVALID_POINTER, "NULL not detected"); } + test_end_step(1); /* [5.5.2] OS_CountSemGetIdByName() is invoked with semaphore name 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); 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 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"); 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 = { @@ -364,6 +377,7 @@ static void nasa_osal_test_005_006_execute(void) { err = OS_CountSemTimedWait(csid, 1000); test_assert(err == OS_SEM_TIMEOUT, "unexpected error code"); } + test_end_step(1); } static const testcase_t nasa_osal_test_005_006 = { diff --git a/test/nasa_osal/source/test/nasa_osal_test_sequence_006.c b/test/nasa_osal/source/test/nasa_osal_test_sequence_006.c index dd6f017cb..709f1cddf 100644 --- a/test/nasa_osal/source/test/nasa_osal_test_sequence_006.c +++ b/test/nasa_osal/source/test/nasa_osal_test_sequence_006.c @@ -70,6 +70,7 @@ static void nasa_osal_test_006_001_execute(void) { 0); 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 error is expected.*/ @@ -82,6 +83,7 @@ static void nasa_osal_test_006_001_execute(void) { 0); 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, 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"); #endif } + test_end_step(3); /* [6.1.4] OS_MutSemDelete() is invoked with timer_id set to -1, an error is expected.*/ @@ -106,6 +109,7 @@ static void nasa_osal_test_006_001_execute(void) { err = OS_MutSemDelete((uint32)-1); 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, 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); test_assert(err == OS_SUCCESS, "semaphore deletion failed"); } + test_end_step(5); } 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); 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 = { @@ -190,6 +196,7 @@ static void nasa_osal_test_006_003_execute(void) { err = OS_MutSemTake((uint32)-1); 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 = { @@ -226,6 +233,7 @@ static void nasa_osal_test_006_004_execute(void) { err = OS_MutSemGetIdByName(NULL, "semaphore"); test_assert(err == OS_INVALID_POINTER, "NULL not detected"); } + test_end_step(1); /* [6.4.2] OS_MutSemGetIdByName() is invoked with semaphore name set to NULL, an error is expected.*/ @@ -236,6 +244,7 @@ static void nasa_osal_test_006_004_execute(void) { err = OS_MutSemGetIdByName(&msid, NULL); 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 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"); 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 = { diff --git a/test/nil/configuration.xml b/test/nil/configuration.xml index 29319ddde..69d3c58a6 100644 --- a/test/nil/configuration.xml +++ b/test/nil/configuration.xml @@ -1,19 +1,12 @@ - - - - Test Specification for ChibiOS/NIL. - - - - - - - - - ChibiOS/NIL Test Suite. - - - + + + ChibiOS/NIL Test Suite. + + + - - - 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. - - - - - nil_ - - - + + 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. + + + + + nil_ + + + - - - + + - - - - - - Internal Tests - - - Information. - - - This sequence reports configuration and version information about the NIL kernel. - - + + + + + + Internal Tests + + + Information. + + + This sequence reports configuration and version + information about the NIL kernel. + + + + + + + + + + + Port Info. + + + Port-related info are reported. + + + + + + - - - - - - - - Port Info. - - - Port-related info are reported. - - - - - - - - - - - - - - - - - - - Prints the version string. - - - - - - + + + + + + + + + + + Prints the version string. + + + + + + - - - - - - - Kernel Info. - - - The version numbers are reported. - - - - - - - - - - - - - - - - - - - Prints the version string. - - - - - - + + + + + + Kernel Info. + + + The version numbers are reported. + + + + + + + + + + + + + + + + + + + Prints the version string. + + + + + + - - - - - - - Kernel Settings. - - - The static kernel settings are reported. - - - - - - - - - - - - - - - - - - - Prints the configuration options settings. - - - - - - + + + + + + Kernel Settings. + + + The static kernel settings are reported. + + + + + + + + + + + + + + + + + + + Prints the configuration options settings. + + + + + + + - - - - - - - - - Internal Tests - - - Time and Intervals Functionality. - - - This sequence tests the ChibiOS/NIL functionalities related to time and intervals management. - - + + + + + + + + + Internal Tests + + + Time and Intervals Functionality. + + + This sequence tests the ChibiOS/NIL functionalities + related to time and intervals management. + + + + + + + + + + + System Tick Counter functionality. + + + The functionality of the API @p chVTGetSystemTimeX() + is tested. + + + + + + - - - - - - - - System Tick Counter functionality. - - - The functionality of the API @p chVTGetSystemTimeX() is tested. - - - - - - - - - - - - - - - - - - - A System Tick Counter increment is expected, the test simply hangs if it does not happen. - - - - - - + + + + + + + + + + + A System Tick Counter increment is expected, the + test simply hangs if it does not happen. + + + + + + - - - - - - - Time ranges functionality. - - - The functionality of the API @p chTimeIsInRangeX() is tested. - - - - - - - - - - - - - - - - - - - Checking case where start == end, it must always evaluate as not in range. - - - - - - + + + + + + Time ranges functionality. + + + The functionality of the API @p chTimeIsInRangeX() is + tested. + + + + + + + + + + + + + + + + + + + Checking case where start == end, it must always + evaluate as not in range. + + + + + + - - - - - Checking boundaries for start < end. - - - - - - + + + + Checking boundaries for start < end. + + + + + + - - - - - Checking boundaries for start > end. - - - - - - + + + + Checking boundaries for start > end. + + + + + + - - - - - - - - - Internal Tests - - - Threads Functionality. - - - This sequence tests the ChibiOS/NIL functionalities related to threading. - - + + + + + + + + + Internal Tests + + + Threads Functionality. + + + This sequence tests the ChibiOS/NIL functionalities + related to threading. + + + + + + + + + + + Thread Sleep functionality. + + + The functionality of @p chThdSleep() and derivatives + is tested. + + + + + + - - - - - - - - Thread Sleep functionality. - - - The functionality of @p chThdSleep() and derivatives is tested. - - - - - - - - - - - - - - - - - - - The current system time is read then a sleep is performed for 100 system ticks and on exit the system time is verified again. - - - - - - + + + + + + + + + + + The current system time is read then a sleep is + performed for 100 system ticks and on exit the system + time is verified again. + + + + + + - - - - - The current system time is read then a sleep is performed for 100000 microseconds and on exit the system time is verified again. - - - - - - + + + + The current system time is read then a sleep is + performed for 100000 microseconds and on exit the + system time is verified again. + + + + + + - - - - - The current system time is read then a sleep is performed for 100 milliseconds and on exit the system time is verified again. - - - - - - + + + + The current system time is read then a sleep is + performed for 100 milliseconds and on exit the system + time is verified again. + + + + + + - - - - - The current system time is read then a sleep is performed for 1 second and on exit the system time is verified again. - - - - - - + + + + The current system time is read then a sleep is + performed for 1 second and on exit the system time is + verified again. + + + + + + - - - - - Function chThdSleepUntil() is tested with a timeline of "now" + 100 ticks. - - - - - - + + + + Function chThdSleepUntil() is tested with a + timeline of "now" + 100 ticks. + + + + + + - - - - - - - - - Internal Tests - - - Semaphores. - - - This sequence tests the ChibiOS/NIL functionalities related to counter semaphores. - - - CH_CFG_USE_SEMAPHORES - - - + + + + + + + + Internal Tests + + + Semaphores. + + + This sequence tests the ChibiOS/NIL functionalities + related to counter semaphores. + + + + + + - - - - - Semaphore primitives, no state change. - - - Wait, Signal and Reset primitives are tested. The testing thread does not trigger a state change. - - - - - - - - - - - - - - - - - - - The function chSemWait() is invoked, after return the counter and the returned message are tested. - - - - - - + + + + Semaphore primitives, no state change. + + + Wait, Signal and Reset primitives are tested. The + testing thread does not trigger a state change. + + + + + + + + + + + + + + + + + + + The function chSemWait() is invoked, after return + the counter and the returned message are tested. + + + + + + + - - - - - The function chSemSignal() is invoked, after return the counter is tested. - - - - - - + + + + The function chSemSignal() is invoked, after + return the counter is tested. + + + + + + - - - - - The function chSemReset() is invoked, after return the counter is tested. - - - - - - + + + + The function chSemReset() is invoked, after + return the counter is tested. + + + + + + - - - - - - - Semaphore primitives, with state change. - - - Wait, Signal and Reset primitives are tested. The testing thread triggers a state change. - - - - - - - + + + + + + Semaphore primitives, with state change. + + + Wait, Signal and Reset primitives are tested. The + testing thread triggers a state change. + + + + + + + - - - + + - - - - - - - - - The function chSemWait() is invoked, after return the counter and the returned message are tested. The semaphore is signaled by another thread. - - - - - - + + + + + + + + The function chSemWait() is invoked, after return + the counter and the returned message are tested. The + semaphore is signaled by another thread. + + + + + + - - - - - The function chSemWait() is invoked, after return the counter and the returned message are tested. The semaphore is reset by another thread. - - - - - - + + + + The function chSemWait() is invoked, after return + the counter and the returned message are tested. The + semaphore is reset by another thread. + + + + + + - - - - - - - Semaphores timeout. - - - Timeout on semaphores is tested. - - - - - - - - - - - - - + + + + + + Semaphores timeout. + + + Timeout on semaphores is tested. + + + + + + + + + + + + + - - - - - - The function chSemWaitTimeout() is invoked a first time, after return the system time, the counter and the returned message are tested. - - - - - - + + + + + The function chSemWaitTimeout() is invoked a + first time, after return the system time, the counter + and the returned message are tested. + + + + + + - - - - - The function chSemWaitTimeout() is invoked again, after return the system time, the counter and the returned message are tested. - - - - - - + + + + The function chSemWaitTimeout() is invoked again, + after return the system time, the counter and the + returned message are tested. + + + + + + - - - - - - - - - Internal Tests - - - Suspend/Resume. - - - This sequence tests the ChibiOS/NIL functionalities related to threads suspend/resume. - - - - - - + + + + + + + + Internal Tests + + + Suspend/Resume. + + + This sequence tests the ChibiOS/NIL functionalities + related to threads suspend/resume. + + + + + + - - - - - Suspend and Resume functionality. - - - The functionality of chThdSuspendTimeoutS() and chThdResumeI() is tested. - - - - - - - + + + + Suspend and Resume functionality. + + + The functionality of chThdSuspendTimeoutS() and + chThdResumeI() is tested. + + + + + + + - - - + + - - - + + - - - - - - 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. - - - - - - + + + + + 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. + + + + + + - - - - - The function chThdSuspendTimeoutS() is invoked, the thread is not resumed so a timeout must occur. On return the message and the state of the reference are tested. - - - - - - + + + + The function chThdSuspendTimeoutS() is invoked, + the thread is not resumed so a timeout must occur. On + return the message and the state of the reference are + tested. + + + + + + - - - - - - - - - Internal Tests - - - Event Sources and Event Flags. - - - This module implements the test sequence for the Events subsystem. - - - CH_CFG_USE_EVENTS - - - + + + + + + + + Internal Tests + + + Event Sources and Event Flags. + + + This module implements the test sequence for the Events + subsystem. + + + + + + - - - - - Events registration. - - - Two event listeners are registered on an event source and then unregistered in the same order.<br> -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. - - - - - - - - - - - - - - - - - - - An Event Source is initialized. - - - - - - - - - - - Two Event Listeners are registered on the Event Source, the Event Source is tested to have listeners. - - - - - - + + + + Events registration. + + + Two event listeners are registered on an event source + and then unregistered in the same order.<br> + 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. + + + + + + + + + + + + + + + + + + + + An Event Source is initialized. + + + + + + + + + + + Two Event Listeners are registered on the Event + Source, the Event Source is tested to have listeners. + + + + + + + - - - - - An Event Listener is unregistered, the Event Source must still have listeners. - - - - - - + + + + An Event Listener is unregistered, the Event + Source must still have listeners. + + + + + + - - - - - An Event Listener is unregistered, the Event Source must not have listeners. - - - - - - + + + + An Event Listener is unregistered, the Event + Source must not have listeners. + + + + + + - - - - - - - Event Flags dispatching. - - - The test dispatches three event flags and verifies that the associated event handlers are invoked in LSb-first order. - - - - - - - - - - - - - - - - - - - Three evenf flag bits are raised then chEvtDispatch() is invoked, the sequence of handlers calls is tested. - - - - - - + + + + + + Event Flags dispatching. + + + The test dispatches three event flags and verifies + that the associated event handlers are invoked in + LSb-first order. + + + + + + + + + + + + + + + + + + + Three evenf flag bits are raised then + chEvtDispatch() is invoked, the sequence of handlers + calls is tested. + + + + + + - - - - - - - Events Flags wait using chEvtWaitOne(). - - - Functionality of chEvtWaitOne() is tested under various scenarios. - - - - - - - - - - - - - + + + + + + Events Flags wait using chEvtWaitOne(). + + + Functionality of chEvtWaitOne() is tested under + various scenarios. + + + + + + + + + + + + + - - - - - - Setting three event flags. - - - - - - - - - - - Calling chEvtWaitOne() three times, each time a single flag must be returned in order of priority. - - - - - - + + + + + Setting three event flags. + + + + + + + + + + + Calling chEvtWaitOne() three times, each time a + single flag must be returned in order of priority. + + + + + + + - - - - - Getting current time and starting a signaler thread, the thread will set an event flag after 50mS. - - - - - - + + + + Getting current time and starting a signaler + thread, the thread will set an event flag after 50mS. + + + + + + + - - - - - Calling chEvtWaitOne() then verifying that the event has been received after 50mS and that the event flags mask has been emptied. - - - - - - + + + + Calling chEvtWaitOne() then verifying that the + event has been received after 50mS and that the event + flags mask has been emptied. + + + + + + - - - - - - - Events Flags wait using chEvtWaitAny(). - - - Functionality of chEvtWaitAny() is tested under various scenarios. - - - - - - - - - - - - - + + + + + + Events Flags wait using chEvtWaitAny(). + + + Functionality of chEvtWaitAny() is tested under + various scenarios. + + + + + + + + + + + + + - - - - - - Setting two, non contiguous, event flags. - - - - - - - - - - - Calling chEvtWaitAny() one time, the two flags must be returned. - - - - - - + + + + + Setting two, non contiguous, event flags. + + + + + + + + + + + Calling chEvtWaitAny() one time, the two flags + must be returned. + + + + + + - - - - - Getting current time and starting a signaler thread, the thread will set an event flag after 50mS. - - - - - - + + + + Getting current time and starting a signaler + thread, the thread will set an event flag after 50mS. + + + + + + + - - - - - Calling chEvtWaitAny() then verifying that the event has been received after 50mS and that the event flags mask has been emptied. - - - - - - + + + + Calling chEvtWaitAny() then verifying that the + event has been received after 50mS and that the event + flags mask has been emptied. + + + + + + - - - - - - - Events Flags wait using chEvtWaitAll(). - - - Functionality of chEvtWaitAll() is tested under various scenarios. - - - - - - - - - - - - - + + + + + + Events Flags wait using chEvtWaitAll(). + + + Functionality of chEvtWaitAll() is tested under + various scenarios. + + + + + + + + + + + + + - - - - - - Setting two, non contiguous, event flags. - - - - - - - - - - - Calling chEvtWaitAll() one time, the two flags must be returned. - - - - - - + + + + + Setting two, non contiguous, event flags. + + + + + + + + + + + Calling chEvtWaitAll() one time, the two flags + must be returned. + + + + + + - - - - - Setting one event flag. - - - - - - - - - - - Getting current time and starting a signaler thread, the thread will set another event flag after 50mS. - - - - - - + + + + Setting one event flag. + + + + + + + + + + + Getting current time and starting a signaler + thread, the thread will set another event flag after + 50mS. + + + + + + - - - - - Calling chEvtWaitAll() then verifying that both event flags have been received after 50mS and that the event flags mask has been emptied. - - - - - - + + + + Calling chEvtWaitAll() then verifying that both + event flags have been received after 50mS and that the + event flags mask has been emptied. + + + + + + - - - - - - - Events Flags wait timeouts. - - - Timeout functionality is tested for chEvtWaitOneTimeout(), chEvtWaitAnyTimeout() and chEvtWaitAllTimeout(). - - - - - - - - - - - F - - - - - - - - The functions are invoked first with TIME_IMMEDIATE timeout, the timeout condition is tested. - - - - - - + + + + + + Events Flags wait timeouts. + + + Timeout functionality is tested for + chEvtWaitOneTimeout(), chEvtWaitAnyTimeout() and + chEvtWaitAllTimeout(). + + + + + + + + + + + + F + + + + + + + + The functions are invoked first with + TIME_IMMEDIATE timeout, the timeout condition is + tested. + + + + + + - - - - - The functions are invoked first with a 50mS timeout, the timeout condition is tested. - - - - - - + + + + The functions are invoked first with a 50mS + timeout, the timeout condition is tested. + + + + + + - - - - - - - Broadcasting using chEvtBroadcast(). - - - Functionality of chEvtBroadcast() is tested. - - - - - - - + + + + + + Broadcasting using chEvtBroadcast(). + + + Functionality of chEvtBroadcast() is tested. + + + + + + + - - - - - - + + + + + - - - - - - Registering on two event sources associating them with flags 1 and 4. - - - - - - + + + + + Registering on two event sources associating them + with flags 1 and 4. + + + + + + - - - - - Getting current time and starting a broadcaster thread, the thread broadcast the first Event Source immediately and the other after 50mS. - - - - - - + + + + Getting current time and starting a broadcaster + thread, the thread broadcast the first Event Source + immediately and the other after 50mS. + + + + + + - - - - - Calling chEvtWaitAll() then verifying that both event flags have been received after 50mS and that the event flags mask has been emptied. - - - - - - + + + + Calling chEvtWaitAll() then verifying that both + event flags have been received after 50mS and that the + event flags mask has been emptied. + + + + + + - - - - - Unregistering from the Event Sources. - - - - - - + + + + Unregistering from the Event Sources. + + + + + + - - - - - - - - - Internal Tests - - - Synchronous Messages. - - - This module implements the test sequence for the Synchronous Messages subsystem. - - - CH_CFG_USE_MESSAGES - - - + + + + + + + + Internal Tests + + + Synchronous Messages. + + + This module implements the test sequence for the + Synchronous Messages subsystem. + + + + + + - - - - - Messages Server loop. - - - A messenger thread is spawned that sends four messages back to the tester thread.<br> -The test expect to receive the messages in the correct sequence and to not find a fifth message waiting. - - - - - - - - - - - - - + + + + Messages Server loop. + + + A messenger thread is spawned that sends four + messages back to the tester thread.<br> + The test expect to receive the messages in the correct sequence and + to not find a fifth message waiting. + + + + + + + + + + + + + + - - - - - - Starting the messenger thread. - - - - - - + + + + + Starting the messenger thread. + + + + + + - - - - - Waiting for four messages then testing the receive order. - - - - - - + + + + Waiting for four messages then testing the + receive order. + + + + + + - - - - - - - - - Benchmarks - - - Benchmarks. - - - 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.<br> -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. - - - - - - + + + + + + + + Benchmarks + + + Benchmarks. + + + 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.<br> + 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. + + + + + + + - - - - - Messages performance #1. - - - 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. - - - CH_CFG_USE_MESSAGES - - - - - - - - - - + + + + Messages performance #1. + + + 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. + + + + + + + + + + + + + - - - - - - The messenger thread is started at a lower priority than the current thread. - - - - - - + + + + + The messenger thread is started at a lower + priority than the current thread. + + + + + + - - - - - The number of messages exchanged is counted in a one second time window. - - - - - - + + + + The number of messages exchanged is counted in a + one second time window. + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Messages performance #2. - - - 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. - - - CH_CFG_USE_MESSAGES - - - - - - - - - - + + + + + + Messages performance #2. + + + 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. + + + + + + + + + + + + + - - - - - - The messenger thread is started at an higher priority than the current thread. - - - - - - + + + + + The messenger thread is started at an higher + priority than the current thread. + + + + + + - - - - - The number of messages exchanged is counted in a one second time window. - - - - - - + + + + The number of messages exchanged is counted in a + one second time window. + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Context Switch performance. - - - 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.<br> -The Context Switch performance is calculated by measuring the number of iterations after a second of continuous operations. - - - - - - - - - - - - - + + + + + + Context Switch performance. + + + 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.<br> + The Context Switch performance is calculated by measuring the number + of iterations after a second of continuous operations. + + + + + + + + + + + + + + - - - - - - Starting the target thread at an higher priority level. - - - - - - + + + + + Starting the target thread at an higher priority + level. + + + + + + - - - - - Waking up the thread as fast as possible in a one second time window. - - - - - - + + + + Waking up the thread as fast as possible in a one + second time window. + + + + + + - - - - - Stopping the target thread. - - - - - - + + + + Stopping the target thread. + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Threads performance, full cycle. - - - Threads are continuously created and terminated into a loop. A full chThdCreateStatic() / @p chThdExit() / @p chThdWait() cycle is performed in each iteration.<br> -The performance is calculated by measuring the number of iterations after a second of continuous operations. - - - - - - - - - - - - - - - - - - - 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. - - - - - - + + + + + + Threads performance, full cycle. + + + Threads are continuously created and terminated into + a loop. A full chThdCreateStatic() / @p chThdExit() / @p + chThdWait() cycle is performed in each + iteration.<br> + The performance is calculated by measuring the number of iterations + after a second of continuous operations. + + + + + + + + + + + + + + + + + + + + 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. + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Threads performance, create/exit only. - - - 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.<br> The performance is calculated by measuring the number of iterations after a second of continuous operations. - - - - - - - - - - - - - - - - - - - A thread is created at an higher priority level and let terminate immediately. The operation is repeated continuously in a one-second time window. - - - - - - + + + + + + Threads performance, create/exit only. + + + 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.<br> The performance is calculated by + measuring the number of iterations after a second of + continuous operations. + + + + + + + + + + + + + + + + + + + A thread is created at an higher priority level + and let terminate immediately. The operation is + repeated continuously in a one-second time window. + + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Semaphores wait/signal performance - - - A counting semaphore is taken/released into a continuous loop, no Context Switch happens because the counter is always non negative.<br> -The performance is calculated by measuring the number of iterations after a second of continuous operations. - - - CH_CFG_USE_SEMAPHORES - - - - - - - - - - - - - - - - A semaphore is teken and released. The operation is repeated continuously in a one-second time window. - - - - - - + + + + + + Semaphores wait/signal performance + + + A counting semaphore is taken/released into a + continuous loop, no Context Switch happens because the + counter is always non negative.<br> + The performance is calculated by measuring the number of iterations + after a second of continuous operations. + + + + + + + + + + + + + + + + + + + + A semaphore is teken and released. The operation + is repeated continuously in a one-second time window. + + + + + + + - - - - - The score is printed. - - - - - - + + + + The score is printed. + + + + + + - - - - - - - RAM Footprint. - - - The memory size of the various kernel objects is printed. - - - - - - - - - - - - - - - - - - - The size of the system area is printed. - - - - - - + + + + + + RAM Footprint. + + + The memory size of the various kernel objects is + printed. + + + + + + + + + + + + + + + + + + + The size of the system area is printed. + + + + + + - - - - - The size of a thread structure is printed. - - - - - - + + + + The size of a thread structure is printed. + + + + + + + - - - - - The size of a semaphore structure is printed. - - - - - - + + + + The size of a semaphore structure is printed. + + + + + + + - - - - - The size of an event source is printed. - - - - - - + + + + The size of an event source is printed. + + + + + + - - - - - The size of an event listener is printed. - - - - - - + + + + The size of an event listener is printed. + + + + + + - - - - - The size of a mailbox is printed. - - - - - - + + + + The size of a mailbox is printed. + + + + + + - - - - - - - - - - - - + + + + + + + + diff --git a/test/nil/source/test/nil_test_root.c b/test/nil/source/test/nil_test_root.c index 7697d8dff..9880a70e9 100644 --- a/test/nil/source/test/nil_test_root.c +++ b/test/nil/source/test/nil_test_root.c @@ -53,14 +53,14 @@ const testsequence_t * const nil_test_suite_array[] = { &nil_test_sequence_001, &nil_test_sequence_002, &nil_test_sequence_003, -#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__) &nil_test_sequence_004, #endif &nil_test_sequence_005, -#if (CH_CFG_USE_EVENTS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_EVENTS == TRUE) || defined(__DOXYGEN__) &nil_test_sequence_006, #endif -#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__) &nil_test_sequence_007, #endif &nil_test_sequence_008, diff --git a/test/nil/source/test/nil_test_sequence_004.c b/test/nil/source/test/nil_test_sequence_004.c index 3f2d4f4cd..9695a56ef 100644 --- a/test/nil/source/test/nil_test_sequence_004.c +++ b/test/nil/source/test/nil_test_sequence_004.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_SEMAPHORES + * - CH_CFG_USE_SEMAPHORES == TRUE * . * *

Test Cases

@@ -42,7 +42,7 @@ * . */ -#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -305,4 +305,4 @@ const testsequence_t nil_test_sequence_004 = { nil_test_sequence_004_array }; -#endif /* CH_CFG_USE_SEMAPHORES */ +#endif /* CH_CFG_USE_SEMAPHORES == TRUE */ diff --git a/test/nil/source/test/nil_test_sequence_006.c b/test/nil/source/test/nil_test_sequence_006.c index b12990fd3..0276a90f0 100644 --- a/test/nil/source/test/nil_test_sequence_006.c +++ b/test/nil/source/test/nil_test_sequence_006.c @@ -31,7 +31,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_EVENTS + * - CH_CFG_USE_EVENTS == TRUE * . * *

Test Cases

@@ -45,7 +45,7 @@ * . */ -#if (CH_CFG_USE_EVENTS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_EVENTS == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -629,4 +629,4 @@ const testsequence_t nil_test_sequence_006 = { nil_test_sequence_006_array }; -#endif /* CH_CFG_USE_EVENTS */ +#endif /* CH_CFG_USE_EVENTS == TRUE */ diff --git a/test/nil/source/test/nil_test_sequence_007.c b/test/nil/source/test/nil_test_sequence_007.c index b8d7de1c3..7d2bfec1d 100644 --- a/test/nil/source/test/nil_test_sequence_007.c +++ b/test/nil/source/test/nil_test_sequence_007.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MESSAGES + * - CH_CFG_USE_MESSAGES == TRUE * . * *

Test Cases

@@ -40,7 +40,7 @@ * . */ -#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -139,4 +139,4 @@ const testsequence_t nil_test_sequence_007 = { nil_test_sequence_007_array }; -#endif /* CH_CFG_USE_MESSAGES */ +#endif /* CH_CFG_USE_MESSAGES == TRUE */ diff --git a/test/nil/source/test/nil_test_sequence_008.c b/test/nil/source/test/nil_test_sequence_008.c index d1a72fff2..8d8082644 100644 --- a/test/nil/source/test/nil_test_sequence_008.c +++ b/test/nil/source/test/nil_test_sequence_008.c @@ -108,7 +108,7 @@ static THD_FUNCTION(bmk_thread4, p) { * 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 * @@ -120,7 +120,7 @@ static THD_FUNCTION(bmk_thread4, p) { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MESSAGES + * - CH_CFG_USE_MESSAGES == TRUE * . * *

Test Steps

@@ -179,9 +179,9 @@ static const testcase_t nil_test_008_001 = { NULL, 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 * @@ -193,7 +193,7 @@ static const testcase_t nil_test_008_001 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MESSAGES + * - CH_CFG_USE_MESSAGES == TRUE * . * *

Test Steps

@@ -252,7 +252,7 @@ static const testcase_t nil_test_008_002 = { NULL, 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 @@ -467,7 +467,7 @@ static const testcase_t nil_test_008_005 = { 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 * @@ -480,7 +480,7 @@ static const testcase_t nil_test_008_005 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_SEMAPHORES + * - CH_CFG_USE_SEMAPHORES == TRUE * . * *

Test Steps

@@ -539,7 +539,7 @@ static const testcase_t nil_test_008_006 = { NULL, 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 @@ -637,16 +637,16 @@ static const testcase_t nil_test_008_007 = { * @brief Array of test cases. */ 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, #endif -#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__) &nil_test_008_002, #endif &nil_test_008_003, &nil_test_008_004, &nil_test_008_005, -#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__) &nil_test_008_006, #endif &nil_test_008_007, diff --git a/test/oslib/configuration.xml b/test/oslib/configuration.xml index f3b09c8b9..624806bb2 100644 --- a/test/oslib/configuration.xml +++ b/test/oslib/configuration.xml @@ -1,19 +1,12 @@ - - - - Test Specification for ChibiOS OS Library. - - - - - - - - - ChibiOS OS Library Test Suite. - - - + + + ChibiOS OS Library Test Suite. + + + - - - Test suite for ChibiOS OS Library. The purpose of this suite is to perform unit tests on the library modules and to converge to 100% code coverage through successive improvements. - - - - - oslib_ - - + + + Test suite for ChibiOS OS Library. The purpose of this + suite is to perform unit tests on the library modules and to + converge to 100% code coverage through successive improvements. + + + + + + oslib_ + + + + + + + + + + + + Internal Tests + + + Information. + + + This sequence reports configuration and version + information about the OS library. + + + + + + + + + + + Port Info. + + + Port-related info are reported. + + - - - - - - - - - Internal Tests - - - Information. - - - This sequence reports configuration and version information about the OS library. - - + + + - - - - - - - - Port Info. - - - Port-related info are reported. - - - - - - - - - - - - - - - - - - - Prints the version string. - - - - - - + + + + + + + + + + + Prints the version string. + + + + + + - - - - - - - OS Library Info. - - - The version numbers are reported. - - - - - - - - - - - - - - - - - - - Prints the version string. - - - - - - + + + + + + OS Library Info. + + + The version numbers are reported. + + + + + + + + + + + + + + + + + + + Prints the version string. + + + + + + - - - - - - - OS Library Settings. - - - The static OS Library settings are reported. - - - - - - - - - - - - - - - - - - - Prints the configuration options settings. - - - - - - + + + + + + OS Library Settings. + + + The static OS Library settings are reported. + + + + + + + + + + + + + + + + + + + Prints the configuration options settings. + + + + + + + - - - - - - - - - Internal Tests - - - Mailboxes. - - - This sequence tests the ChibiOS library functionalities related to mailboxes. - - - CH_CFG_USE_MAILBOXES - - - + + + + + + + + Internal Tests + + + Mailboxes. + + + This sequence tests the ChibiOS library functionalities + related to mailboxes. + + + + + + - - - - - Mailbox normal API, non-blocking tests. - - - The mailbox normal API is tested without triggering blocking conditions. - - - - - - - - - - - - - + + + + Mailbox normal API, non-blocking tests. + + + The mailbox normal API is tested without triggering + blocking conditions. + + + + + + + + + + + + + - - - - - - Testing the mailbox size. - - - - - - - - - - - Resetting the mailbox, conditions are checked, no errors expected. - - - - - - + + + + + Testing the mailbox size. + + + + + + + + + + + Resetting the mailbox, conditions are checked, no + errors expected. + + + + + + - - - - - Testing the behavior of API when the mailbox is in reset state then return in active state. - - - - - - + + + + Testing the behavior of API when the mailbox is + in reset state then return in active state. + + + + + + - - - - - Filling the mailbox using chMBPostTimeout() and chMBPostAheadTimeout() once, no errors expected. - - - - - - + + + + Filling the mailbox using chMBPostTimeout() and + chMBPostAheadTimeout() once, no errors expected. + + + + + + + - - - - - Testing intermediate conditions. Data pointers must be aligned, semaphore counters are checked. - - - - - - + + + + Testing intermediate conditions. Data pointers + must be aligned, semaphore counters are checked. + + + + + + + - - - - - Emptying the mailbox using chMBFetchTimeout(), no errors expected. - - - - - - + + + + Emptying the mailbox using chMBFetchTimeout(), no + errors expected. + + + + + + - - - - - Posting and then fetching one more message, no errors expected. - - - - - - + + + + Posting and then fetching one more message, no + errors expected. + + + + + + - - - - - Testing final conditions. Data pointers must be aligned to buffer start, semaphore counters are checked. - - - - - - + + + + Testing final conditions. Data pointers must be + aligned to buffer start, semaphore counters are + checked. + + + + + + - - - - - - - Mailbox I-Class API, non-blocking tests. - - - The mailbox I-Class API is tested without triggering blocking conditions. - - - - - - - - - - - - - + + + + + + Mailbox I-Class API, non-blocking tests. + + + The mailbox I-Class API is tested without triggering + blocking conditions. + + + + + + + + + + + + + - - - - - - Testing the mailbox size. - - - - - - - - - - - Resetting the mailbox, conditions are checked, no errors expected. The mailbox is then returned in active state. - - - - - - + + + + + Testing the mailbox size. + + + + + + + + + + + Resetting the mailbox, conditions are checked, no + errors expected. The mailbox is then returned in + active state. + + + + + + - - - - - Filling the mailbox using chMBPostI() and chMBPostAheadI() once, no errors expected. - - - - - - + + + + Filling the mailbox using chMBPostI() and + chMBPostAheadI() once, no errors expected. + + + + + + - - - - - Testing intermediate conditions. Data pointers must be aligned, semaphore counters are checked. - - - - - - + + + + Testing intermediate conditions. Data pointers + must be aligned, semaphore counters are checked. + + + + + + + - - - - - Emptying the mailbox using chMBFetchI(), no errors expected. - - - - - - + + + + Emptying the mailbox using chMBFetchI(), no + errors expected. + + + + + + test_emit_token(msg2); } test_assert_sequence("ABCD", "wrong get sequence");]]> - - - - - Posting and then fetching one more message, no errors expected. - - - - - - + + + + Posting and then fetching one more message, no + errors expected. + + + + + + - - - - - Testing final conditions. Data pointers must be aligned to buffer start, semaphore counters are checked. - - - - - - + + + + Testing final conditions. Data pointers must be + aligned to buffer start, semaphore counters are + checked. + + + + + + - - - - - - - Mailbox timeouts. - - - The mailbox API is tested for timeouts. - - - - - - - - - - - - - + + + + + + Mailbox timeouts. + + + The mailbox API is tested for timeouts. + + + + + + + + + + + + + - - - - - - Filling the mailbox. - - - - - - + + + + + Filling the mailbox. + + + + + + - - - - - Testing chMBPostTimeout(), chMBPostI(), chMBPostAheadTimeout() and chMBPostAheadI() timeout. - - - - - - + + + + Testing chMBPostTimeout(), chMBPostI(), + chMBPostAheadTimeout() and chMBPostAheadI() timeout. + + + + + + + - - - - - Resetting the mailbox. The mailbox is then returned in active state. - - - - - - + + + + Resetting the mailbox. The mailbox is then + returned in active state. + + + + + + - - - - - Testing chMBFetchTimeout() and chMBFetchI() timeout. - - - - - - + + + + Testing chMBFetchTimeout() and chMBFetchI() + timeout. + + + + + + - - - - - - - - - Internal Tests - - - Pipes - - - This sequence tests the ChibiOS library functionalities related to pipes. - - - CH_CFG_USE_PIPES - - - + + + + + + + + + Internal Tests + + + Pipes + + + This sequence tests the ChibiOS library functionalities + related to pipes. + + + + + + #define PIPE_SIZE 16 @@ -669,56 +694,57 @@ static uint8_t buffer[PIPE_SIZE]; static PIPE_DECL(pipe1, buffer, PIPE_SIZE); static const uint8_t pipe_pattern[] = "0123456789ABCDEF";]]> - - - - - Pipes normal API, non-blocking tests. - - - The pipe functionality is tested by loading and emptying it, all conditions are tested. - - - - - - - - - - - - - - - - - - - - Resetting pipe. - - - - - - + + + + Pipes normal API, non-blocking tests. + + + The pipe functionality is tested by loading and + emptying it, all conditions are tested. + + + + + + + + + + + + + + + + + + + + Resetting pipe. + + + + + + - - - - - Writing data, must fail. - - - - - - + + + + Writing data, must fail. + + + + + + - - - - - Reading data, must fail. - - - - - - + + + + Reading data, must fail. + + + + + + - - - - - Reactivating pipe. - - - - - - + + + + Reactivating pipe. + + + + + + - - - - - Filling whole pipe. - - - - - - + + + + Filling whole pipe. + + + + + + - - - - - Emptying pipe. - - - - - - + + + + Emptying pipe. + + + + + + - - - - - Small write. - - - - - - + + + + Small write. + + + + + + - - - - - Filling remaining space. - - - - - - + + + + Filling remaining space. + + + + + + - - - - - Small Read. - - - - - - + + + + Small Read. + + + + + + - - - - - Reading remaining data. - - - - - - + + + + Reading remaining data. + + + + + + - - - - - Small Write. - - - - - - + + + + Small Write. + + + + + + - - - - - Small Read. - - - - - - + + + + Small Read. + + + + + + - - - - - Write wrapping buffer boundary. - - - - - - + + + + Write wrapping buffer boundary. + + + + + + - - - - - Read wrapping buffer boundary. - - - - - - + + + + Read wrapping buffer boundary. + + + + + + - - - - - - - Pipe timeouts. - - - The pipe API is tested for timeouts. - - - - - - - - - - - - - - - - - - - - Reading while pipe is empty. - - - - - - + + + + + + Pipe timeouts. + + + The pipe API is tested for timeouts. + + + + + + + + + + + + + + + + + + + + Reading while pipe is empty. + + + + + + - - - - - Writing a string larger than pipe buffer. - - - - - - + + + + Writing a string larger than pipe buffer. + + + + + + - - - - - - - - - Internal Tests - - - Jobs Queues - - - This sequence tests the ChibiOS library functionalities related to Jobs Queues. - - - CH_CFG_USE_JOBS - - - + + + + + + + + Internal Tests + + + Jobs Queues + + + This sequence tests the ChibiOS library functionalities + related to Jobs Queues. + + + + + + - - - - - Dispatcher test. - - - The dispatcher API is tested for functionality. - - - - - - - - - - - - - - + + + + Dispatcher test. + + + The dispatcher API is tested for functionality. + + + + + + + + + + + + + + + - - - - - - Initializing the Jobs Queue object. - - - - - - + + + + + Initializing the Jobs Queue object. + + + + + + - - - - - Starting the dispatcher threads. - - - - - - + + + + Starting the dispatcher threads. + + + + + + - - - - - Sending jobs with various timings. - - - - - - + + + + Sending jobs with various timings. + + + + + + - - - - - Sending two null jobs to make threads exit. - - - - - - + + + + Sending two null jobs to make threads exit. + + + + + + + - - - - - - - - - Internal Tests - - - Thread Delegates - - - This sequence tests the ChibiOS library functionalities related to Thread Delegates. - - - CH_CFG_USE_DELEGATES - - - + + + + + + + + Internal Tests + + + Thread Delegates + + + This sequence tests the ChibiOS library functionalities + related to Thread Delegates. + + + + + + - - - - - Dispatcher test. - - - The dispatcher API is tested for functionality. - - - - - - - - - - - - - - + + + + Dispatcher test. + + + The dispatcher API is tested for functionality. + + + + + + + + + + + + + + + - - - - - - Starting the dispatcher thread. - - - - - - + + + + + Starting the dispatcher thread. + + + + + + - - - - - Calling the default veneers, checking the result -and the emitted tokens. - - - - - - + + + + Calling the default veneers, checking the result + and the emitted tokens. + + + + + + + - - - - - Waiting for the thread to terminate- - - - - - - + + + + Waiting for the thread to terminate- + + + + + + - - - - - - - - - Internal Tests - - - Objects Caches - - - This sequence tests the ChibiOS library functionalities related to Objects Caches. - - - CH_CFG_USE_OBJ_CACHES - - - + + + + + + + + + Internal Tests + + + Objects Caches + + + This sequence tests the ChibiOS library functionalities + related to Objects Caches. + + + + + + #define SIZE_OBJECTS 16 #define NUM_OBJECTS 4 @@ -1412,40 +1445,41 @@ static bool obj_write(objects_cache_t *ocp, return false; }]]> - - - - - Cache initialization. - - - A cache object is initialized, some initial conditions are checked. - - - - - - - - - - - - - - - - - - - - Cache initialization. - - - - - - + + + + Cache initialization. + + + A cache object is initialized, some initial + conditions are checked. + + + + + + + + + + + + + + + + + + + + Cache initialization. + + + + + + - - - - - Getting and releasing objects without initialization. - - - - - - + + + + Getting and releasing objects without + initialization. + + + + + + - - - - - Getting and releasing objects with synchronous initialization. - - - - - - + + + + Getting and releasing objects with synchronous + initialization. + + + + + + - - - - - Getting and releasing objects with asynchronous initialization. - - - - - - + + + + Getting and releasing objects with asynchronous + initialization. + + + + + + - - - - - Checking cached objects. - - - - - - + + + + Checking cached objects. + + + + + + - - - - - Checking non-cached objects. - - - - - - + + + + Checking non-cached objects. + + + + + + - - - - - - - - - Internal Tests - - - Memory Pools. - - - This sequence tests the ChibiOS library functionalities related to memory pools. - - - CH_CFG_USE_MEMPOOLS - - - + + + + + + + + Internal Tests + + + Memory Pools. + + + This sequence tests the ChibiOS library functionalities + related to memory pools. + + + + + + - - - - - Loading and emptying a memory pool. - - - The memory pool functionality is tested by loading and emptying it, all conditions are tested. - - - - - - - - - - - - - - - - - - - Adding the objects to the pool using chPoolLoadArray(). - - - - - - - - - - - Emptying the pool using chPoolAlloc(). - - - - - - + + + + Loading and emptying a memory pool. + + + The memory pool functionality is tested by loading + and emptying it, all conditions are tested. + + + + + + + + + + + + + + + + + + + Adding the objects to the pool using + chPoolLoadArray(). + + + + + + + + + + + Emptying the pool using chPoolAlloc(). + + + + + + - - - - - Now must be empty. - - - - - - - - - - - Adding the objects to the pool using chPoolFree(). - - - - - - + + + + Now must be empty. + + + + + + + + + + + Adding the objects to the pool using + chPoolFree(). + + + + + + - - - - - Emptying the pool using chPoolAlloc() again. - - - - - - + + + + Emptying the pool using chPoolAlloc() again. + + + + + + + - - - - - Now must be empty again. - - - - - - - - - - - Covering the case where a provider is unable to return more memory. - - - - - - + + + + Now must be empty again. + + + + + + + + + + + Covering the case where a provider is unable to + return more memory. + + + + + + - - - - - - - Loading and emptying a guarded memory pool without waiting. - - - The memory pool functionality is tested by loading and emptying it, all conditions are tested. - - - CH_CFG_USE_SEMAPHORES - - - - - - - - - - - - - - - - Adding the objects to the pool using chGuardedPoolLoadArray(). - - - - - - - - - - - Emptying the pool using chGuardedPoolAllocTimeout(). - - - - - - + + + + + + Loading and emptying a guarded memory pool without waiting. + + + The memory pool functionality is tested by loading + and emptying it, all conditions are tested. + + + + + + + + + + + + + + + + + + + Adding the objects to the pool using + chGuardedPoolLoadArray(). + + + + + + + + + + + Emptying the pool using + chGuardedPoolAllocTimeout(). + + + + + + - - - - - Now must be empty. - - - - - - - - - - - Adding the objects to the pool using chGuardedPoolFree(). - - - - - - + + + + Now must be empty. + + + + + + + + + + + Adding the objects to the pool using + chGuardedPoolFree(). + + + + + + - - - - - Emptying the pool using chGuardedPoolAllocTimeout() again. - - - - - - + + + + Emptying the pool using + chGuardedPoolAllocTimeout() again. + + + + + + - - - - - Now must be empty again. - - - - - - - - - - - - - Guarded Memory Pools timeout. - - - The timeout features for the Guarded Memory Pools is tested. - - - CH_CFG_USE_SEMAPHORES - - - - - - - - - - - - - - - - Trying to allocate with 100mS timeout, must fail because the pool is empty. - - - - - - - - - - - - - - - Internal Tests - - - Memory Heaps. - - - This sequence tests the ChibiOS library functionalities related to memory heaps. - - - CH_CFG_USE_HEAP - - - + + + + Now must be empty again. + + + + + + + + + + + + + Guarded Memory Pools timeout. + + + The timeout features for the Guarded Memory Pools is + tested. + + + + + + + + + + + + + + + + + + + Trying to allocate with 100mS timeout, must fail + because the pool is empty. + + + + + + + + + + + + + + + Internal Tests + + + Memory Heaps. + + + This sequence tests the ChibiOS library functionalities + related to memory heaps. + + + + + + - - - - - Allocation and fragmentation. - - - Series of allocations/deallocations are performed in carefully designed sequences in order to stimulate all the possible code paths inside the allocator. The test expects to find the heap back to the initial status after each sequence. - - - - - - - - - - - - - + + + + Allocation and fragmentation. + + + Series of allocations/deallocations are performed in + carefully designed sequences in order to stimulate all the + possible code paths inside the allocator. The test expects + to find the heap back to the initial status after each + sequence. + + + + + + + + + + + + + - - - - - - Testing initial conditions, the heap must not be fragmented and one free block present. - - - - - - - - - - - Trying to allocate an block bigger than available space, an error is expected. - - - - - - + + + + + Testing initial conditions, the heap must not be + fragmented and one free block present. + + + + + + + + + + + Trying to allocate an block bigger than available + space, an error is expected. + + + + + + - - - - - Single block allocation using chHeapAlloc() then the block is freed using chHeapFree(), must not fail. - - - - - - + + + + Single block allocation using chHeapAlloc() then + the block is freed using chHeapFree(), must not fail. + + + + + + + - - - - - Using chHeapStatus() to assess the heap state. There must be at least one free block of sufficient size. - - - - - - + + + + Using chHeapStatus() to assess the heap state. + There must be at least one free block of sufficient + size. + + + + + + = ALLOC_SIZE, "unexpected heap state"); test_assert(total_size == largest_size, "unexpected heap state");]]> - - - - - Allocating then freeing in the same order. - - - - - - + + + + Allocating then freeing in the same order. + + + + + + + - - - - - Allocating then freeing in reverse order. - - - - - - + + + + Allocating then freeing in reverse order. + + + + + + - - - - - Small fragments handling. Checking the behavior when allocating blocks with size not multiple of alignment unit. - - - - - - + + + + Small fragments handling. Checking the behavior + when allocating blocks with size not multiple of + alignment unit. + + + + + + - - - - - Skipping a fragment, the first fragment in the list is too small so the allocator must pick the second one. - - - - - - + + + + Skipping a fragment, the first fragment in the + list is too small so the allocator must pick the + second one. + + + + + + - - - - - Allocating the whole available space. - - - - - - + + + + Allocating the whole available space. + + + + + + - - - - - Testing final conditions. The heap geometry must be the same than the one registered at beginning. - - - - - - + + + + Testing final conditions. The heap geometry must + be the same than the one registered at beginning. + + + + + + + - - - - - - - Default Heap. - - - The default heap is pre-allocated in the system. We test base functionality. - - - - - - - - - - - - - + + + + + + Default Heap. + + + The default heap is pre-allocated in the system. We + test base functionality. + + + + + + + + + + + + + - - - - - - Single block allocation using chHeapAlloc() then the block is freed using chHeapFree(), must not fail. - - - - - - + + + + + Single block allocation using chHeapAlloc() then + the block is freed using chHeapFree(), must not fail. + + + + + + + - - - - - Testing allocation failure. - - - - - - + + + + Testing allocation failure. + + + + + + - - - - - - - - - Internal Tests - - - Objects Factory. - - - This sequence tests the ChibiOS library functionalities related to the object factory. - - - (CH_CFG_USE_FACTORY == TRUE) && (CH_CFG_USE_MEMPOOLS == TRUE) && (CH_CFG_USE_HEAP == TRUE) - - + + + + + + + + + Internal Tests + + + Objects Factory. + + + This sequence tests the ChibiOS library functionalities + related to the object factory. + + + + + + + + + + + Objects Registry. + + + This test case verifies the static objects registry. + + + + + + + - - - - - Objects Registry. - - - This test case verifies the static objects registry. - - - CH_CFG_FACTORY_OBJECTS_REGISTRY == TRUE - - - - - - - + + - - - - - - - - - Retrieving a registered object by name, must not exist. - - - - - - + + + + + + + + Retrieving a registered object by name, must not + exist. + + + + + + - - - - - Registering an object, it must not exists, must succeed. - - - - - - + + + + Registering an object, it must not exists, must + succeed. + + + + + + - - - - - Registering an object with the same name, must fail. - - - - - - + + + + Registering an object with the same name, must + fail. + + + + + + - - - - - Retrieving the registered object by name, must exist, then increasing the reference counter, finally releasing both references. - - - - - - + + + + Retrieving the registered object by name, must + exist, then increasing the reference counter, finally + releasing both references. + + + + + + element.refs == 2, "references mismatch"); chFactoryReleaseObject(rop1); test_assert(rop->element.refs == 1, "references mismatch");]]> - - - - - Releasing the first reference to the object, must not trigger an assertion. - - - - - - - - - - - Retrieving the registered object by name again, must not exist. - - - - - - + + + + Releasing the first reference to the object, must + not trigger an assertion. + + + + + + + + + + + Retrieving the registered object by name again, + must not exist. + + + + + + - - - - - - - Dynamic Buffers Factory. - - - This test case verifies the dynamic buffers factory. - - - CH_CFG_FACTORY_GENERIC_BUFFERS == TRUE - - - - - - - + + + + + + Dynamic Buffers Factory. + + + This test case verifies the dynamic buffers factory. + + + + + + + + + + + - - - - - - - - - Retrieving a dynamic buffer by name, must not exist. - - - - - - + + + + + + + + Retrieving a dynamic buffer by name, must not + exist. + + + + + + - - - - - Creating a dynamic buffer it must not exists, must succeed. - - - - - - + + + + Creating a dynamic buffer it must not exists, + must succeed. + + + + + + - - - - - Creating a dynamic buffer with the same name, must fail. - - - - - - + + + + Creating a dynamic buffer with the same name, + must fail. + + + + + + - - - - - Retrieving the dynamic buffer by name, must exist, then increasing the reference counter, finally releasing both references. - - - - - - + + + + Retrieving the dynamic buffer by name, must + exist, then increasing the reference counter, finally + releasing both references. + + + + + + element.refs == 2, "references mismatch"); chFactoryReleaseBuffer(dbp1); test_assert(dbp->element.refs == 1, "references mismatch");]]> - - - - - Releasing the first reference to the dynamic buffer, must not trigger an assertion. - - - - - - - - - - - Retrieving the dynamic buffer by name again, must not exist. - - - - - - + + + + Releasing the first reference to the dynamic + buffer, must not trigger an assertion. + + + + + + + + + + + Retrieving the dynamic buffer by name again, must + not exist. + + + + + + - - - - - - - Dynamic Semaphores Factory. - - - This test case verifies the dynamic semaphores factory. - - - CH_CFG_FACTORY_SEMAPHORES == TRUE - - - - - - - + + + + + + Dynamic Semaphores Factory. + + + This test case verifies the dynamic semaphores + factory. + + + + + + + + + + - - - - - - - - - Retrieving a dynamic semaphore by name, must not exist. - - - - - - + + + + + + + + Retrieving a dynamic semaphore by name, must not + exist. + + + + + + - - - - - Creating a dynamic semaphore it must not exists, must succeed. - - - - - - + + + + Creating a dynamic semaphore it must not exists, + must succeed. + + + + + + - - - - - Creating a dynamic semaphore with the same name, must fail. - - - - - - + + + + Creating a dynamic semaphore with the same name, + must fail. + + + + + + - - - - - Retrieving the dynamic semaphore by name, must exist, then increasing the reference counter, finally releasing both references. - - - - - - + + + + Retrieving the dynamic semaphore by name, must + exist, then increasing the reference counter, finally + releasing both references. + + + + + + element.refs == 2, "references mismatch"); chFactoryReleaseSemaphore(dsp1); test_assert(dsp->element.refs == 1, "references mismatch");]]> - - - - - Releasing the first reference to the dynamic semaphore must not trigger an assertion. - - - - - - - - - - - Retrieving the dynamic semaphore by name again, must not exist. - - - - - - + + + + Releasing the first reference to the dynamic + semaphore must not trigger an assertion. + + + + + + + + + + + Retrieving the dynamic semaphore by name again, + must not exist. + + + + + + - - - - - - - Dynamic Mailboxes Factory. - - - This test case verifies the dynamic mailboxes factory. - - - CH_CFG_FACTORY_MAILBOXES == TRUE - - - - - - - + + + + + + Dynamic Mailboxes Factory. + + + This test case verifies the dynamic mailboxes + factory. + + + + + + + + + + - - - - - - - - - Retrieving a dynamic mailbox by name, must not exist. - - - - - - + + + + + + + + Retrieving a dynamic mailbox by name, must not + exist. + + + + + + - - - - - Creating a dynamic mailbox it must not exists, must succeed. - - - - - - + + + + Creating a dynamic mailbox it must not exists, + must succeed. + + + + + + - - - - - Creating a dynamic mailbox with the same name, must fail. - - - - - - + + + + Creating a dynamic mailbox with the same name, + must fail. + + + + + + - - - - - Retrieving the dynamic mailbox by name, must exist, then increasing the reference counter, finally releasing both references. - - - - - - + + + + Retrieving the dynamic mailbox by name, must + exist, then increasing the reference counter, finally + releasing both references. + + + + + + element.refs == 2, "references mismatch"); chFactoryReleaseMailbox(dmp1); test_assert(dmp->element.refs == 1, "references mismatch");]]> - - - - - Releasing the first reference to the dynamic mailbox must not trigger an assertion. - - - - - - - - - - - Retrieving the dynamic mailbox by name again, must not exist. - - - - - - + + + + Releasing the first reference to the dynamic + mailbox must not trigger an assertion. + + + + + + + + + + + Retrieving the dynamic mailbox by name again, + must not exist. + + + + + + - - - - - - - Dynamic Objects FIFOs Factory. - - - This test case verifies the dynamic objects FIFOs factory. - - - CH_CFG_FACTORY_OBJ_FIFOS == TRUE - - - - - - - + + + + + + Dynamic Objects FIFOs Factory. + + + This test case verifies the dynamic objects FIFOs + factory. + + + + + + + + + + - - - - - - - - - Retrieving a dynamic objects FIFO by name, must not exist. - - - - - - + + + + + + + + Retrieving a dynamic objects FIFO by name, must + not exist. + + + + + + - - - - - Creating a dynamic objects FIFO it must not exists, must succeed. - - - - - - + + + + Creating a dynamic objects FIFO it must not + exists, must succeed. + + + + + + - - - - - Creating a dynamic objects FIFO with the same name, must fail. - - - - - - + + + + Creating a dynamic objects FIFO with the same + name, must fail. + + + + + + - - - - - Retrieving the dynamic objects FIFO by name, must exist, then increasing the reference counter, finally releasing both references. - - - - - - + + + + Retrieving the dynamic objects FIFO by name, must + exist, then increasing the reference counter, finally + releasing both references. + + + + + + element.refs == 2, "references mismatch"); chFactoryReleaseObjectsFIFO(dofp1); test_assert(dofp->element.refs == 1, "references mismatch");]]> - - - - - Releasing the first reference to the dynamic objects FIFO must not trigger an assertion. - - - - - - - - - - - Retrieving the dynamic objects FIFO by name again, must not exist. - - - - - - + + + + Releasing the first reference to the dynamic + objects FIFO must not trigger an assertion. + + + + + + + + + + + Retrieving the dynamic objects FIFO by name + again, must not exist. + + + + + + - - - - - - - Dynamic Pipes Factory. - - - This test case verifies the dynamic pipes factory. - - - CH_CFG_FACTORY_PIPES == TRUE - - - - - - - + + + + + + Dynamic Pipes Factory. + + + This test case verifies the dynamic pipes factory. + + + + + + + + + + + - - - - - - - - - Retrieving a dynamic pipe by name, must not exist. - - - - - - + + + + + + + + Retrieving a dynamic pipe by name, must not + exist. + + + + + + - - - - - Creating a dynamic pipe it must not exists, must succeed. - - - - - - + + + + Creating a dynamic pipe it must not exists, must + succeed. + + + + + + - - - - - Creating a dynamic pipe with the same name, must fail. - - - - - - + + + + Creating a dynamic pipe with the same name, must + fail. + + + + + + - - - - - Retrieving the dynamic pipe by name, must exist, then increasing the reference counter, finally releasing both references. - - - - - - + + + + Retrieving the dynamic pipe by name, must exist, + then increasing the reference counter, finally + releasing both references. + + + + + + element.refs == 2, "references mismatch"); chFactoryReleasePipe(dpp1); test_assert(dpp->element.refs == 1, "references mismatch");]]> - - - - - Releasing the first reference to the dynamic pipe must not trigger an assertion. - - - - - - - - - - - Retrieving the dynamic pipe by name again, must not exist. - - - - - - + + + + Releasing the first reference to the dynamic pipe + must not trigger an assertion. + + + + + + + + + + + Retrieving the dynamic pipe by name again, must + not exist. + + + + + + - - - - - - - - - - - - - + + + + + + + + diff --git a/test/oslib/source/test/oslib_test_root.c b/test/oslib/source/test/oslib_test_root.c index 9df940eac..1988cfbcd 100644 --- a/test/oslib/source/test/oslib_test_root.c +++ b/test/oslib/source/test/oslib_test_root.c @@ -52,25 +52,25 @@ */ const testsequence_t * const oslib_test_suite_array[] = { &oslib_test_sequence_001, -#if (CH_CFG_USE_MAILBOXES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MAILBOXES == TRUE) || defined(__DOXYGEN__) &oslib_test_sequence_002, #endif -#if (CH_CFG_USE_PIPES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_PIPES == TRUE) || defined(__DOXYGEN__) &oslib_test_sequence_003, #endif -#if (CH_CFG_USE_JOBS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_JOBS == TRUE) || defined(__DOXYGEN__) &oslib_test_sequence_004, #endif -#if (CH_CFG_USE_DELEGATES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_DELEGATES == TRUE) || defined(__DOXYGEN__) &oslib_test_sequence_005, #endif -#if (CH_CFG_USE_OBJ_CACHES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_OBJ_CACHES == TRUE) || defined(__DOXYGEN__) &oslib_test_sequence_006, #endif -#if (CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MEMPOOLS == TRUE) || defined(__DOXYGEN__) &oslib_test_sequence_007, #endif -#if (CH_CFG_USE_HEAP) || defined(__DOXYGEN__) +#if (CH_CFG_USE_HEAP == TRUE) || defined(__DOXYGEN__) &oslib_test_sequence_008, #endif #if ((CH_CFG_USE_FACTORY == TRUE) && (CH_CFG_USE_MEMPOOLS == TRUE) && (CH_CFG_USE_HEAP == TRUE)) || defined(__DOXYGEN__) diff --git a/test/oslib/source/test/oslib_test_sequence_002.c b/test/oslib/source/test/oslib_test_sequence_002.c index dc7d1acad..bf3a867f5 100644 --- a/test/oslib/source/test/oslib_test_sequence_002.c +++ b/test/oslib/source/test/oslib_test_sequence_002.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MAILBOXES + * - CH_CFG_USE_MAILBOXES == TRUE * . * *

Test Cases

@@ -42,7 +42,7 @@ * . */ -#if (CH_CFG_USE_MAILBOXES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MAILBOXES == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -432,4 +432,4 @@ const testsequence_t oslib_test_sequence_002 = { oslib_test_sequence_002_array }; -#endif /* CH_CFG_USE_MAILBOXES */ +#endif /* CH_CFG_USE_MAILBOXES == TRUE */ diff --git a/test/oslib/source/test/oslib_test_sequence_003.c b/test/oslib/source/test/oslib_test_sequence_003.c index ab320b3a6..e05d3a155 100644 --- a/test/oslib/source/test/oslib_test_sequence_003.c +++ b/test/oslib/source/test/oslib_test_sequence_003.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_PIPES + * - CH_CFG_USE_PIPES == TRUE * . * *

Test Cases

@@ -41,7 +41,7 @@ * . */ -#if (CH_CFG_USE_PIPES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_PIPES == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -377,4 +377,4 @@ const testsequence_t oslib_test_sequence_003 = { oslib_test_sequence_003_array }; -#endif /* CH_CFG_USE_PIPES */ +#endif /* CH_CFG_USE_PIPES == TRUE */ diff --git a/test/oslib/source/test/oslib_test_sequence_004.c b/test/oslib/source/test/oslib_test_sequence_004.c index f9fe573ad..3cda943f7 100644 --- a/test/oslib/source/test/oslib_test_sequence_004.c +++ b/test/oslib/source/test/oslib_test_sequence_004.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_JOBS + * - CH_CFG_USE_JOBS == TRUE * . * *

Test Cases

@@ -40,7 +40,7 @@ * . */ -#if (CH_CFG_USE_JOBS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_JOBS == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -185,4 +185,4 @@ const testsequence_t oslib_test_sequence_004 = { oslib_test_sequence_004_array }; -#endif /* CH_CFG_USE_JOBS */ +#endif /* CH_CFG_USE_JOBS == TRUE */ diff --git a/test/oslib/source/test/oslib_test_sequence_005.c b/test/oslib/source/test/oslib_test_sequence_005.c index fc2002da6..78db5b3af 100644 --- a/test/oslib/source/test/oslib_test_sequence_005.c +++ b/test/oslib/source/test/oslib_test_sequence_005.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_DELEGATES + * - CH_CFG_USE_DELEGATES == TRUE * . * *

Test Cases

@@ -40,7 +40,7 @@ * . */ -#if (CH_CFG_USE_DELEGATES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_DELEGATES == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -210,4 +210,4 @@ const testsequence_t oslib_test_sequence_005 = { oslib_test_sequence_005_array }; -#endif /* CH_CFG_USE_DELEGATES */ +#endif /* CH_CFG_USE_DELEGATES == TRUE */ diff --git a/test/oslib/source/test/oslib_test_sequence_006.c b/test/oslib/source/test/oslib_test_sequence_006.c index f1799c02b..f6a51f74d 100644 --- a/test/oslib/source/test/oslib_test_sequence_006.c +++ b/test/oslib/source/test/oslib_test_sequence_006.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_OBJ_CACHES + * - CH_CFG_USE_OBJ_CACHES == TRUE * . * *

Test Cases

@@ -40,7 +40,7 @@ * . */ -#if (CH_CFG_USE_OBJ_CACHES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_OBJ_CACHES == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -263,4 +263,4 @@ const testsequence_t oslib_test_sequence_006 = { oslib_test_sequence_006_array }; -#endif /* CH_CFG_USE_OBJ_CACHES */ +#endif /* CH_CFG_USE_OBJ_CACHES == TRUE */ diff --git a/test/oslib/source/test/oslib_test_sequence_007.c b/test/oslib/source/test/oslib_test_sequence_007.c index 7bd511c70..f480ead23 100644 --- a/test/oslib/source/test/oslib_test_sequence_007.c +++ b/test/oslib/source/test/oslib_test_sequence_007.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MEMPOOLS + * - CH_CFG_USE_MEMPOOLS == TRUE * . * *

Test Cases

@@ -42,7 +42,7 @@ * . */ -#if (CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MEMPOOLS == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -157,7 +157,7 @@ static const testcase_t oslib_test_007_001 = { 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 * @@ -168,7 +168,7 @@ static const testcase_t oslib_test_007_001 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_SEMAPHORES + * - CH_CFG_USE_SEMAPHORES == TRUE * . * *

Test Steps

@@ -244,9 +244,9 @@ static const testcase_t oslib_test_007_002 = { NULL, 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 * @@ -256,7 +256,7 @@ static const testcase_t oslib_test_007_002 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_SEMAPHORES + * - CH_CFG_USE_SEMAPHORES == TRUE * . * *

Test Steps

@@ -286,7 +286,7 @@ static const testcase_t oslib_test_007_003 = { NULL, oslib_test_007_003_execute }; -#endif /* CH_CFG_USE_SEMAPHORES */ +#endif /* CH_CFG_USE_SEMAPHORES == TRUE */ /**************************************************************************** * Exported data. @@ -297,10 +297,10 @@ static const testcase_t oslib_test_007_003 = { */ const testcase_t * const oslib_test_sequence_007_array[] = { &oslib_test_007_001, -#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__) &oslib_test_007_002, #endif -#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__) &oslib_test_007_003, #endif NULL @@ -314,4 +314,4 @@ const testsequence_t oslib_test_sequence_007 = { oslib_test_sequence_007_array }; -#endif /* CH_CFG_USE_MEMPOOLS */ +#endif /* CH_CFG_USE_MEMPOOLS == TRUE */ diff --git a/test/oslib/source/test/oslib_test_sequence_008.c b/test/oslib/source/test/oslib_test_sequence_008.c index ab5b80477..f5e37e4ea 100644 --- a/test/oslib/source/test/oslib_test_sequence_008.c +++ b/test/oslib/source/test/oslib_test_sequence_008.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_HEAP + * - CH_CFG_USE_HEAP == TRUE * . * *

Test Cases

@@ -41,7 +41,7 @@ * . */ -#if (CH_CFG_USE_HEAP) || defined(__DOXYGEN__) +#if (CH_CFG_USE_HEAP == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -289,4 +289,4 @@ const testsequence_t oslib_test_sequence_008 = { oslib_test_sequence_008_array }; -#endif /* CH_CFG_USE_HEAP */ +#endif /* CH_CFG_USE_HEAP == TRUE */ diff --git a/test/rt/configuration.xml b/test/rt/configuration.xml index dcf05a5ee..269f99a48 100644 --- a/test/rt/configuration.xml +++ b/test/rt/configuration.xml @@ -1,19 +1,12 @@ - - - - Test Specification for ChibiOS/RT. - - - - - - - - - ChibiOS/RT Test Suite. - - - + + + ChibiOS/RT Test Suite. + + + - - - Test suite for ChibiOS/RT. The purpose of this suite is to perform unit tests on the RT modules and to converge to 100% code coverage through successive improvements. - - - - - rt_ - - - + + Test suite for ChibiOS/RT. The purpose of this suite is to + perform unit tests on the RT modules and to converge to 100% + code coverage through successive improvements. + + + + + rt_ + + + - - - + + - - - - - - Internal Tests - - - Information. - - - This sequence reports configuration and version information about the RT kernel. - - + + + + + + Internal Tests + + + Information. + + + This sequence reports configuration and version + information about the RT kernel. + + + + + + + + + + + Port Info. + + + Port-related info are reported. + + + + + + - - - - - - - - Port Info. - - - Port-related info are reported. - - - - - - - - - - - - - - - - - - - Prints the version string. - - - - - - + + + + + + + + + + + Prints the version string. + + + + + + - - - - - - - Kernel Info. - - - The version numbers are reported. - - - - - - - - - - - - - - - - - - - Prints the version string. - - - - - - + + + + + + Kernel Info. + + + The version numbers are reported. + + + + + + + + + + + + + + + + + + + Prints the version string. + + + + + + - - - - - - - Kernel Settings. - - - The static kernel settings are reported. - - - - - - - - - - - - - - - - - - - Prints the configuration options settings. - - - - - - + + + + + + Kernel Settings. + + + The static kernel settings are reported. + + + + + + + + + + + + + + + + + + + Prints the configuration options settings. + + + + + + + - - - - - - - - - Internal Tests - - - System layer and port interface. - - - The functionality of the system layer and port interface is tested. Basic RT functionality is taken for granted or this test suite could not even be executed. Errors in implementation are detected by executing this sequence with the state checker enabled (CH_DBG_STATE_CHECKER=TRUE). - - - - - - + + + + + + + + Internal Tests + + + System layer and port interface. + + + The functionality of the system layer and port interface + is tested. Basic RT functionality is taken for granted or this + test suite could not even be executed. Errors in + implementation are detected by executing this sequence with + the state checker enabled (CH_DBG_STATE_CHECKER=TRUE). + + + + + + - - - - - System integrity functionality. - - - The system self-test functionality is invoked in order to make an initial system state assessment and for coverage. - - - - - - - - - - - - - - - - - - - Testing Ready List integrity. - - - - - - + + + + System integrity functionality. + + + The system self-test functionality is invoked in + order to make an initial system state assessment and for + coverage. + + + + + + + + + + + + + + + + + + + Testing Ready List integrity. + + + + + + - - - - - Testing Virtual Timers List integrity. - - - - - - + + + + Testing Virtual Timers List integrity. + + + + + + - - - - - Testing Registry List integrity. - - - - - - + + + + Testing Registry List integrity. + + + + + + - - - - - Testing Port-defined integrity. - - - - - - + + + + Testing Port-defined integrity. + + + + + + - - - - - - - Critical zones functionality. - - - The critical zones API is invoked for coverage. - - - - - - - - - - - - - + + + + + + Critical zones functionality. + + + The critical zones API is invoked for coverage. + + + + + + + + + + + + + + - - - - - - Testing chSysGetStatusAndLockX() and chSysRestoreStatusX(), non reentrant case. - - - - - - + + + + + Testing chSysGetStatusAndLockX() and + chSysRestoreStatusX(), non reentrant case. + + + + + + - - - - - Testing chSysGetStatusAndLockX() and chSysRestoreStatusX(), reentrant case. - - - - - - + + + + Testing chSysGetStatusAndLockX() and + chSysRestoreStatusX(), reentrant case. + + + + + + - - - - - Testing chSysUnconditionalLock(). - - - - - - + + + + Testing chSysUnconditionalLock(). + + + + + + - - - - - Testing chSysUnconditionalUnlock(). - - - - - - + + + + Testing chSysUnconditionalUnlock(). + + + + + + - - - - - Testing from ISR context using a virtual timer. - - - - - - + + + + Testing from ISR context using a virtual timer. + + + + + + + - - - - - - - Interrupts handling functionality. - - - The interrupts handling API is invoked for coverage. - - - - - - - - - - - - - - - - - - - Testing chSysSuspend(), chSysDisable() and chSysEnable(). - - - - - - + + + + + + Interrupts handling functionality. + + + The interrupts handling API is invoked for coverage. + + + + + + + + + + + + + + + + + + + + Testing chSysSuspend(), chSysDisable() and + chSysEnable(). + + + + + + - - - - - - - - - Internal Tests - - - Time and Intervals Functionality. - - - This sequence tests the ChibiOS/RT functionalities related to time and intervals management. - - + + + + + + + + + Internal Tests + + + Time and Intervals Functionality. + + + This sequence tests the ChibiOS/RT functionalities + related to time and intervals management. + + + + + + + + + + + System Tick Counter functionality. + + + The functionality of the API @p chVTGetSystemTimeX() + is tested. + + + + + + - - - - - - - - System Tick Counter functionality. - - - The functionality of the API @p chVTGetSystemTimeX() is tested. - - - - - - - - - - - - - - - - - - - A System Tick Counter increment is expected, the test simply hangs if it does not happen. - - - - - - + + + + + + + + + + + A System Tick Counter increment is expected, the + test simply hangs if it does not happen. + + + + + + - - - - - - - Time ranges functionality. - - - The functionality of the API @p chTimeIsInRangeX() is tested. - - - - - - - - - - - - - - - - - - - Checking case where start == end, it must always evaluate as not in range. - - - - - - + + + + + + Time ranges functionality. + + + The functionality of the API @p chTimeIsInRangeX() is + tested. + + + + + + + + + + + + + + + + + + + Checking case where start == end, it must always + evaluate as not in range. + + + + + + - - - - - Checking boundaries for start < end. - - - - - - + + + + Checking boundaries for start < end. + + + + + + - - - - - Checking boundaries for start > end. - - - - - - + + + + Checking boundaries for start > end. + + + + + + - - - - - - - - - Internal Tests - - - Time Stamps Functionality. - - - This sequence tests the ChibiOS/RT functionalities related to time stamps. - - + + + + + + + + + Internal Tests + + + Time Stamps Functionality. + + + This sequence tests the ChibiOS/RT functionalities + related to time stamps. + + + + + + + + + + + Time Stamps functionality. + + + The functionality of the API @p chVTGetTimeStamp() is + tested. + + + + + + - - - - - - - - Time Stamps functionality. - - - The functionality of the API @p chVTGetTimeStamp() is tested. - - - - - - - - - - - - - - - - - - - Time stamps are generated and checked for monotonicity. - - - - - - + + + + + + + + + + + Time stamps are generated and checked for + monotonicity. + + + + + + - - - - - - - - - Internal Tests - - - Threads Functionality. - - - This sequence tests the ChibiOS/RT functionalities related to threading. - - - - - - + + + + + + + + Internal Tests + + + Threads Functionality. + + + This sequence tests the ChibiOS/RT functionalities + related to threading. + + + + + + - - - - - Thread Sleep functionality. - - - The functionality of @p chThdSleep() and derivatives is tested. - - - - - - - - - - - - - - - - - - - The current system time is read then a sleep is performed for 100 system ticks and on exit the system time is verified again. - - - - - - + + + + Thread Sleep functionality. + + + The functionality of @p chThdSleep() and derivatives + is tested. + + + + + + + + + + + + + + + + + + + The current system time is read then a sleep is + performed for 100 system ticks and on exit the system + time is verified again. + + + + + + - - - - - The current system time is read then a sleep is performed for 100000 microseconds and on exit the system time is verified again. - - - - - - + + + + The current system time is read then a sleep is + performed for 100000 microseconds and on exit the + system time is verified again. + + + + + + - - - - - The current system time is read then a sleep is performed for 100 milliseconds and on exit the system time is verified again. - - - - - - + + + + The current system time is read then a sleep is + performed for 100 milliseconds and on exit the system + time is verified again. + + + + + + - - - - - The current system time is read then a sleep is performed for 1 second and on exit the system time is verified again. - - - - - - + + + + The current system time is read then a sleep is + performed for 1 second and on exit the system time is + verified again. + + + + + + - - - - - Function chThdSleepUntil() is tested with a timeline of "now" + 100 ticks. - - - - - - + + + + Function chThdSleepUntil() is tested with a + timeline of "now" + 100 ticks. + + + + + + - - - - - - - Ready List functionality, threads priority order. - - - Five threads, are enqueued in the ready list and atomically executed. The test expects the threads to perform their operations in correct priority order regardless of the initial order. - - - - - - - - - - - - - - - - - - - Creating 5 threads with increasing priority, execution sequence is tested. - - - - - - + + + + + + Ready List functionality, threads priority order. + + + + Five threads, are enqueued in the ready list and + atomically executed. The test expects the threads to + perform their operations in correct priority order + regardless of the initial order. + + + + + + + + + + + + + + + + + + + Creating 5 threads with increasing priority, + execution sequence is tested. + + + + + + - - - - - Creating 5 threads with decreasing priority, execution sequence is tested. - - - - - - + + + + Creating 5 threads with decreasing priority, + execution sequence is tested. + + + + + + - - - - - Creating 5 threads with pseudo-random priority, execution sequence is tested. - - - - - - + + + + Creating 5 threads with pseudo-random priority, + execution sequence is tested. + + + + + + - - - - - - - Priority change test. - - - A series of priority changes are performed on the current thread in order to verify that the priority change happens as expected. - - - - - - - - - - - - - - - - - - - Thread priority is increased by one then a check is performed. - - - - - - + + + + + + Priority change test. + + + A series of priority changes are performed on the + current thread in order to verify that the priority change + happens as expected. + + + + + + + + + + + + + + + + + + + Thread priority is increased by one then a check + is performed. + + + + + + - - - - - Thread priority is returned to the previous value then a check is performed. - - - - - - + + + + Thread priority is returned to the previous value + then a check is performed. + + + + + + - - - - - - - Priority change test with Priority Inheritance. - - - A series of priority changes are performed on the current thread in order to verify that the priority change happens as expected. - - - CH_CFG_USE_MUTEXES - - - - - - - - - - - - - - - - Simulating a priority boost situation (prio > realprio). - - - - - - + + + + + + Priority change test with Priority Inheritance. + + + + A series of priority changes are performed on the + current thread in order to verify that the priority change + happens as expected. + + + + + + + + + + + + + + + + + + + Simulating a priority boost situation (prio > + realprio). + + + + + + hdr.pqueue.prio += 2; test_assert(chThdGetPriorityX() == prio + 2, "unexpected priority level");]]> - - - - - Raising thread priority above original priority but below the boosted level. - - - - - - + + + + Raising thread priority above original priority + but below the boosted level. + + + + + + hdr.pqueue.prio == prio + 2, "unexpected priority level"); test_assert(chThdGetSelfX()->realprio == prio + 1, "unexpected returned real priority level");]]> - - - - - Raising thread priority above the boosted level. - - - - - - + + + + Raising thread priority above the boosted level. + + + + + + + hdr.pqueue.prio == prio + 3, "unexpected priority level"); test_assert(chThdGetSelfX()->realprio == prio + 3, "unexpected real priority level");]]> - - - - - Restoring original conditions. - - - - - - + + + + Restoring original conditions. + + + + + + hdr.pqueue.prio = prio; chThdGetSelfX()->realprio = prio; chSysUnlock();]]> - - - - - - - - - Internal Tests - - - Suspend/Resume. - - - This sequence tests the ChibiOS/RT functionalities related to threads suspend/resume. - - - - - - + + + + + + + + Internal Tests + + + Suspend/Resume. + + + This sequence tests the ChibiOS/RT functionalities + related to threads suspend/resume. + + + + + + - - - - - Suspend and Resume functionality. - - - The functionality of chThdSuspendTimeoutS() and chThdResumeI() is tested. - - - - - - - - - - - - - + + + + Suspend and Resume functionality. + + + The functionality of chThdSuspendTimeoutS() and + chThdResumeI() is tested. + + + + + + + + + + + + + - - - - - - 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. - - - - - - + + + + + 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. + + + + + + - - - - - The function chThdSuspendTimeoutS() is invoked, the thread is not resumed so a timeout must occur. On return the message and the state of the reference are tested. - - - - - - + + + + The function chThdSuspendTimeoutS() is invoked, + the thread is not resumed so a timeout must occur. On + return the message and the state of the reference are + tested. + + + + + + - - - - - - - - - Internal Tests - - - Counter Semaphores. - - - This sequence tests the ChibiOS/RT functionalities related to counter semaphores. - - - CH_CFG_USE_SEMAPHORES - - - + + + + + + + + Internal Tests + + + Counter Semaphores. + + + This sequence tests the ChibiOS/RT functionalities + related to counter semaphores. + + + + + + - - - - - Semaphore primitives, no state change. - - - Wait, Signal and Reset primitives are tested. The testing thread does not trigger a state change. - - - - - - - - - - - - - - - - - - - The function chSemWait() is invoked, after return the counter and the returned message are tested. - - - - - - + + + + Semaphore primitives, no state change. + + + Wait, Signal and Reset primitives are tested. The + testing thread does not trigger a state change. + + + + + + + + + + + + + + + + + + + The function chSemWait() is invoked, after return + the counter and the returned message are tested. + + + + + + + - - - - - The function chSemSignal() is invoked, after return the counter is tested. - - - - - - + + + + The function chSemSignal() is invoked, after + return the counter is tested. + + + + + + - - - - - The function chSemReset() is invoked, after return the counter is tested. - - - - - - + + + + The function chSemReset() is invoked, after + return the counter is tested. + + + + + + - - - - - - - Semaphore enqueuing test. - - - Five threads with randomized priorities are enqueued to a semaphore then awakened one at time. The test expects that the threads reach their goal in FIFO order or priority order depending on the @p CH_CFG_USE_SEMAPHORES_PRIORITY configuration setting. - - - - - - - - - - - - - - - - - - - Five threads are created with mixed priority levels (not increasing nor decreasing). Threads enqueue on a semaphore initialized to zero. - - - - - - + + + + + + Semaphore enqueuing test. + + + Five threads with randomized priorities are enqueued + to a semaphore then awakened one at time. The test expects + that the threads reach their goal in FIFO order or + priority order depending on the @p + CH_CFG_USE_SEMAPHORES_PRIORITY configuration setting. + + + + + + + + + + + + + + + + + + + + Five threads are created with mixed priority + levels (not increasing nor decreasing). Threads + enqueue on a semaphore initialized to zero. + + + + + + - - - - - The semaphore is signaled 5 times. The thread activation sequence is tested. - - - - - - + + + + The semaphore is signaled 5 times. The thread + activation sequence is tested. + + + + + + - - - - - - - Semaphore timeout test. - - - The three possible semaphore waiting modes (do not wait, wait with timeout, wait without timeout) are explored. The test expects that the semaphore wait function returns the correct value in each of the above scenario and that the semaphore structure status is correct after each operation. - - - - - - - - - - - - - + + + + + + Semaphore timeout test. + + + The three possible semaphore waiting modes (do not + wait, wait with timeout, wait without timeout) are + explored. The test expects that the semaphore wait + function returns the correct value in each of the above + scenario and that the semaphore structure status is + correct after each operation. + + + + + + + + + + + + + - - - - - - Testing special case TIME_IMMEDIATE. - - - - - - + + + + + Testing special case TIME_IMMEDIATE. + + + + + + - - - - - Testing non-timeout condition. - - - - - - + + + + Testing non-timeout condition. + + + + + + - - - - - Testing timeout condition. - - - - - - + + + + Testing timeout condition. + + + + + + - - - - - - - Testing chSemAddCounterI() functionality. - - - The functon is tested by waking up a thread then the semaphore counter value is tested. - - - - - - - - - - - - - - - - - - - A thread is created, it goes to wait on the semaphore. - - - - - - - - - - - The semaphore counter is increased by two, it is then tested to be one, the thread must have completed. - - - - - - + + + + + + Testing chSemAddCounterI() functionality. + + + The functon is tested by waking up a thread then the + semaphore counter value is tested. + + + + + + + + + + + + + + + + + + + A thread is created, it goes to wait on the + semaphore. + + + + + + + + + + + The semaphore counter is increased by two, it is + then tested to be one, the thread must have completed. + + + + + + + - - - - - - - Testing chSemWaitSignal() functionality. - - - This test case explicitly addresses the @p chSemWaitSignal() function. A thread is created that performs a wait and a signal operations. The tester thread is awakened from an atomic wait/signal operation. The test expects that the semaphore wait function returns the correct value in each of the above scenario and that the semaphore structure status is correct after each operation. - - - - - - - - - - - - - - - - - - - An higher priority thread is created that performs non-atomical wait and signal operations on a semaphore. - - - - - - - - - - - The function chSemSignalWait() is invoked by specifying the same semaphore for the wait and signal phases. The counter value must be one on exit. - - - - - - + + + + + + Testing chSemWaitSignal() functionality. + + + This test case explicitly addresses the @p + chSemWaitSignal() function. A thread is created that + performs a wait and a signal operations. The tester thread + is awakened from an atomic wait/signal operation. The test + expects that the semaphore wait function returns the + correct value in each of the above scenario and that the + semaphore structure status is correct after each + operation. + + + + + + + + + + + + + + + + + + + An higher priority thread is created that + performs non-atomical wait and signal operations on a + semaphore. + + + + + + + + + + + The function chSemSignalWait() is invoked by + specifying the same semaphore for the wait and signal + phases. The counter value must be one on exit. + + + + + + - - - - - The function chSemSignalWait() is invoked again by specifying the same semaphore for the wait and signal phases. The counter value must be one on exit. - - - - - - + + + + The function chSemSignalWait() is invoked again + by specifying the same semaphore for the wait and + signal phases. The counter value must be one on exit. + + + + + + + - - - - - - - Testing Binary Semaphores special case. - - - This test case tests the binary semaphores functionality. The test both checks the binary semaphore status and the expected status of the underlying counting semaphore. - - - - - - - - - - - - - + + + + + + Testing Binary Semaphores special case. + + + This test case tests the binary semaphores + functionality. The test both checks the binary semaphore + status and the expected status of the underlying counting + semaphore. + + + + + + + + + + + + + - - - - - - Creating a binary semaphore in "taken" state, the state is checked. - - - - - - + + + + + Creating a binary semaphore in "taken" state, the + state is checked. + + + + + + - - - - - Resetting the binary semaphore in "taken" state, the state must not change. - - - - - - + + + + Resetting the binary semaphore in "taken" state, + the state must not change. + + + + + + - - - - - Starting a signaler thread at a lower priority. - - - - - - + + + + Starting a signaler thread at a lower priority. + + + + + + + - - - - - Waiting for the binary semaphore to be signaled, the semaphore is expected to be taken. - - - - - - + + + + Waiting for the binary semaphore to be signaled, + the semaphore is expected to be taken. + + + + + + - - - - - Signaling the binary semaphore, checking the binary semaphore state to be "not taken" and the underlying counter semaphore counter to be one. - - - - - - + + + + Signaling the binary semaphore, checking the + binary semaphore state to be "not taken" and the + underlying counter semaphore counter to be one. + + + + + + + - - - - - Signaling the binary semaphore again, the internal state must not change from "not taken". - - - - - - + + + + Signaling the binary semaphore again, the + internal state must not change from "not taken". + + + + + + + - - - - - - - - - Internal Tests - - - Mutexes, Condition Variables and Priority Inheritance. - - - This sequence tests the ChibiOS/RT functionalities related to mutexes, condition variables and priority inheritance algorithm. - - - CH_CFG_USE_MUTEXES - - - + + + + + + + + Internal Tests + + + Mutexes, Condition Variables and Priority Inheritance. + + + + This sequence tests the ChibiOS/RT functionalities + related to mutexes, condition variables and priority + inheritance algorithm. + + + + + + - - - - - Priority enqueuing test. - - - Five threads, with increasing priority, are enqueued on a locked mutex then the mutex is unlocked. The test expects the threads to perform their operations in increasing priority order regardless of the initial order. - - - - - - - - - - - - - - - - - - - Getting the initial priority. - - - - - - - - - - - Locking the mutex. - - - - - - - - - - - Five threads are created that try to lock and unlock the mutex then terminate. The threads are created in ascending priority order. - - - - - - + + + + Priority enqueuing test. + + + Five threads, with increasing priority, are enqueued + on a locked mutex then the mutex is unlocked. The test + expects the threads to perform their operations in + increasing priority order regardless of the initial order. + + + + + + + + + + + + + + + + + + + + Getting the initial priority. + + + + + + + + + + + Locking the mutex. + + + + + + + + + + + Five threads are created that try to lock and + unlock the mutex then terminate. The threads are + created in ascending priority order. + + + + + + - - - - - Unlocking the mutex, the threads will wakeup in priority order because the mutext queue is an ordered one. - - - - - - + + + + Unlocking the mutex, the threads will wakeup in + priority order because the mutext queue is an ordered + one. + + + + + + - - - - - - - Priority inheritance, simple case. - - - Three threads are involved in the classic priority inversion scenario, a medium priority thread tries to starve an high priority thread by blocking a low priority thread into a mutex lock zone. The test expects the threads to reach their goal in increasing priority order by rearranging their priorities in order to avoid the priority inversion trap. - - - CH_DBG_THREADS_PROFILING - - - - - - - - - - - - - - - - Getting the system time for test duration measurement. - - - - - - - - - - - The three contenders threads are created and let run atomically, the goals sequence is tested, the threads must complete in priority order. - - - - - - + + + + + + Priority inheritance, simple case. + + + Three threads are involved in the classic priority + inversion scenario, a medium priority thread tries to + starve an high priority thread by blocking a low priority + thread into a mutex lock zone. The test expects the + threads to reach their goal in increasing priority order + by rearranging their priorities in order to avoid the + priority inversion trap. + + + + + + + + + + + + + + + + + + + Getting the system time for test duration + measurement. + + + + + + + + + + + The three contenders threads are created and let + run atomically, the goals sequence is tested, the + threads must complete in priority order. + + + + + + - - - - - Testing that all threads completed within the specified time windows (100mS...100mS+ALLOWED_DELAY). - - - - - - + + + + Testing that all threads completed within the + specified time windows (100mS...100mS+ALLOWED_DELAY). + + + + + + + - - - - - - - Priority inheritance, complex case. - - - Five threads are involved in the complex priority inversion scenario, the priority inheritance algorithm is tested for depths greater than one. The test expects the threads to perform their operations in increasing priority order by rearranging their priorities in order to avoid the priority inversion trap. - - - CH_DBG_THREADS_PROFILING - - - - + + + + + + Priority inheritance, complex case. + + + Five threads are involved in the complex priority + inversion scenario, the priority inheritance algorithm is + tested for depths greater than one. The test expects the + threads to perform their operations in increasing priority + order by rearranging their priorities in order to avoid + the priority inversion trap. + + + + + + + - - - - - - - - - - - - Getting the system time for test duration measurement. - - - - - - - - - - - The five contenders threads are created and let run atomically, the goals sequence is tested, the threads must complete in priority order. - - - - - - + + + + + + + + + + + Getting the system time for test duration + measurement. + + + + + + + + + + + The five contenders threads are created and let + run atomically, the goals sequence is tested, the + threads must complete in priority order. + + + + + + - - - - - Testing that all threads completed within the specified time windows (110mS...110mS+ALLOWED_DELAY). - - - - - - + + + + Testing that all threads completed within the + specified time windows (110mS...110mS+ALLOWED_DELAY). + + + + + + + - - - - - - - Priority return verification. - - - Two threads are spawned that try to lock the mutexes already locked by the tester thread with precise timing. The test expects that the priority changes caused by the priority inheritance algorithm happen at the right moment and with the right values.<br> -Thread A performs wait(50), lock(m1), unlock(m1), exit. Thread B performs wait(150), lock(m2), unlock(m2), exit. - - - - - - - + + + + + + Priority return verification. + + + Two threads are spawned that try to lock the mutexes + already locked by the tester thread with precise timing. + The test expects that the priority changes caused by the + priority inheritance algorithm happen at the right moment + and with the right values.<br> + Thread A performs wait(50), lock(m1), unlock(m1), exit. Thread B + performs wait(150), lock(m2), unlock(m2), exit. + + + + + + + + - - - - - - - - - - - - Getting current thread priority P(0) and assigning to the threads A and B priorities +1 and +2. - - - - - - + + + + + + + + + + + Getting current thread priority P(0) and + assigning to the threads A and B priorities +1 and +2. + + + + + + + - - - - - Spawning threads A and B at priorities P(A) and P(B). - - - - - - + + + + Spawning threads A and B at priorities P(A) and + P(B). + + + + + + - - - - - Locking the mutex M1 before thread A has a chance to lock it. The priority must not change because A has not yet reached chMtxLock(M1). the mutex is not locked. - - - - - - + + + + Locking the mutex M1 before thread A has a chance + to lock it. The priority must not change because A has + not yet reached chMtxLock(M1). the mutex is not + locked. + + + + + + - - - - - Waiting 100mS, this makes thread A reach chMtxLock(M1) and get the mutex. This must boost the priority of the current thread at the same level of thread A. - - - - - - + + + + Waiting 100mS, this makes thread A reach + chMtxLock(M1) and get the mutex. This must boost the + priority of the current thread at the same level of + thread A. + + + + + + - - - - - Locking the mutex M2 before thread B has a chance to lock it. The priority must not change because B has not yet reached chMtxLock(M2). the mutex is not locked. - - - - - - + + + + Locking the mutex M2 before thread B has a chance + to lock it. The priority must not change because B has + not yet reached chMtxLock(M2). the mutex is not + locked. + + + + + + - - - - - Waiting 100mS, this makes thread B reach chMtxLock(M2) and get the mutex. This must boost the priority of the current thread at the same level of thread B. - - - - - - + + + + Waiting 100mS, this makes thread B reach + chMtxLock(M2) and get the mutex. This must boost the + priority of the current thread at the same level of + thread B. + + + + + + - - - - - Unlocking M2, the priority should fall back to P(A). - - - - - - + + + + Unlocking M2, the priority should fall back to + P(A). + + + + + + - - - - - Unlocking M1, the priority should fall back to P(0). - - - - - - + + + + Unlocking M1, the priority should fall back to + P(0). + + + + + + - - - - - - - Repeated locks, non recursive scenario. - - - The behavior of multiple mutex locks from the same thread is tested when recursion is disabled - - - !CH_CFG_USE_MUTEXES_RECURSIVE - - - - - - - - - - + + + + + + Repeated locks, non recursive scenario. + + + The behavior of multiple mutex locks from the same + thread is tested when recursion is disabled + + + + + + + + + + + + + - - - - - - Getting current thread priority for later checks. - - - - - - - - - - - Locking the mutex first time, it must be possible because it is not owned. - - - - - - + + + + + Getting current thread priority for later checks. + + + + + + + + + + + + Locking the mutex first time, it must be possible + because it is not owned. + + + + + + - - - - - Locking the mutex second time, it must fail because it is already owned. - - - - - - + + + + Locking the mutex second time, it must fail + because it is already owned. + + + + + + - - - - - Unlocking the mutex then it must not be owned anymore and the queue must be empty. - - - - - - + + + + Unlocking the mutex then it must not be owned + anymore and the queue must be empty. + + + + + + - - - - - Testing that priority has not changed after operations. - - - - - - - - - - - Testing chMtxUnlockAll() behavior. - - - - - - + + + + Testing that priority has not changed after + operations. + + + + + + + + + + + Testing chMtxUnlockAll() behavior. + + + + + + - - - - - Testing that priority has not changed after operations. - - - - - - - - - - - - - Repeated locks using, recursive scenario. - - - The behavior of multiple mutex locks from the same thread is tested when recursion is enabled - - - CH_CFG_USE_MUTEXES_RECURSIVE - - - - - - - - - - + + + + Testing that priority has not changed after + operations. + + + + + + + + + + + + + Repeated locks using, recursive scenario. + + + The behavior of multiple mutex locks from the same + thread is tested when recursion is enabled + + + + + + + + + + + + + - - - - - - Getting current thread priority for later checks. - - - - - - - - - - - Locking the mutex first time, it must be possible because it is not owned. - - - - - - + + + + + Getting current thread priority for later checks. + + + + + + + + + + + + Locking the mutex first time, it must be possible + because it is not owned. + + + + + + - - - - - Locking the mutex second time, it must be possible because it is recursive. - - - - - - + + + + Locking the mutex second time, it must be + possible because it is recursive. + + + + + + - - - - - Unlocking the mutex then it must be still owned because recursivity. - - - - - - + + + + Unlocking the mutex then it must be still owned + because recursivity. + + + + + + - - - - - Unlocking the mutex then it must not be owned anymore and the queue must be empty. - - - - - - + + + + Unlocking the mutex then it must not be owned + anymore and the queue must be empty. + + + + + + - - - - - Testing that priority has not changed after operations. - - - - - - - - - - - Testing consecutive chMtxTryLock()/chMtxTryLockS() calls and a final chMtxUnlockAllS(). - - - - - - + + + + Testing that priority has not changed after + operations. + + + + + + + + + + + Testing consecutive + chMtxTryLock()/chMtxTryLockS() calls and a final + chMtxUnlockAllS(). + + + + + + - - - - - Testing consecutive chMtxLock()/chMtxLockS() calls and a final chMtxUnlockAll(). - - - - - - + + + + Testing consecutive chMtxLock()/chMtxLockS() + calls and a final chMtxUnlockAll(). + + + + + + - - - - - Testing that priority has not changed after operations. - - - - - - - - - - - - - Condition Variable signal test. - - - Five threads take a mutex and then enter a conditional variable queue, the tester thread then proceeds to signal the conditional variable five times atomically.<br> -The test expects the threads to reach their goal in increasing priority order regardless of the initial order. - - - CH_CFG_USE_CONDVARS - - - - + + + + Testing that priority has not changed after + operations. + + + + + + + + + + + + + Condition Variable signal test. + + + Five threads take a mutex and then enter a + conditional variable queue, the tester thread then + proceeds to signal the conditional variable five times + atomically.<br> + The test expects the threads to reach their goal in increasing + priority order regardless of the initial order. + + + + + + + + - - - - - - - - - - - - Starting the five threads with increasing priority, the threads will queue on the condition variable. - - - - - - + + + + + + + + + + + Starting the five threads with increasing + priority, the threads will queue on the condition + variable. + + + + + + - - - - - Atomically signaling the condition variable five times then waiting for the threads to terminate in priority order, the order is tested. - - - - - - + + + + Atomically signaling the condition variable five + times then waiting for the threads to terminate in + priority order, the order is tested. + + + + + + - - - - - - - Condition Variable broadcast test. - - - Five threads take a mutex and then enter a conditional variable queue, the tester thread then proceeds to broadcast the conditional variable.<br> -The test expects the threads to reach their goal in increasing priority order regardless of the initial order. - - - CH_CFG_USE_CONDVARS - - - - + + + + + + Condition Variable broadcast test. + + + Five threads take a mutex and then enter a + conditional variable queue, the tester thread then + proceeds to broadcast the conditional + variable.<br> + The test expects the threads to reach their goal in increasing + priority order regardless of the initial order. + + + + + + + + - - - - - - - - - - - - Starting the five threads with increasing priority, the threads will queue on the condition variable. - - - - - - + + + + + + + + + + + Starting the five threads with increasing + priority, the threads will queue on the condition + variable. + + + + + + - - - - - Broarcasting on the condition variable then waiting for the threads to terminate in priority order, the order is tested. - - - - - - + + + + Broarcasting on the condition variable then + waiting for the threads to terminate in priority + order, the order is tested. + + + + + + - - - - - - - Condition Variable priority boost test. - - - This test case verifies the priority boost of a thread waiting on a conditional variable queue. It tests this very specific situation in order to improve code coverage. The created threads perform the following operations: TA{lock(M2), lock(M1), wait(C1), unlock(M1), unlock(M2)}, TB{lock(M2), wait(C1), unlock(M2)}. TC{lock(M1), unlock(M1)}. - - - CH_CFG_USE_CONDVARS - - - - + + + + + + Condition Variable priority boost test. + + + This test case verifies the priority boost of a + thread waiting on a conditional variable queue. It tests + this very specific situation in order to improve code + coverage. The created threads perform the following + operations: TA{lock(M2), lock(M1), wait(C1), unlock(M1), + unlock(M2)}, TB{lock(M2), wait(C1), unlock(M2)}. + TC{lock(M1), unlock(M1)}. + + + + + + + - - - - - - - - - - - - Reading current base priority. - - - - - - - - - - - Thread A is created at priority P(+1), it locks M2, locks M1 and goes to wait on C1. - - - - - - - - - - - Thread C is created at priority P(+2), it enqueues on M1 and boosts TA priority at P(+2). - - - - - - - - - - - Thread B is created at priority P(+3), it enqueues on M2 and boosts TA priority at P(+3). - - - - - - - - - - - Signaling C1: TA wakes up, unlocks M1 and priority goes to P(+2). TB locks M1, unlocks M1 and completes. TA unlocks M2 and priority goes to P(+1). TC waits on C1. TA completes. - - - - - - - - - - - Signaling C1: TC wakes up, unlocks M1 and completes. - - - - - - - - - - - Checking the order of operations. - - - - - - + + + + + + + + + + + Reading current base priority. + + + + + + + + + + + Thread A is created at priority P(+1), it locks + M2, locks M1 and goes to wait on C1. + + + + + + + + + + + Thread C is created at priority P(+2), it + enqueues on M1 and boosts TA priority at P(+2). + + + + + + + + + + + + Thread B is created at priority P(+3), it + enqueues on M2 and boosts TA priority at P(+3). + + + + + + + + + + + + Signaling C1: TA wakes up, unlocks M1 and + priority goes to P(+2). TB locks M1, unlocks M1 and + completes. TA unlocks M2 and priority goes to P(+1). + TC waits on C1. TA completes. + + + + + + + + + + + Signaling C1: TC wakes up, unlocks M1 and + completes. + + + + + + + + + + + Checking the order of operations. + + + + + + - - - - - - - - - Internal Tests - - - Synchronous Messages. - - - This module implements the test sequence for the Synchronous Messages subsystem. - - - CH_CFG_USE_MESSAGES - - - + + + + + + + + Internal Tests + + + Synchronous Messages. + + + This module implements the test sequence for the + Synchronous Messages subsystem. + + + + + + - - - - - Messages Server loop. - - - A messenger thread is spawned that sends four messages back to the tester thread.<br> -The test expect to receive the messages in the correct sequence and to not find a fifth message waiting. - - - - - - - - - - - - - + + + + Messages Server loop. + + + A messenger thread is spawned that sends four + messages back to the tester thread.<br> + The test expect to receive the messages in the correct sequence and + to not find a fifth message waiting. + + + + + + + + + + + + + + - - - - - - Starting the messenger thread. - - - - - - + + + + + Starting the messenger thread. + + + + + + - - - - - Waiting for four messages then testing the receive order. - - - - - - + + + + Waiting for four messages then testing the + receive order. + + + + + + - - - - - - - - - Internal Tests - - - Event Sources and Event Flags. - - - This module implements the test sequence for the Events subsystem. - - - CH_CFG_USE_EVENTS - - - + + + + + + + + Internal Tests + + + Event Sources and Event Flags. + + + This module implements the test sequence for the Events + subsystem. + + + + + + - - - - - Events registration. - - - Two event listeners are registered on an event source and then unregistered in the same order.<br> -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. - - - - - - - - - - - - - - - - - - - An Event Source is initialized. - - - - - - - - - - - Two Event Listeners are registered on the Event Source, the Event Source is tested to have listeners. - - - - - - + + + + Events registration. + + + Two event listeners are registered on an event source + and then unregistered in the same order.<br> + 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. + + + + + + + + + + + + + + + + + + + + An Event Source is initialized. + + + + + + + + + + + Two Event Listeners are registered on the Event + Source, the Event Source is tested to have listeners. + + + + + + + - - - - - An Event Listener is unregistered, the Event Source must still have listeners. - - - - - - + + + + An Event Listener is unregistered, the Event + Source must still have listeners. + + + + + + - - - - - An Event Listener is unregistered, the Event Source must not have listeners. - - - - - - + + + + An Event Listener is unregistered, the Event + Source must not have listeners. + + + + + + - - - - - - - Event Flags dispatching. - - - The test dispatches three event flags and verifies that the associated event handlers are invoked in LSb-first order. - - - - - - - - - - - - - - - - - - - Three evenf flag bits are raised then chEvtDispatch() is invoked, the sequence of handlers calls is tested. - - - - - - + + + + + + Event Flags dispatching. + + + The test dispatches three event flags and verifies + that the associated event handlers are invoked in + LSb-first order. + + + + + + + + + + + + + + + + + + + Three evenf flag bits are raised then + chEvtDispatch() is invoked, the sequence of handlers + calls is tested. + + + + + + - - - - - - - Events Flags wait using chEvtWaitOne(). - - - Functionality of chEvtWaitOne() is tested under various scenarios. - - - - - - - - - - - - - + + + + + + Events Flags wait using chEvtWaitOne(). + + + Functionality of chEvtWaitOne() is tested under + various scenarios. + + + + + + + + + + + + + - - - - - - Setting three event flags. - - - - - - - - - - - Calling chEvtWaitOne() three times, each time a single flag must be returned in order of priority. - - - - - - + + + + + Setting three event flags. + + + + + + + + + + + Calling chEvtWaitOne() three times, each time a + single flag must be returned in order of priority. + + + + + + + - - - - - Getting current time and starting a signaler thread, the thread will set an event flag after 50mS. - - - - - - + + + + Getting current time and starting a signaler + thread, the thread will set an event flag after 50mS. + + + + + + + - - - - - Calling chEvtWaitOne() then verifying that the event has been received after 50mS and that the event flags mask has been emptied. - - - - - - + + + + Calling chEvtWaitOne() then verifying that the + event has been received after 50mS and that the event + flags mask has been emptied. + + + + + + - - - - - - - Events Flags wait using chEvtWaitAny(). - - - Functionality of chEvtWaitAny() is tested under various scenarios. - - - - - - - - - - - - - + + + + + + Events Flags wait using chEvtWaitAny(). + + + Functionality of chEvtWaitAny() is tested under + various scenarios. + + + + + + + + + + + + + - - - - - - Setting two, non contiguous, event flags. - - - - - - - - - - - Calling chEvtWaitAny() one time, the two flags must be returned. - - - - - - + + + + + Setting two, non contiguous, event flags. + + + + + + + + + + + Calling chEvtWaitAny() one time, the two flags + must be returned. + + + + + + - - - - - Getting current time and starting a signaler thread, the thread will set an event flag after 50mS. - - - - - - + + + + Getting current time and starting a signaler + thread, the thread will set an event flag after 50mS. + + + + + + + - - - - - Calling chEvtWaitAny() then verifying that the event has been received after 50mS and that the event flags mask has been emptied. - - - - - - + + + + Calling chEvtWaitAny() then verifying that the + event has been received after 50mS and that the event + flags mask has been emptied. + + + + + + - - - - - - - Events Flags wait using chEvtWaitAll(). - - - Functionality of chEvtWaitAll() is tested under various scenarios. - - - - - - - - - - - - - + + + + + + Events Flags wait using chEvtWaitAll(). + + + Functionality of chEvtWaitAll() is tested under + various scenarios. + + + + + + + + + + + + + - - - - - - Setting two, non contiguous, event flags. - - - - - - - - - - - Calling chEvtWaitAll() one time, the two flags must be returned. - - - - - - + + + + + Setting two, non contiguous, event flags. + + + + + + + + + + + Calling chEvtWaitAll() one time, the two flags + must be returned. + + + + + + - - - - - Setting one event flag. - - - - - - - - - - - Getting current time and starting a signaler thread, the thread will set another event flag after 50mS. - - - - - - + + + + Setting one event flag. + + + + + + + + + + + Getting current time and starting a signaler + thread, the thread will set another event flag after + 50mS. + + + + + + - - - - - Calling chEvtWaitAll() then verifying that both event flags have been received after 50mS and that the event flags mask has been emptied. - - - - - - + + + + Calling chEvtWaitAll() then verifying that both + event flags have been received after 50mS and that the + event flags mask has been emptied. + + + + + + - - - - - - - Events Flags wait timeouts. - - - Timeout functionality is tested for chEvtWaitOneTimeout(), chEvtWaitAnyTimeout() and chEvtWaitAllTimeout(). - - - CH_CFG_USE_EVENTS_TIMEOUT - - - - - - - - - - - - - - - - The functions are invoked first with TIME_IMMEDIATE timeout, the timeout condition is tested. - - - - - - + + + + + + Events Flags wait timeouts. + + + Timeout functionality is tested for + chEvtWaitOneTimeout(), chEvtWaitAnyTimeout() and + chEvtWaitAllTimeout(). + + + + + + + + + + + + + + + + + + + The functions are invoked first with + TIME_IMMEDIATE timeout, the timeout condition is + tested. + + + + + + - - - - - The functions are invoked first with a 50mS timeout, the timeout condition is tested. - - - - - - + + + + The functions are invoked first with a 50mS + timeout, the timeout condition is tested. + + + + + + - - - - - - - Broadcasting using chEvtBroadcast(). - - - Functionality of chEvtBroadcast() is tested. - - - - - - - + + + + + + Broadcasting using chEvtBroadcast(). + + + Functionality of chEvtBroadcast() is tested. + + + + + + + - - - - - - + + + + + - - - - - - Registering on two event sources associating them with flags 1 and 4. - - - - - - + + + + + Registering on two event sources associating them + with flags 1 and 4. + + + + + + - - - - - Getting current time and starting a broadcaster thread, the thread broadcast the first Event Source immediately and the other after 50mS. - - - - - - + + + + Getting current time and starting a broadcaster + thread, the thread broadcast the first Event Source + immediately and the other after 50mS. + + + + + + - - - - - Calling chEvtWaitAll() then verifying that both event flags have been received after 50mS and that the event flags mask has been emptied. - - - - - - + + + + Calling chEvtWaitAll() then verifying that both + event flags have been received after 50mS and that the + event flags mask has been emptied. + + + + + + - - - - - Unregistering from the Event Sources. - - - - - - + + + + Unregistering from the Event Sources. + + + + + + - - - - - - - - - Internal Tests - - - Dynamic threads. - - - This module implements the test sequence for the dynamic thread creation APIs. - - - CH_CFG_USE_DYNAMIC - - - + + + + + + + + Internal Tests + + + Dynamic threads. + + + This module implements the test sequence for the dynamic + thread creation APIs. + + + + + + - - - - - Threads creation from Memory Heap. - - - Two threads are started by allocating the memory from the Memory Heap then a third thread is started with a huge stack requirement.<br> -The test expects the first two threads to successfully start and the third one to fail. - - - CH_CFG_USE_HEAP - - - - - - - - - - + + + + Threads creation from Memory Heap. + + + Two threads are started by allocating the memory from + the Memory Heap then a third thread is started with a huge + stack requirement.<br> + The test expects the first two threads to successfully start and the + third one to fail. + + + + + + + + + + + + + + - - - - - - Getting base priority for threads. - - - - - - - - - - - Getting heap info before the test. - - - - - - + + + + + Getting base priority for threads. + + + + + + + + + + + Getting heap info before the test. + + + + + + - - - - - Creating thread 1, it is expected to succeed. - - - - - - + + + + Creating thread 1, it is expected to succeed. + + + + + + + - - - - - Creating thread 2, it is expected to succeed. - - - - - - + + + + Creating thread 2, it is expected to succeed. + + + + + + + - - - - - Creating thread 3, it is expected to fail - - - - - - + + + + Creating thread 3, it is expected to fail + + + + + + > 1U) + 1U, "dyn3", prio-3, dyn_thread1, "C"); test_assert(threads[2] == NULL, "thread creation not failed");]]> - - - - - Letting threads execute then checking the start order and freeing memory. - - - - - - + + + + Letting threads execute then checking the start + order and freeing memory. + + + + + + - - - - - Getting heap info again for verification. - - - - - - + + + + Getting heap info again for verification. + + + + + + - - - - - - - Threads creation from Memory Pool. - - - Five thread creation are attempted from a pool containing only four elements.<br> -The test expects the first four threads to successfully start and the last one to fail. - - - CH_CFG_USE_MEMPOOLS - - - - - - - - - - + + + + + + Threads creation from Memory Pool. + + + Five thread creation are attempted from a pool + containing only four elements.<br> + The test expects the first four threads to successfully start and + the last one to fail. + + + + + + + + + + + + + + - - - - - - Adding four working areas to the pool. - - - - - - + + + + + Adding four working areas to the pool. + + + + + + - - - - - Getting base priority for threads. - - - - - - - - - - - Creating the five threads. - - - - - - + + + + Getting base priority for threads. + + + + + + + + + + + Creating the five threads. + + + + + + - - - - - Testing that only the fifth thread creation failed. - - - - - - + + + + Testing that only the fifth thread creation + failed. + + + + + + - - - - - Letting them run, free the memory then checking the execution sequence. - - - - - - + + + + Letting them run, free the memory then checking + the execution sequence. + + + + + + - - - - - Testing that the pool contains four elements again. - - - - - - + + + + Testing that the pool contains four elements + again. + + + + + + - - - - - - - - - Benchmarks - - - Benchmarks. - - - 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.<br> -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. - - - - - - + + + + + + + + Benchmarks + + + Benchmarks. + + + 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.<br> + 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. + + + + + + + - - - - - Messages performance #1. - - - 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. - - - CH_CFG_USE_MESSAGES - - - - - - - - - - - - - - - - The messenger thread is started at a lower priority than the current thread. - - - - - - - - - - - The number of messages exchanged is counted in a one second time window. - - - - - - + + + + Messages performance #1. + + + 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. + + + + + + + + + + + + + + + + + + + The messenger thread is started at a lower + priority than the current thread. + + + + + + + + + + + The number of messages exchanged is counted in a + one second time window. + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Messages performance #2. - - - 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. - - - CH_CFG_USE_MESSAGES - - - - - - - - - - - - - - - - The messenger thread is started at an higher priority than the current thread. - - - - - - - - - - - The number of messages exchanged is counted in a one second time window. - - - - - - + + + + + + Messages performance #2. + + + 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. + + + + + + + + + + + + + + + + + + + The messenger thread is started at an higher + priority than the current thread. + + + + + + + + + + + The number of messages exchanged is counted in a + one second time window. + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Messages performance #3. - - - A message server thread is created with an higher priority than the client thread, four lower priority threads crowd the ready list, the messages throughput per second is measured while the ready list and the result printed on the output log. - - - CH_CFG_USE_MESSAGES - - - - - - - - - - - - - - - - The messenger thread is started at an higher priority than the current thread. - - - - - - - - - - - Four threads are started at a lower priority than the current thread. - - - - - - + + + + + + Messages performance #3. + + + A message server thread is created with an higher + priority than the client thread, four lower priority + threads crowd the ready list, the messages throughput per + second is measured while the ready list and the result + printed on the output log. + + + + + + + + + + + + + + + + + + + The messenger thread is started at an higher + priority than the current thread. + + + + + + + + + + + Four threads are started at a lower priority than + the current thread. + + + + + + - - - - - The number of messages exchanged is counted in a one second time window. - - - - - - + + + + The number of messages exchanged is counted in a + one second time window. + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Context Switch performance. - - - 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.<br> -The Context Switch performance is calculated by measuring the number of iterations after a second of continuous operations. - - - - - - - - - - - - - + + + + + + Context Switch performance. + + + 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.<br> + The Context Switch performance is calculated by measuring the number + of iterations after a second of continuous operations. + + + + + + + + + + + + + + - - - - - - Starting the target thread at an higher priority level. - - - - - - + + + + + Starting the target thread at an higher priority + level. + + + + + + - - - - - Waking up the thread as fast as possible in a one second time window. - - - - - - + + + + Waking up the thread as fast as possible in a one + second time window. + + + + + + - - - - - Stopping the target thread. - - - - - - + + + + Stopping the target thread. + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Threads performance, full cycle. - - - Threads are continuously created and terminated into a loop. A full chThdCreateStatic() / @p chThdExit() / @p chThdWait() cycle is performed in each iteration.<br> -The performance is calculated by measuring the number of iterations after a second of continuous operations. - - - - - - - - - - - - - + + + + + + Threads performance, full cycle. + + + Threads are continuously created and terminated into + a loop. A full chThdCreateStatic() / @p chThdExit() / @p + chThdWait() cycle is performed in each + iteration.<br> + The performance is calculated by measuring the number of iterations + after a second of continuous operations. + + + + + + + + + + + + + + - - - - - - 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. - - - - - - + + + + + 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. + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Threads performance, create/exit only. - - - 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.<br> The performance is calculated by measuring the number of iterations after a second of continuous operations. - - - - - - - - - - - - - + + + + + + Threads performance, create/exit only. + + + 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.<br> The performance is calculated by + measuring the number of iterations after a second of + continuous operations. + + + + + + + + + + + + + - - - - - - A thread is created at an higher priority level and let terminate immediately. The operation is repeated continuously in a one-second time window. - - - - - - + + + + + A thread is created at an higher priority level + and let terminate immediately. The operation is + repeated continuously in a one-second time window. + + + + + + + - - - - - Score is printed. - - - - - - + + + + Score is printed. + + + + + + - - - - - - - Mass reschedule performance. - - - Five threads are created and atomically rescheduled by resetting the semaphore where they are waiting on. The operation is performed into a continuous loop.<br> -The performance is calculated by measuring the number of iterations after a second of continuous operations. - - - CH_CFG_USE_SEMAPHORES - - - - - - - - - - - - - - - - Five threads are created at higher priority that immediately enqueue on a semaphore. - - - - - - + + + + + + Mass reschedule performance. + + + Five threads are created and atomically rescheduled + by resetting the semaphore where they are waiting on. The + operation is performed into a continuous + loop.<br> + The performance is calculated by measuring the number of iterations + after a second of continuous operations. + + + + + + + + + + + + + + + + + + + + Five threads are created at higher priority that + immediately enqueue on a semaphore. + + + + + + - - - - - The semaphore is reset waking up the five threads. The operation is repeated continuously in a one-second time window. - - - - - - + + + + The semaphore is reset waking up the five + threads. The operation is repeated continuously in a + one-second time window. + + + + + + - - - - - The five threads are terminated. - - - - - - + + + + The five threads are terminated. + + + + + + - - - - - The score is printed. - - - - - - + + + + The score is printed. + + + + + + - - - - - - - Round-Robin voluntary reschedule. - - - Five threads are created at equal priority, each thread just increases a variable and yields.<br> -The performance is calculated by measuring the number of iterations after a second of continuous operations. - - - - - - - - - - - - - - - - - - - The five threads are created at lower priority. The threds have equal priority and start calling @p chThdYield() continuously. - - - - - - + + + + + + Round-Robin voluntary reschedule. + + + Five threads are created at equal priority, each + thread just increases a variable and + yields.<br> + The performance is calculated by measuring the number of iterations + after a second of continuous operations. + + + + + + + + + + + + + + + + + + + + The five threads are created at lower priority. + The threds have equal priority and start calling @p + chThdYield() continuously. + + + + + + - - - - - Waiting one second then terminating the 5 threads. - - - - - - + + + + Waiting one second then terminating the 5 + threads. + + + + + + - - - - - The score is printed. - - - - - - + + + + The score is printed. + + + + + + - - - - - - - Virtual Timers set/reset performance. - - - A virtual timer is set and immediately reset into a continuous loop.<br> -The performance is calculated by measuring the number of iterations after a second of continuous operations. - - - - - - - - - - - - - + + + + + + Virtual Timers set/reset performance. + + + A virtual timer is set and immediately reset into a + continuous loop.<br> + The performance is calculated by measuring the number of iterations + after a second of continuous operations. + + + + + + + + + + + + + + - - - - - - Two timers are set then reset without waiting for their counter to elapse. The operation is repeated continuously in a one-second time window. - - - - - - + + + + + Two timers are set then reset without waiting for + their counter to elapse. The operation is repeated + continuously in a one-second time window. + + + + + + - - - - - The score is printed. - - - - - - + + + + The score is printed. + + + + + + - - - - - - - Semaphores wait/signal performance - - - A counting semaphore is taken/released into a continuous loop, no Context Switch happens because the counter is always non negative.<br> -The performance is calculated by measuring the number of iterations after a second of continuous operations. - - - CH_CFG_USE_SEMAPHORES - - - - - - - - - - - - - - - - A semaphore is teken and released. The operation is repeated continuously in a one-second time window. - - - - - - + + + + + + Semaphores wait/signal performance + + + A counting semaphore is taken/released into a + continuous loop, no Context Switch happens because the + counter is always non negative.<br> + The performance is calculated by measuring the number of iterations + after a second of continuous operations. + + + + + + + + + + + + + + + + + + + + A semaphore is teken and released. The operation + is repeated continuously in a one-second time window. + + + + + + + - - - - - The score is printed. - - - - - - + + + + The score is printed. + + + + + + - - - - - - - Mutexes lock/unlock performance - - - A mutex is locked/unlocked into a continuous loop, no Context Switch happens because there are no other threads asking for the mutex.<br> -The performance is calculated by measuring the number of iterations after a second of continuous operations. - - - CH_CFG_USE_MUTEXES - - - - - - - - - - - - - - - - A mutex is locked and unlocked. The operation is repeated continuously in a one-second time window. - - - - - - + + + + + + Mutexes lock/unlock performance + + + A mutex is locked/unlocked into a continuous loop, no + Context Switch happens because there are no other threads + asking for the mutex.<br> + The performance is calculated by measuring the number of iterations + after a second of continuous operations. + + + + + + + + + + + + + + + + + + + + A mutex is locked and unlocked. The operation is + repeated continuously in a one-second time window. + + + + + + + - - - - - The score is printed. - - - - - - + + + + The score is printed. + + + + + + - - - - - - - RAM Footprint. - - - The memory size of the various kernel objects is printed. - - - - - - - - - - - - - - - - - - - The size of the system area is printed. - - - - - - + + + + + + RAM Footprint. + + + The memory size of the various kernel objects is + printed. + + + + + + + + + + + + + + + + + + + The size of the system area is printed. + + + + + + - - - - - The size of a thread structure is printed. - - - - - - + + + + The size of a thread structure is printed. + + + + + + + - - - - - The size of a virtual timer structure is printed. - - - - - - + + + + The size of a virtual timer structure is printed. + + + + + + + - - - - - The size of a semaphore structure is printed. - - - - - - + + + + The size of a semaphore structure is printed. + + + + + + + - - - - - The size of a mutex is printed. - - - - - - + + + + The size of a mutex is printed. + + + + + + - - - - - The size of a condition variable is printed. - - - - - - + + + + The size of a condition variable is printed. + + + + + + + - - - - - The size of an event source is printed. - - - - - - + + + + The size of an event source is printed. + + + + + + - - - - - The size of an event listener is printed. - - - - - - + + + + The size of an event listener is printed. + + + + + + - - - - - The size of a mailbox is printed. - - - - - - + + + + The size of a mailbox is printed. + + + + + + - - - - - - - - - - - - + + + + + + + + diff --git a/test/rt/source/test/rt_test_root.c b/test/rt/source/test/rt_test_root.c index 0db7ce8cf..0ea599684 100644 --- a/test/rt/source/test/rt_test_root.c +++ b/test/rt/source/test/rt_test_root.c @@ -60,19 +60,19 @@ const testsequence_t * const rt_test_suite_array[] = { &rt_test_sequence_004, &rt_test_sequence_005, &rt_test_sequence_006, -#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__) &rt_test_sequence_007, #endif -#if (CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MUTEXES == TRUE) || defined(__DOXYGEN__) &rt_test_sequence_008, #endif -#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__) &rt_test_sequence_009, #endif -#if (CH_CFG_USE_EVENTS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_EVENTS == TRUE) || defined(__DOXYGEN__) &rt_test_sequence_010, #endif -#if (CH_CFG_USE_DYNAMIC) || defined(__DOXYGEN__) +#if (CH_CFG_USE_DYNAMIC == TRUE) || defined(__DOXYGEN__) &rt_test_sequence_011, #endif &rt_test_sequence_012, diff --git a/test/rt/source/test/rt_test_sequence_005.c b/test/rt/source/test/rt_test_sequence_005.c index a85d3ac44..502db27f5 100644 --- a/test/rt/source/test/rt_test_sequence_005.c +++ b/test/rt/source/test/rt_test_sequence_005.c @@ -264,7 +264,7 @@ static const testcase_t rt_test_005_003 = { 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 * @@ -275,7 +275,7 @@ static const testcase_t rt_test_005_003 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MUTEXES + * - CH_CFG_USE_MUTEXES == TRUE * . * *

Test Steps

@@ -337,7 +337,7 @@ static const testcase_t rt_test_005_004 = { NULL, rt_test_005_004_execute }; -#endif /* CH_CFG_USE_MUTEXES */ +#endif /* CH_CFG_USE_MUTEXES == TRUE */ /**************************************************************************** * Exported data. @@ -350,7 +350,7 @@ const testcase_t * const rt_test_sequence_005_array[] = { &rt_test_005_001, &rt_test_005_002, &rt_test_005_003, -#if (CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MUTEXES == TRUE) || defined(__DOXYGEN__) &rt_test_005_004, #endif NULL diff --git a/test/rt/source/test/rt_test_sequence_007.c b/test/rt/source/test/rt_test_sequence_007.c index 59791c7b5..faee69646 100644 --- a/test/rt/source/test/rt_test_sequence_007.c +++ b/test/rt/source/test/rt_test_sequence_007.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_SEMAPHORES + * - CH_CFG_USE_SEMAPHORES == TRUE * . * *

Test Cases

@@ -45,7 +45,7 @@ * . */ -#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -532,4 +532,4 @@ const testsequence_t rt_test_sequence_007 = { rt_test_sequence_007_array }; -#endif /* CH_CFG_USE_SEMAPHORES */ +#endif /* CH_CFG_USE_SEMAPHORES == TRUE */ diff --git a/test/rt/source/test/rt_test_sequence_008.c b/test/rt/source/test/rt_test_sequence_008.c index 748525675..3e0bc801d 100644 --- a/test/rt/source/test/rt_test_sequence_008.c +++ b/test/rt/source/test/rt_test_sequence_008.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MUTEXES + * - CH_CFG_USE_MUTEXES == TRUE * . * *

Test Cases

@@ -48,7 +48,7 @@ * . */ -#if (CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MUTEXES == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -305,7 +305,7 @@ static const testcase_t rt_test_008_001 = { 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 * @@ -320,7 +320,7 @@ static const testcase_t rt_test_008_001 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_DBG_THREADS_PROFILING + * - CH_DBG_THREADS_PROFILING == TRUE * . * *

Test Steps

@@ -377,9 +377,9 @@ static const testcase_t rt_test_008_002 = { NULL, 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 * @@ -393,7 +393,7 @@ static const testcase_t rt_test_008_002 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_DBG_THREADS_PROFILING + * - CH_DBG_THREADS_PROFILING == TRUE * . * *

Test Steps

@@ -453,7 +453,7 @@ static const testcase_t rt_test_008_003 = { NULL, 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 @@ -581,7 +581,7 @@ static const testcase_t rt_test_008_004 = { 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 * @@ -592,7 +592,7 @@ static const testcase_t rt_test_008_004 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - !CH_CFG_USE_MUTEXES_RECURSIVE + * - CH_CFG_USE_MUTEXES_RECURSIVE == FALSE * . * *

Test Steps

@@ -687,9 +687,9 @@ static const testcase_t rt_test_008_005 = { NULL, 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 * @@ -700,7 +700,7 @@ static const testcase_t rt_test_008_005 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MUTEXES_RECURSIVE + * - CH_CFG_USE_MUTEXES_RECURSIVE == TRUE * . * *

Test Steps

@@ -833,9 +833,9 @@ static const testcase_t rt_test_008_006 = { NULL, 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 * @@ -849,7 +849,7 @@ static const testcase_t rt_test_008_006 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_CONDVARS + * - CH_CFG_USE_CONDVARS == TRUE * . * *

Test Steps

@@ -906,9 +906,9 @@ static const testcase_t rt_test_008_007 = { NULL, 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 * @@ -921,7 +921,7 @@ static const testcase_t rt_test_008_007 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_CONDVARS + * - CH_CFG_USE_CONDVARS == TRUE * . * *

Test Steps

@@ -969,9 +969,9 @@ static const testcase_t rt_test_008_008 = { NULL, 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 * @@ -986,7 +986,7 @@ static const testcase_t rt_test_008_008 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_CONDVARS + * - CH_CFG_USE_CONDVARS == TRUE * . * *

Test Steps

@@ -1076,7 +1076,7 @@ static const testcase_t rt_test_008_009 = { NULL, rt_test_008_009_execute }; -#endif /* CH_CFG_USE_CONDVARS */ +#endif /* CH_CFG_USE_CONDVARS == TRUE */ /**************************************************************************** * Exported data. @@ -1087,26 +1087,26 @@ static const testcase_t rt_test_008_009 = { */ const testcase_t * const rt_test_sequence_008_array[] = { &rt_test_008_001, -#if (CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__) +#if (CH_DBG_THREADS_PROFILING == TRUE) || defined(__DOXYGEN__) &rt_test_008_002, #endif -#if (CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__) +#if (CH_DBG_THREADS_PROFILING == TRUE) || defined(__DOXYGEN__) &rt_test_008_003, #endif &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, #endif -#if (CH_CFG_USE_MUTEXES_RECURSIVE) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MUTEXES_RECURSIVE == TRUE) || defined(__DOXYGEN__) &rt_test_008_006, #endif -#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_CONDVARS == TRUE) || defined(__DOXYGEN__) &rt_test_008_007, #endif -#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_CONDVARS == TRUE) || defined(__DOXYGEN__) &rt_test_008_008, #endif -#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_CONDVARS == TRUE) || defined(__DOXYGEN__) &rt_test_008_009, #endif NULL @@ -1120,4 +1120,4 @@ const testsequence_t rt_test_sequence_008 = { rt_test_sequence_008_array }; -#endif /* CH_CFG_USE_MUTEXES */ +#endif /* CH_CFG_USE_MUTEXES == TRUE */ diff --git a/test/rt/source/test/rt_test_sequence_009.c b/test/rt/source/test/rt_test_sequence_009.c index 0387a29c0..9bfd4b033 100644 --- a/test/rt/source/test/rt_test_sequence_009.c +++ b/test/rt/source/test/rt_test_sequence_009.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MESSAGES + * - CH_CFG_USE_MESSAGES == TRUE * . * *

Test Cases

@@ -40,7 +40,7 @@ * . */ -#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -129,4 +129,4 @@ const testsequence_t rt_test_sequence_009 = { rt_test_sequence_009_array }; -#endif /* CH_CFG_USE_MESSAGES */ +#endif /* CH_CFG_USE_MESSAGES == TRUE */ diff --git a/test/rt/source/test/rt_test_sequence_010.c b/test/rt/source/test/rt_test_sequence_010.c index 7b1052d7e..a8ab71d03 100644 --- a/test/rt/source/test/rt_test_sequence_010.c +++ b/test/rt/source/test/rt_test_sequence_010.c @@ -31,7 +31,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_EVENTS + * - CH_CFG_USE_EVENTS == TRUE * . * *

Test Cases

@@ -45,7 +45,7 @@ * . */ -#if (CH_CFG_USE_EVENTS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_EVENTS == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -426,7 +426,7 @@ static const testcase_t rt_test_010_005 = { 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 * @@ -437,7 +437,7 @@ static const testcase_t rt_test_010_005 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_EVENTS_TIMEOUT + * - CH_CFG_USE_EVENTS_TIMEOUT == TRUE * . * *

Test Steps

@@ -488,7 +488,7 @@ static const testcase_t rt_test_010_006 = { NULL, 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() @@ -586,7 +586,7 @@ const testcase_t * const rt_test_sequence_010_array[] = { &rt_test_010_003, &rt_test_010_004, &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, #endif &rt_test_010_007, @@ -601,4 +601,4 @@ const testsequence_t rt_test_sequence_010 = { rt_test_sequence_010_array }; -#endif /* CH_CFG_USE_EVENTS */ +#endif /* CH_CFG_USE_EVENTS == TRUE */ diff --git a/test/rt/source/test/rt_test_sequence_011.c b/test/rt/source/test/rt_test_sequence_011.c index 8c69c285b..1db8f5db5 100644 --- a/test/rt/source/test/rt_test_sequence_011.c +++ b/test/rt/source/test/rt_test_sequence_011.c @@ -32,7 +32,7 @@ *

Conditions

* This sequence is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_DYNAMIC + * - CH_CFG_USE_DYNAMIC == TRUE * . * *

Test Cases

@@ -41,7 +41,7 @@ * . */ -#if (CH_CFG_USE_DYNAMIC) || defined(__DOXYGEN__) +#if (CH_CFG_USE_DYNAMIC == TRUE) || defined(__DOXYGEN__) /**************************************************************************** * Shared code. @@ -63,7 +63,7 @@ static THD_FUNCTION(dyn_thread1, p) { * 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 * @@ -76,7 +76,7 @@ static THD_FUNCTION(dyn_thread1, p) { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_HEAP + * - CH_CFG_USE_HEAP == TRUE * . * *

Test Steps

@@ -174,9 +174,9 @@ static const testcase_t rt_test_011_001 = { NULL, 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 * @@ -188,7 +188,7 @@ static const testcase_t rt_test_011_001 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MEMPOOLS + * - CH_CFG_USE_MEMPOOLS == TRUE * . * *

Test Steps

@@ -274,7 +274,7 @@ static const testcase_t rt_test_011_002 = { NULL, rt_test_011_002_execute }; -#endif /* CH_CFG_USE_MEMPOOLS */ +#endif /* CH_CFG_USE_MEMPOOLS == TRUE */ /**************************************************************************** * Exported data. @@ -284,10 +284,10 @@ static const testcase_t rt_test_011_002 = { * @brief Array of test cases. */ 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, #endif -#if (CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MEMPOOLS == TRUE) || defined(__DOXYGEN__) &rt_test_011_002, #endif NULL @@ -301,4 +301,4 @@ const testsequence_t rt_test_sequence_011 = { rt_test_sequence_011_array }; -#endif /* CH_CFG_USE_DYNAMIC */ +#endif /* CH_CFG_USE_DYNAMIC == TRUE */ diff --git a/test/rt/source/test/rt_test_sequence_012.c b/test/rt/source/test/rt_test_sequence_012.c index 225312156..8112e95e7 100644 --- a/test/rt/source/test/rt_test_sequence_012.c +++ b/test/rt/source/test/rt_test_sequence_012.c @@ -142,7 +142,7 @@ static THD_FUNCTION(bmk_thread8, p) { * 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 * @@ -154,7 +154,7 @@ static THD_FUNCTION(bmk_thread8, p) { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MESSAGES + * - CH_CFG_USE_MESSAGES == TRUE * . * *

Test Steps

@@ -204,9 +204,9 @@ static const testcase_t rt_test_012_001 = { NULL, 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 * @@ -218,7 +218,7 @@ static const testcase_t rt_test_012_001 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MESSAGES + * - CH_CFG_USE_MESSAGES == TRUE * . * *

Test Steps

@@ -268,9 +268,9 @@ static const testcase_t rt_test_012_002 = { NULL, 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 * @@ -283,7 +283,7 @@ static const testcase_t rt_test_012_002 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MESSAGES + * - CH_CFG_USE_MESSAGES == TRUE * . * *

Test Steps

@@ -346,7 +346,7 @@ static const testcase_t rt_test_012_003 = { NULL, 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 @@ -551,7 +551,7 @@ static const testcase_t rt_test_012_006 = { 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 * @@ -564,7 +564,7 @@ static const testcase_t rt_test_012_006 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_SEMAPHORES + * - CH_CFG_USE_SEMAPHORES == TRUE * . * *

Test Steps

@@ -642,7 +642,7 @@ static const testcase_t rt_test_012_007 = { NULL, 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 @@ -768,7 +768,7 @@ static const testcase_t rt_test_012_009 = { 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 * @@ -781,7 +781,7 @@ static const testcase_t rt_test_012_009 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_SEMAPHORES + * - CH_CFG_USE_SEMAPHORES == TRUE * . * *

Test Steps

@@ -840,9 +840,9 @@ static const testcase_t rt_test_012_010 = { NULL, 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 * @@ -855,7 +855,7 @@ static const testcase_t rt_test_012_010 = { *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - CH_CFG_USE_MUTEXES + * - CH_CFG_USE_MUTEXES ==TRUE * . * *

Test Steps

@@ -914,7 +914,7 @@ static const testcase_t rt_test_012_011 = { NULL, 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 @@ -1046,27 +1046,27 @@ static const testcase_t rt_test_012_012 = { * @brief Array of test cases. */ 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, #endif -#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__) &rt_test_012_002, #endif -#if (CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__) &rt_test_012_003, #endif &rt_test_012_004, &rt_test_012_005, &rt_test_012_006, -#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__) &rt_test_012_007, #endif &rt_test_012_008, &rt_test_012_009, -#if (CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__) &rt_test_012_010, #endif -#if (CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) +#if (CH_CFG_USE_MUTEXES ==TRUE) || defined(__DOXYGEN__) &rt_test_012_011, #endif &rt_test_012_012,