• R/O
  • SSH
  • HTTPS

chibios: Commit


Commit MetaInfo

Revision14522 (tree)
Time2021-06-09 20:56:33
Authorgdisirio

Log Message

Simplified test XML.

Change Summary

Incremental Difference

--- trunk/test/crypto/source/test/cry_test_sequence_001.c (revision 14521)
+++ trunk/test/crypto/source/test/cry_test_sequence_001.c (revision 14522)
@@ -97,6 +97,7 @@
9797
9898 test_assert(ret == CRY_NOERROR, "failed load transient key");
9999 }
100+ test_end_step(1);
100101
101102 /* [1.1.2] Encrypt.*/
102103 test_set_step(2);
@@ -112,6 +113,7 @@
112113 }
113114
114115 }
116+ test_end_step(2);
115117
116118 /* [1.1.3] Decrypt.*/
117119 test_set_step(3);
@@ -127,6 +129,7 @@
127129 }
128130
129131 }
132+ test_end_step(3);
130133
131134 /* [1.1.4] loading the key with 24 byte size.*/
132135 test_set_step(4);
@@ -135,6 +138,7 @@
135138
136139 test_assert(ret == CRY_NOERROR, "failed load transient key");
137140 }
141+ test_end_step(4);
138142
139143 /* [1.1.5] Encrypt.*/
140144 test_set_step(5);
@@ -150,6 +154,7 @@
150154 }
151155
152156 }
157+ test_end_step(5);
153158
154159 /* [1.1.6] Decrypt.*/
155160 test_set_step(6);
@@ -165,6 +170,7 @@
165170 }
166171
167172 }
173+ test_end_step(6);
168174
169175 /* [1.1.7] loading the key with 32 byte size.*/
170176 test_set_step(7);
@@ -173,6 +179,7 @@
173179
174180 test_assert(ret == CRY_NOERROR, "failed load transient key");
175181 }
182+ test_end_step(7);
176183
177184 /* [1.1.8] Encrypt.*/
178185 test_set_step(8);
@@ -188,6 +195,7 @@
188195 }
189196
190197 }
198+ test_end_step(8);
191199
192200 /* [1.1.9] Decrypt.*/
193201 test_set_step(9);
@@ -203,6 +211,7 @@
203211 }
204212
205213 }
214+ test_end_step(9);
206215 }
207216
208217 static const testcase_t cry_test_001_001 = {
@@ -254,6 +263,7 @@
254263
255264 test_assert(ret == CRY_NOERROR, "failed load transient key");
256265 }
266+ test_end_step(1);
257267
258268 /* [1.2.2] Encrypt.*/
259269 test_set_step(2);
@@ -269,6 +279,7 @@
269279 }
270280
271281 }
282+ test_end_step(2);
272283
273284 /* [1.2.3] Decrypt.*/
274285 test_set_step(3);
@@ -284,6 +295,7 @@
284295 }
285296
286297 }
298+ test_end_step(3);
287299
288300 /* [1.2.4] loading the key with 24 byte size.*/
289301 test_set_step(4);
@@ -292,6 +304,7 @@
292304
293305 test_assert(ret == CRY_NOERROR, "failed load transient key");
294306 }
307+ test_end_step(4);
295308
296309 /* [1.2.5] Encrypt.*/
297310 test_set_step(5);
@@ -307,6 +320,7 @@
307320 }
308321
309322 }
323+ test_end_step(5);
310324
311325 /* [1.2.6] Decrypt.*/
312326 test_set_step(6);
@@ -322,6 +336,7 @@
322336 }
323337
324338 }
339+ test_end_step(6);
325340
326341 /* [1.2.7] loading the key with 32 byte size.*/
327342 test_set_step(7);
@@ -330,6 +345,7 @@
330345
331346 test_assert(ret == CRY_NOERROR, "failed load transient key");
332347 }
348+ test_end_step(7);
333349
334350 /* [1.2.8] Encrypt.*/
335351 test_set_step(8);
@@ -345,6 +361,7 @@
345361 }
346362
347363 }
364+ test_end_step(8);
348365
349366 /* [1.2.9] Decrypt.*/
350367 test_set_step(9);
@@ -360,6 +377,7 @@
360377 }
361378
362379 }
380+ test_end_step(9);
363381 }
364382
365383 static const testcase_t cry_test_001_002 = {
--- trunk/test/crypto/source/test/cry_test_sequence_002.c (revision 14521)
+++ trunk/test/crypto/source/test/cry_test_sequence_002.c (revision 14522)
@@ -97,6 +97,7 @@
9797
9898 test_assert(ret == CRY_NOERROR, "failed load transient key");
9999 }
100+ test_end_step(1);
100101
101102 /* [2.1.2] Encrypt.*/
102103 test_set_step(2);
@@ -112,6 +113,7 @@
112113 }
113114
114115 }
116+ test_end_step(2);
115117
116118 /* [2.1.3] Decrypt.*/
117119 test_set_step(3);
@@ -127,6 +129,7 @@
127129 }
128130
129131 }
132+ test_end_step(3);
130133
131134 /* [2.1.4] loading the key with 24 byte size.*/
132135 test_set_step(4);
@@ -135,6 +138,7 @@
135138
136139 test_assert(ret == CRY_NOERROR, "failed load transient key");
137140 }
141+ test_end_step(4);
138142
139143 /* [2.1.5] Encrypt.*/
140144 test_set_step(5);
@@ -150,6 +154,7 @@
150154 }
151155
152156 }
157+ test_end_step(5);
153158
154159 /* [2.1.6] Decrypt.*/
155160 test_set_step(6);
@@ -165,6 +170,7 @@
165170 }
166171
167172 }
173+ test_end_step(6);
168174
169175 /* [2.1.7] loading the key with 32 byte size.*/
170176 test_set_step(7);
@@ -173,6 +179,7 @@
173179
174180 test_assert(ret == CRY_NOERROR, "failed load transient key");
175181 }
182+ test_end_step(7);
176183
177184 /* [2.1.8] Encrypt.*/
178185 test_set_step(8);
@@ -188,6 +195,7 @@
188195 }
189196
190197 }
198+ test_end_step(8);
191199
192200 /* [2.1.9] Decrypt.*/
193201 test_set_step(9);
@@ -203,6 +211,7 @@
203211 }
204212
205213 }
214+ test_end_step(9);
206215 }
207216
208217 static const testcase_t cry_test_002_001 = {
@@ -254,6 +263,7 @@
254263
255264 test_assert(ret == CRY_NOERROR, "failed load transient key");
256265 }
266+ test_end_step(1);
257267
258268 /* [2.2.2] Encrypt.*/
259269 test_set_step(2);
@@ -269,6 +279,7 @@
269279 }
270280
271281 }
282+ test_end_step(2);
272283
273284 /* [2.2.3] Decrypt.*/
274285 test_set_step(3);
@@ -284,6 +295,7 @@
284295 }
285296
286297 }
298+ test_end_step(3);
287299
288300 /* [2.2.4] loading the key with 24 byte size.*/
289301 test_set_step(4);
@@ -292,6 +304,7 @@
292304
293305 test_assert(ret == CRY_NOERROR, "failed load transient key");
294306 }
307+ test_end_step(4);
295308
296309 /* [2.2.5] Encrypt.*/
297310 test_set_step(5);
@@ -307,6 +320,7 @@
307320 }
308321
309322 }
323+ test_end_step(5);
310324
311325 /* [2.2.6] Decrypt.*/
312326 test_set_step(6);
@@ -322,6 +336,7 @@
322336 }
323337
324338 }
339+ test_end_step(6);
325340
326341 /* [2.2.7] loading the key with 32 byte size.*/
327342 test_set_step(7);
@@ -330,6 +345,7 @@
330345
331346 test_assert(ret == CRY_NOERROR, "failed load transient key");
332347 }
348+ test_end_step(7);
333349
334350 /* [2.2.8] Encrypt.*/
335351 test_set_step(8);
@@ -345,6 +361,7 @@
345361 }
346362
347363 }
364+ test_end_step(8);
348365
349366 /* [2.2.9] Decrypt.*/
350367 test_set_step(9);
@@ -360,6 +377,7 @@
360377 }
361378
362379 }
380+ test_end_step(9);
363381 }
364382
365383 static const testcase_t cry_test_002_002 = {
--- trunk/test/crypto/source/test/cry_test_sequence_003.c (revision 14521)
+++ trunk/test/crypto/source/test/cry_test_sequence_003.c (revision 14522)
@@ -97,6 +97,7 @@
9797
9898 test_assert(ret == CRY_NOERROR, "failed load transient key");
9999 }
100+ test_end_step(1);
100101
101102 /* [3.1.2] Encrypt.*/
102103 test_set_step(2);
@@ -110,8 +111,8 @@
110111 for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
111112 test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_128)[i], "encrypt mismatch");
112113 }
113-
114114 }
115+ test_end_step(2);
115116
116117 /* [3.1.3] Decrypt.*/
117118 test_set_step(3);
@@ -125,8 +126,8 @@
125126 for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
126127 test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch");
127128 }
128-
129129 }
130+ test_end_step(3);
130131
131132 /* [3.1.4] loading the key with 24 byte size.*/
132133 test_set_step(4);
@@ -135,6 +136,7 @@
135136
136137 test_assert(ret == CRY_NOERROR, "failed load transient key");
137138 }
139+ test_end_step(4);
138140
139141 /* [3.1.5] Encrypt.*/
140142 test_set_step(5);
@@ -148,8 +150,8 @@
148150 for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
149151 test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_192)[i], "encrypt mismatch");
150152 }
151-
152153 }
154+ test_end_step(5);
153155
154156 /* [3.1.6] Decrypt.*/
155157 test_set_step(6);
@@ -163,8 +165,8 @@
163165 for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
164166 test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch");
165167 }
166-
167168 }
169+ test_end_step(6);
168170
169171 /* [3.1.7] loading the key with 32 byte size.*/
170172 test_set_step(7);
@@ -173,6 +175,7 @@
173175
174176 test_assert(ret == CRY_NOERROR, "failed load transient key");
175177 }
178+ test_end_step(7);
176179
177180 /* [3.1.8] Encrypt.*/
178181 test_set_step(8);
@@ -188,6 +191,7 @@
188191 }
189192
190193 }
194+ test_end_step(8);
191195
192196 /* [3.1.9] Decrypt.*/
193197 test_set_step(9);
@@ -203,6 +207,7 @@
203207 }
204208
205209 }
210+ test_end_step(9);
206211 }
207212
208213 static const testcase_t cry_test_003_001 = {
@@ -254,6 +259,7 @@
254259
255260 test_assert(ret == CRY_NOERROR, "failed load transient key");
256261 }
262+ test_end_step(1);
257263
258264 /* [3.2.2] Encrypt.*/
259265 test_set_step(2);
@@ -269,6 +275,7 @@
269275 }
270276
271277 }
278+ test_end_step(2);
272279
273280 /* [3.2.3] Decrypt.*/
274281 test_set_step(3);
@@ -284,6 +291,7 @@
284291 }
285292
286293 }
294+ test_end_step(3);
287295
288296 /* [3.2.4] loading the key with 24 byte size.*/
289297 test_set_step(4);
@@ -292,6 +300,7 @@
292300
293301 test_assert(ret == CRY_NOERROR, "failed load transient key");
294302 }
303+ test_end_step(4);
295304
296305 /* [3.2.5] Encrypt.*/
297306 test_set_step(5);
@@ -307,6 +316,7 @@
307316 }
308317
309318 }
319+ test_end_step(5);
310320
311321 /* [3.2.6] Decrypt.*/
312322 test_set_step(6);
@@ -322,6 +332,7 @@
322332 }
323333
324334 }
335+ test_end_step(6);
325336
326337 /* [3.2.7] loading the key with 32 byte size.*/
327338 test_set_step(7);
@@ -330,6 +341,7 @@
330341
331342 test_assert(ret == CRY_NOERROR, "failed load transient key");
332343 }
344+ test_end_step(7);
333345
334346 /* [3.2.8] Encrypt.*/
335347 test_set_step(8);
@@ -345,6 +357,7 @@
345357 }
346358
347359 }
360+ test_end_step(8);
348361
349362 /* [3.2.9] Decrypt.*/
350363 test_set_step(9);
@@ -360,6 +373,7 @@
360373 }
361374
362375 }
376+ test_end_step(9);
363377 }
364378
365379 static const testcase_t cry_test_003_002 = {
--- trunk/test/crypto/source/test/cry_test_sequence_004.c (revision 14521)
+++ trunk/test/crypto/source/test/cry_test_sequence_004.c (revision 14522)
@@ -97,6 +97,7 @@
9797
9898 test_assert(ret == CRY_NOERROR, "failed load transient key");
9999 }
100+ test_end_step(1);
100101
101102 /* [4.1.2] Encrypt.*/
102103 test_set_step(2);
@@ -112,6 +113,7 @@
112113 }
113114
114115 }
116+ test_end_step(2);
115117
116118 /* [4.1.3] Decrypt.*/
117119 test_set_step(3);
@@ -127,6 +129,7 @@
127129 }
128130
129131 }
132+ test_end_step(3);
130133 }
131134
132135 static const testcase_t cry_test_004_001 = {
@@ -175,6 +178,7 @@
175178
176179 test_assert(ret == CRY_NOERROR, "failed load transient key");
177180 }
181+ test_end_step(1);
178182
179183 /* [4.2.2] Encrypt.*/
180184 test_set_step(2);
@@ -190,6 +194,7 @@
190194 }
191195
192196 }
197+ test_end_step(2);
193198
194199 /* [4.2.3] Decrypt.*/
195200 test_set_step(3);
@@ -205,6 +210,7 @@
205210 }
206211
207212 }
213+ test_end_step(3);
208214
209215 /* [4.2.4] loading the key with 24 byte size.*/
210216 test_set_step(4);
@@ -213,6 +219,7 @@
213219
214220 test_assert(ret == CRY_NOERROR, "failed load transient key");
215221 }
222+ test_end_step(4);
216223
217224 /* [4.2.5] Encrypt.*/
218225 test_set_step(5);
@@ -228,6 +235,7 @@
228235 }
229236
230237 }
238+ test_end_step(5);
231239
232240 /* [4.2.6] Decrypt.*/
233241 test_set_step(6);
@@ -243,6 +251,7 @@
243251 }
244252
245253 }
254+ test_end_step(6);
246255 }
247256
248257 static const testcase_t cry_test_004_002 = {
@@ -291,6 +300,7 @@
291300
292301 test_assert(ret == CRY_NOERROR, "failed load transient key");
293302 }
303+ test_end_step(1);
294304
295305 /* [4.3.2] Encrypt.*/
296306 test_set_step(2);
@@ -306,6 +316,7 @@
306316 }
307317
308318 }
319+ test_end_step(2);
309320
310321 /* [4.3.3] Decrypt.*/
311322 test_set_step(3);
@@ -321,6 +332,7 @@
321332 }
322333
323334 }
335+ test_end_step(3);
324336
325337 /* [4.3.4] loading the key with 24 byte size.*/
326338 test_set_step(4);
@@ -329,6 +341,7 @@
329341
330342 test_assert(ret == CRY_NOERROR, "failed load transient key");
331343 }
344+ test_end_step(4);
332345
333346 /* [4.3.5] Encrypt.*/
334347 test_set_step(5);
@@ -344,6 +357,7 @@
344357 }
345358
346359 }
360+ test_end_step(5);
347361
348362 /* [4.3.6] Decrypt.*/
349363 test_set_step(6);
@@ -359,6 +373,7 @@
359373 }
360374
361375 }
376+ test_end_step(6);
362377 }
363378
364379 static const testcase_t cry_test_004_003 = {
@@ -407,6 +422,7 @@
407422
408423 test_assert(ret == CRY_NOERROR, "failed load transient key");
409424 }
425+ test_end_step(1);
410426
411427 /* [4.4.2] Encrypt.*/
412428 test_set_step(2);
@@ -422,6 +438,7 @@
422438 }
423439
424440 }
441+ test_end_step(2);
425442
426443 /* [4.4.3] Decrypt.*/
427444 test_set_step(3);
@@ -437,6 +454,7 @@
437454 }
438455
439456 }
457+ test_end_step(3);
440458
441459 /* [4.4.4] loading the key with 24 byte size.*/
442460 test_set_step(4);
@@ -445,6 +463,7 @@
445463
446464 test_assert(ret == CRY_NOERROR, "failed load transient key");
447465 }
466+ test_end_step(4);
448467
449468 /* [4.4.5] Encrypt.*/
450469 test_set_step(5);
@@ -460,6 +479,7 @@
460479 }
461480
462481 }
482+ test_end_step(5);
463483
464484 /* [4.4.6] Decrypt.*/
465485 test_set_step(6);
@@ -475,6 +495,7 @@
475495 }
476496
477497 }
498+ test_end_step(6);
478499 }
479500
480501 static const testcase_t cry_test_004_004 = {
@@ -523,6 +544,7 @@
523544
524545 test_assert(ret == CRY_NOERROR, "failed load transient key");
525546 }
547+ test_end_step(1);
526548
527549 /* [4.5.2] Encrypt.*/
528550 test_set_step(2);
@@ -538,6 +560,7 @@
538560 }
539561
540562 }
563+ test_end_step(2);
541564
542565 /* [4.5.3] Decrypt.*/
543566 test_set_step(3);
@@ -553,6 +576,7 @@
553576 }
554577
555578 }
579+ test_end_step(3);
556580
557581 /* [4.5.4] loading the key with 24 byte size.*/
558582 test_set_step(4);
@@ -561,6 +585,7 @@
561585
562586 test_assert(ret == CRY_NOERROR, "failed load transient key");
563587 }
588+ test_end_step(4);
564589
565590 /* [4.5.5] Encrypt.*/
566591 test_set_step(5);
@@ -576,6 +601,7 @@
576601 }
577602
578603 }
604+ test_end_step(5);
579605
580606 /* [4.5.6] Decrypt.*/
581607 test_set_step(6);
@@ -591,6 +617,7 @@
591617 }
592618
593619 }
620+ test_end_step(6);
594621 }
595622
596623 static const testcase_t cry_test_004_005 = {
--- trunk/test/crypto/source/test/cry_test_sequence_005.c (revision 14521)
+++ trunk/test/crypto/source/test/cry_test_sequence_005.c (revision 14522)
@@ -97,6 +97,7 @@
9797
9898
9999 }
100+ test_end_step(1);
100101 }
101102
102103 static const testcase_t cry_test_005_001 = {
--- trunk/test/crypto/source/test/cry_test_sequence_006.c (revision 14521)
+++ trunk/test/crypto/source/test/cry_test_sequence_006.c (revision 14522)
@@ -233,6 +233,7 @@
233233
234234
235235 }
236+ test_end_step(1);
236237 }
237238
238239 static const testcase_t cry_test_006_001 = {
@@ -335,6 +336,7 @@
335336
336337
337338 }
339+ test_end_step(1);
338340 }
339341
340342 static const testcase_t cry_test_006_002 = {
@@ -437,6 +439,7 @@
437439
438440
439441 }
442+ test_end_step(1);
440443 }
441444
442445 static const testcase_t cry_test_006_003 = {
--- trunk/test/crypto/source/test/cry_test_sequence_007.c (revision 14521)
+++ trunk/test/crypto/source/test/cry_test_sequence_007.c (revision 14522)
@@ -227,6 +227,7 @@
227227 }
228228
229229 }
230+ test_end_step(1);
230231 }
231232
232233 static const testcase_t cry_test_007_001 = {
@@ -329,6 +330,7 @@
329330
330331
331332 }
333+ test_end_step(1);
332334 }
333335
334336 static const testcase_t cry_test_007_002 = {
@@ -430,6 +432,7 @@
430432 }
431433
432434 }
435+ test_end_step(1);
433436 }
434437
435438 static const testcase_t cry_test_007_003 = {
--- trunk/test/crypto/source/test/cry_test_sequence_008.c (revision 14521)
+++ trunk/test/crypto/source/test/cry_test_sequence_008.c (revision 14522)
@@ -203,6 +203,7 @@
203203
204204 }
205205 }
206+ test_end_step(1);
206207 }
207208
208209 static const testcase_t cry_test_008_001 = {
@@ -326,6 +327,7 @@
326327
327328 }
328329 }
330+ test_end_step(1);
329331 }
330332
331333 static const testcase_t cry_test_008_002 = {
--- trunk/test/crypto/source/test/cry_test_sequence_009.c (revision 14521)
+++ trunk/test/crypto/source/test/cry_test_sequence_009.c (revision 14522)
@@ -184,6 +184,7 @@
184184 test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC256_1)[i], "hmac mismatch");
185185 }
186186 }
187+ test_end_step(1);
187188
188189 /* [9.1.2] hmac 512.*/
189190 test_set_step(2);
@@ -194,6 +195,7 @@
194195 test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC512_1)[i], "hmac mismatch");
195196 }
196197 }
198+ test_end_step(2);
197199 }
198200
199201 static const testcase_t cry_test_009_001 = {
@@ -238,6 +240,7 @@
238240 test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC256_1)[i], "hmac mismatch");
239241 }
240242 }
243+ test_end_step(1);
241244
242245 /* [9.2.2] hmac 512.*/
243246 test_set_step(2);
@@ -248,6 +251,7 @@
248251 test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC512_1)[i], "hmac mismatch");
249252 }
250253 }
254+ test_end_step(2);
251255 }
252256
253257 static const testcase_t cry_test_009_002 = {
--- trunk/test/crypto/configuration.xml (revision 14521)
+++ trunk/test/crypto/configuration.xml (revision 14522)
@@ -1,19 +1,12 @@
1-<?xml version="1.0" encoding="UTF-8"?>
2-<SPC5-Config version="1.0.0">
3- <application name="Crypto Test Suite" version="1.0.0" standalone="true" locked="false">
4- <description>Test Specification for Hal Crypto </description>
5- <component id="org.chibios.spc5.components.portable.generic_startup">
6- <component id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine" />
7- </component>
8- <instances>
9- <instance locked="false" id="org.chibios.spc5.components.portable.generic_startup" />
10- <instance locked="false" id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
11- <description>
12- <brief>
13- <value>Chibios Hal Crypto Test Suite.</value>
14- </brief>
15- <copyright>
16- <value><![CDATA[/*
1+
2+<instance locked="false"
3+ id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
4+ <description>
5+ <brief>
6+ <value>Chibios Hal Crypto Test Suite.</value>
7+ </brief>
8+ <copyright>
9+ <value><![CDATA[/*
1710 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
1811
1912 Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,17 +21,19 @@
2821 See the License for the specific language governing permissions and
2922 limitations under the License.
3023 */]]></value>
31- </copyright>
32- <introduction>
33- <value>Test suite for ChibiOS Crypto Hal. The purpose of this suite is to perform unit tests on the Hal Crypto and to converge to 100% code coverage through successive improvements.</value>
34- </introduction>
35- </description>
36- <global_data_and_code>
37- <code_prefix>
38- <value>cry_</value>
39- </code_prefix>
40- <global_definitions>
41- <value><![CDATA[
24+ </copyright>
25+ <introduction>
26+ <value>Test suite for ChibiOS Crypto Hal. The purpose of this
27+ suite is to perform unit tests on the Hal Crypto and to converge
28+ to 100% code coverage through successive improvements.</value>
29+ </introduction>
30+ </description>
31+ <global_data_and_code>
32+ <code_prefix>
33+ <value>cry_</value>
34+ </code_prefix>
35+ <global_definitions>
36+ <value><![CDATA[
4237 extern void cryptoTest_setStream(BaseSequentialStream * s);
4338 extern void cryptoTest_printArray32(bool isLE,const uint32_t *a,size_t len);
4439 #ifdef LOG_CRYPTO_DATA
@@ -84,9 +79,9 @@
8479
8580
8681 ]]></value>
87- </global_definitions>
88- <global_code>
89- <value><![CDATA[
82+ </global_definitions>
83+ <global_code>
84+ <value><![CDATA[
9085
9186 #if CRYPTO_LOG_LEVEL == 1
9287 #include "chprintf.h"
@@ -197,25 +192,25 @@
197192 }
198193
199194 ]]></value>
200- </global_code>
201- </global_data_and_code>
195+ </global_code>
196+ </global_data_and_code>
202197
203- <sequences>
204-<sequence>
205- <type index="0">
206- <value>Internal Tests</value>
207- </type>
208- <brief>
209- <value>AES ECB</value>
210- </brief>
211- <description>
212- <value>AES ECB</value>
213- </description>
214- <condition>
215- <value />
216- </condition>
217- <shared_code>
218- <value><![CDATA[
198+ <sequences>
199+ <sequence>
200+ <type index="0">
201+ <value>Internal Tests</value>
202+ </type>
203+ <brief>
204+ <value>AES ECB</value>
205+ </brief>
206+ <description>
207+ <value>AES ECB</value>
208+ </description>
209+ <condition>
210+ <value />
211+ </condition>
212+ <shared_code>
213+ <value><![CDATA[
219214 #include <string.h>
220215 #include "ref_aes.h"
221216 static const CRYConfig config_Polling = {
@@ -228,21 +223,21 @@
228223 AES_CFBS_128 //cfbs
229224 };
230225 ]]></value>
231- </shared_code>
232- <cases>
233- <case>
234- <brief>
235- <value>AES ECB Polling</value>
236- </brief>
237- <description>
238- <value>testing AES ECB with various Keys</value>
239- </description>
240- <condition>
241- <value />
242- </condition>
243- <various_code>
244- <setup_code>
245- <value><![CDATA[
226+ </shared_code>
227+ <cases>
228+ <case>
229+ <brief>
230+ <value>AES ECB Polling</value>
231+ </brief>
232+ <description>
233+ <value>testing AES ECB with various Keys</value>
234+ </description>
235+ <condition>
236+ <value />
237+ </condition>
238+ <various_code>
239+ <setup_code>
240+ <value><![CDATA[
246241 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
247242 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
248243 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -249,41 +244,41 @@
249244 cryStart(&CRYD1, &config_Polling);
250245
251246 ]]></value>
252- </setup_code>
253- <teardown_code>
254- <value><![CDATA[cryStop(&CRYD1);]]></value>
255- </teardown_code>
256- <local_variables>
257- <value><![CDATA[
247+ </setup_code>
248+ <teardown_code>
249+ <value><![CDATA[cryStop(&CRYD1);]]></value>
250+ </teardown_code>
251+ <local_variables>
252+ <value><![CDATA[
258253 cryerror_t ret;
259254 ]]></value>
260- </local_variables>
261- </various_code>
262- <steps>
263- <step>
264- <description>
265- <value>loading the key with 16 byte size</value>
266- </description>
267- <tags>
268- <value />
269- </tags>
270- <code>
271- <value><![CDATA[
255+ </local_variables>
256+ </various_code>
257+ <steps>
258+ <step>
259+ <description>
260+ <value>loading the key with 16 byte size</value>
261+ </description>
262+ <tags>
263+ <value />
264+ </tags>
265+ <code>
266+ <value><![CDATA[
272267 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,16, (uint8_t *) test_keys);
273268
274269 test_assert(ret == CRY_NOERROR, "failed load transient key");
275270 ]]></value>
276- </code>
277- </step>
278- <step>
279- <description>
280- <value>Encrypt</value>
281- </description>
282- <tags>
283- <value />
284- </tags>
285- <code>
286- <value><![CDATA[
271+ </code>
272+ </step>
273+ <step>
274+ <description>
275+ <value>Encrypt</value>
276+ </description>
277+ <tags>
278+ <value />
279+ </tags>
280+ <code>
281+ <value><![CDATA[
287282 ret = cryEncryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
288283
289284 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -295,17 +290,17 @@
295290 }
296291
297292 ]]></value>
298- </code>
299- </step>
300- <step>
301- <description>
302- <value>Decrypt</value>
303- </description>
304- <tags>
305- <value />
306- </tags>
307- <code>
308- <value><![CDATA[
293+ </code>
294+ </step>
295+ <step>
296+ <description>
297+ <value>Decrypt</value>
298+ </description>
299+ <tags>
300+ <value />
301+ </tags>
302+ <code>
303+ <value><![CDATA[
309304 ret = cryDecryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
310305
311306 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -317,32 +312,32 @@
317312 }
318313
319314 ]]></value>
320- </code>
321- </step>
322- <step>
323- <description>
324- <value>loading the key with 24 byte size</value>
325- </description>
326- <tags>
327- <value />
328- </tags>
329- <code>
330- <value><![CDATA[
315+ </code>
316+ </step>
317+ <step>
318+ <description>
319+ <value>loading the key with 24 byte size</value>
320+ </description>
321+ <tags>
322+ <value />
323+ </tags>
324+ <code>
325+ <value><![CDATA[
331326 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,24, (uint8_t *) test_keys);
332327
333328 test_assert(ret == CRY_NOERROR, "failed load transient key");
334329 ]]></value>
335- </code>
336- </step>
337- <step>
338- <description>
339- <value>Encrypt</value>
340- </description>
341- <tags>
342- <value />
343- </tags>
344- <code>
345- <value><![CDATA[
330+ </code>
331+ </step>
332+ <step>
333+ <description>
334+ <value>Encrypt</value>
335+ </description>
336+ <tags>
337+ <value />
338+ </tags>
339+ <code>
340+ <value><![CDATA[
346341 ret = cryEncryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
347342
348343 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -354,17 +349,17 @@
354349 }
355350
356351 ]]></value>
357- </code>
358- </step>
359- <step>
360- <description>
361- <value>Decrypt</value>
362- </description>
363- <tags>
364- <value />
365- </tags>
366- <code>
367- <value><![CDATA[
352+ </code>
353+ </step>
354+ <step>
355+ <description>
356+ <value>Decrypt</value>
357+ </description>
358+ <tags>
359+ <value />
360+ </tags>
361+ <code>
362+ <value><![CDATA[
368363 ret = cryDecryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
369364
370365 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -376,32 +371,32 @@
376371 }
377372
378373 ]]></value>
379- </code>
380- </step>
381- <step>
382- <description>
383- <value>loading the key with 32 byte size</value>
384- </description>
385- <tags>
386- <value />
387- </tags>
388- <code>
389- <value><![CDATA[
374+ </code>
375+ </step>
376+ <step>
377+ <description>
378+ <value>loading the key with 32 byte size</value>
379+ </description>
380+ <tags>
381+ <value />
382+ </tags>
383+ <code>
384+ <value><![CDATA[
390385 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,32, (uint8_t *) test_keys);
391386
392387 test_assert(ret == CRY_NOERROR, "failed load transient key");
393388 ]]></value>
394- </code>
395- </step>
396- <step>
397- <description>
398- <value>Encrypt</value>
399- </description>
400- <tags>
401- <value />
402- </tags>
403- <code>
404- <value><![CDATA[
389+ </code>
390+ </step>
391+ <step>
392+ <description>
393+ <value>Encrypt</value>
394+ </description>
395+ <tags>
396+ <value />
397+ </tags>
398+ <code>
399+ <value><![CDATA[
405400 ret = cryEncryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
406401
407402 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -413,17 +408,17 @@
413408 }
414409
415410 ]]></value>
416- </code>
417- </step>
418- <step>
419- <description>
420- <value>Decrypt</value>
421- </description>
422- <tags>
423- <value />
424- </tags>
425- <code>
426- <value><![CDATA[
411+ </code>
412+ </step>
413+ <step>
414+ <description>
415+ <value>Decrypt</value>
416+ </description>
417+ <tags>
418+ <value />
419+ </tags>
420+ <code>
421+ <value><![CDATA[
427422 ret = cryDecryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
428423
429424 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -435,23 +430,23 @@
435430 }
436431
437432 ]]></value>
438- </code>
439- </step>
440- </steps>
441- </case>
442- <case>
443- <brief>
444- <value>AES ECB DMA</value>
445- </brief>
446- <description>
447- <value>testing AES ECB with various Keys</value>
448- </description>
449- <condition>
450- <value />
451- </condition>
452- <various_code>
453- <setup_code>
454- <value><![CDATA[
433+ </code>
434+ </step>
435+ </steps>
436+ </case>
437+ <case>
438+ <brief>
439+ <value>AES ECB DMA</value>
440+ </brief>
441+ <description>
442+ <value>testing AES ECB with various Keys</value>
443+ </description>
444+ <condition>
445+ <value />
446+ </condition>
447+ <various_code>
448+ <setup_code>
449+ <value><![CDATA[
455450 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
456451 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
457452 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -458,41 +453,41 @@
458453 cryStart(&CRYD1, &config_DMA);
459454
460455 ]]></value>
461- </setup_code>
462- <teardown_code>
463- <value><![CDATA[cryStop(&CRYD1);]]></value>
464- </teardown_code>
465- <local_variables>
466- <value><![CDATA[
456+ </setup_code>
457+ <teardown_code>
458+ <value><![CDATA[cryStop(&CRYD1);]]></value>
459+ </teardown_code>
460+ <local_variables>
461+ <value><![CDATA[
467462 cryerror_t ret;
468463 ]]></value>
469- </local_variables>
470- </various_code>
471- <steps>
472- <step>
473- <description>
474- <value>loading the key with 16 byte size</value>
475- </description>
476- <tags>
477- <value />
478- </tags>
479- <code>
480- <value><![CDATA[
464+ </local_variables>
465+ </various_code>
466+ <steps>
467+ <step>
468+ <description>
469+ <value>loading the key with 16 byte size</value>
470+ </description>
471+ <tags>
472+ <value />
473+ </tags>
474+ <code>
475+ <value><![CDATA[
481476 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,16, (uint8_t *) test_keys);
482477
483478 test_assert(ret == CRY_NOERROR, "failed load transient key");
484479 ]]></value>
485- </code>
486- </step>
487- <step>
488- <description>
489- <value>Encrypt</value>
490- </description>
491- <tags>
492- <value />
493- </tags>
494- <code>
495- <value><![CDATA[
480+ </code>
481+ </step>
482+ <step>
483+ <description>
484+ <value>Encrypt</value>
485+ </description>
486+ <tags>
487+ <value />
488+ </tags>
489+ <code>
490+ <value><![CDATA[
496491 ret = cryEncryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
497492
498493 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -504,17 +499,17 @@
504499 }
505500
506501 ]]></value>
507- </code>
508- </step>
509- <step>
510- <description>
511- <value>Decrypt</value>
512- </description>
513- <tags>
514- <value />
515- </tags>
516- <code>
517- <value><![CDATA[
502+ </code>
503+ </step>
504+ <step>
505+ <description>
506+ <value>Decrypt</value>
507+ </description>
508+ <tags>
509+ <value />
510+ </tags>
511+ <code>
512+ <value><![CDATA[
518513 ret = cryDecryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
519514
520515 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -526,32 +521,32 @@
526521 }
527522
528523 ]]></value>
529- </code>
530- </step>
531- <step>
532- <description>
533- <value>loading the key with 24 byte size</value>
534- </description>
535- <tags>
536- <value />
537- </tags>
538- <code>
539- <value><![CDATA[
524+ </code>
525+ </step>
526+ <step>
527+ <description>
528+ <value>loading the key with 24 byte size</value>
529+ </description>
530+ <tags>
531+ <value />
532+ </tags>
533+ <code>
534+ <value><![CDATA[
540535 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,24, (uint8_t *) test_keys);
541536
542537 test_assert(ret == CRY_NOERROR, "failed load transient key");
543538 ]]></value>
544- </code>
545- </step>
546- <step>
547- <description>
548- <value>Encrypt</value>
549- </description>
550- <tags>
551- <value />
552- </tags>
553- <code>
554- <value><![CDATA[
539+ </code>
540+ </step>
541+ <step>
542+ <description>
543+ <value>Encrypt</value>
544+ </description>
545+ <tags>
546+ <value />
547+ </tags>
548+ <code>
549+ <value><![CDATA[
555550 ret = cryEncryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
556551
557552 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -563,17 +558,17 @@
563558 }
564559
565560 ]]></value>
566- </code>
567- </step>
568- <step>
569- <description>
570- <value>Decrypt</value>
571- </description>
572- <tags>
573- <value />
574- </tags>
575- <code>
576- <value><![CDATA[
561+ </code>
562+ </step>
563+ <step>
564+ <description>
565+ <value>Decrypt</value>
566+ </description>
567+ <tags>
568+ <value />
569+ </tags>
570+ <code>
571+ <value><![CDATA[
577572 ret = cryDecryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
578573
579574 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -585,32 +580,32 @@
585580 }
586581
587582 ]]></value>
588- </code>
589- </step>
590- <step>
591- <description>
592- <value>loading the key with 32 byte size</value>
593- </description>
594- <tags>
595- <value />
596- </tags>
597- <code>
598- <value><![CDATA[
583+ </code>
584+ </step>
585+ <step>
586+ <description>
587+ <value>loading the key with 32 byte size</value>
588+ </description>
589+ <tags>
590+ <value />
591+ </tags>
592+ <code>
593+ <value><![CDATA[
599594 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,32, (uint8_t *) test_keys);
600595
601596 test_assert(ret == CRY_NOERROR, "failed load transient key");
602597 ]]></value>
603- </code>
604- </step>
605- <step>
606- <description>
607- <value>Encrypt</value>
608- </description>
609- <tags>
610- <value />
611- </tags>
612- <code>
613- <value><![CDATA[
598+ </code>
599+ </step>
600+ <step>
601+ <description>
602+ <value>Encrypt</value>
603+ </description>
604+ <tags>
605+ <value />
606+ </tags>
607+ <code>
608+ <value><![CDATA[
614609 ret = cryEncryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
615610
616611 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -622,17 +617,17 @@
622617 }
623618
624619 ]]></value>
625- </code>
626- </step>
627- <step>
628- <description>
629- <value>Decrypt</value>
630- </description>
631- <tags>
632- <value />
633- </tags>
634- <code>
635- <value><![CDATA[
620+ </code>
621+ </step>
622+ <step>
623+ <description>
624+ <value>Decrypt</value>
625+ </description>
626+ <tags>
627+ <value />
628+ </tags>
629+ <code>
630+ <value><![CDATA[
636631 ret = cryDecryptAES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
637632
638633 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -644,29 +639,29 @@
644639 }
645640
646641 ]]></value>
647- </code>
648- </step>
649- </steps>
650- </case>
651- </cases>
652- </sequence>
642+ </code>
643+ </step>
644+ </steps>
645+ </case>
646+ </cases>
647+ </sequence>
653648
654649
655-<sequence>
656- <type index="0">
657- <value>Internal Tests</value>
658- </type>
659- <brief>
660- <value>AES CFB</value>
661- </brief>
662- <description>
663- <value>AES CFB</value>
664- </description>
665- <condition>
666- <value />
667- </condition>
668- <shared_code>
669- <value><![CDATA[
650+ <sequence>
651+ <type index="0">
652+ <value>Internal Tests</value>
653+ </type>
654+ <brief>
655+ <value>AES CFB</value>
656+ </brief>
657+ <description>
658+ <value>AES CFB</value>
659+ </description>
660+ <condition>
661+ <value />
662+ </condition>
663+ <shared_code>
664+ <value><![CDATA[
670665 #include <string.h>
671666 #include "ref_aes.h"
672667 static const CRYConfig config_Polling = {
@@ -679,21 +674,21 @@
679674 AES_CFBS_128 //cfbs
680675 };
681676 ]]></value>
682- </shared_code>
683- <cases>
684- <case>
685- <brief>
686- <value>AES CFB Polling</value>
687- </brief>
688- <description>
689- <value>testing AES CFB with various Keys</value>
690- </description>
691- <condition>
692- <value />
693- </condition>
694- <various_code>
695- <setup_code>
696- <value><![CDATA[
677+ </shared_code>
678+ <cases>
679+ <case>
680+ <brief>
681+ <value>AES CFB Polling</value>
682+ </brief>
683+ <description>
684+ <value>testing AES CFB with various Keys</value>
685+ </description>
686+ <condition>
687+ <value />
688+ </condition>
689+ <various_code>
690+ <setup_code>
691+ <value><![CDATA[
697692 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
698693 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
699694 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -700,41 +695,41 @@
700695 cryStart(&CRYD1, &config_Polling);
701696
702697 ]]></value>
703- </setup_code>
704- <teardown_code>
705- <value><![CDATA[cryStop(&CRYD1);]]></value>
706- </teardown_code>
707- <local_variables>
708- <value><![CDATA[
698+ </setup_code>
699+ <teardown_code>
700+ <value><![CDATA[cryStop(&CRYD1);]]></value>
701+ </teardown_code>
702+ <local_variables>
703+ <value><![CDATA[
709704 cryerror_t ret;
710705 ]]></value>
711- </local_variables>
712- </various_code>
713- <steps>
714- <step>
715- <description>
716- <value>loading the key with 16 byte size</value>
717- </description>
718- <tags>
719- <value />
720- </tags>
721- <code>
722- <value><![CDATA[
706+ </local_variables>
707+ </various_code>
708+ <steps>
709+ <step>
710+ <description>
711+ <value>loading the key with 16 byte size</value>
712+ </description>
713+ <tags>
714+ <value />
715+ </tags>
716+ <code>
717+ <value><![CDATA[
723718 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,16, (uint8_t *) test_keys);
724719
725720 test_assert(ret == CRY_NOERROR, "failed load transient key");
726721 ]]></value>
727- </code>
728- </step>
729- <step>
730- <description>
731- <value>Encrypt</value>
732- </description>
733- <tags>
734- <value />
735- </tags>
736- <code>
737- <value><![CDATA[
722+ </code>
723+ </step>
724+ <step>
725+ <description>
726+ <value>Encrypt</value>
727+ </description>
728+ <tags>
729+ <value />
730+ </tags>
731+ <code>
732+ <value><![CDATA[
738733 ret = cryEncryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
739734
740735 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -746,17 +741,17 @@
746741 }
747742
748743 ]]></value>
749- </code>
750- </step>
751- <step>
752- <description>
753- <value>Decrypt</value>
754- </description>
755- <tags>
756- <value />
757- </tags>
758- <code>
759- <value><![CDATA[
744+ </code>
745+ </step>
746+ <step>
747+ <description>
748+ <value>Decrypt</value>
749+ </description>
750+ <tags>
751+ <value />
752+ </tags>
753+ <code>
754+ <value><![CDATA[
760755 ret = cryDecryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
761756
762757 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -768,32 +763,32 @@
768763 }
769764
770765 ]]></value>
771- </code>
772- </step>
773- <step>
774- <description>
775- <value>loading the key with 24 byte size</value>
776- </description>
777- <tags>
778- <value />
779- </tags>
780- <code>
781- <value><![CDATA[
766+ </code>
767+ </step>
768+ <step>
769+ <description>
770+ <value>loading the key with 24 byte size</value>
771+ </description>
772+ <tags>
773+ <value />
774+ </tags>
775+ <code>
776+ <value><![CDATA[
782777 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,24, (uint8_t *) test_keys);
783778
784779 test_assert(ret == CRY_NOERROR, "failed load transient key");
785780 ]]></value>
786- </code>
787- </step>
788- <step>
789- <description>
790- <value>Encrypt</value>
791- </description>
792- <tags>
793- <value />
794- </tags>
795- <code>
796- <value><![CDATA[
781+ </code>
782+ </step>
783+ <step>
784+ <description>
785+ <value>Encrypt</value>
786+ </description>
787+ <tags>
788+ <value />
789+ </tags>
790+ <code>
791+ <value><![CDATA[
797792 ret = cryEncryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
798793
799794 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -805,17 +800,17 @@
805800 }
806801
807802 ]]></value>
808- </code>
809- </step>
810- <step>
811- <description>
812- <value>Decrypt</value>
813- </description>
814- <tags>
815- <value />
816- </tags>
817- <code>
818- <value><![CDATA[
803+ </code>
804+ </step>
805+ <step>
806+ <description>
807+ <value>Decrypt</value>
808+ </description>
809+ <tags>
810+ <value />
811+ </tags>
812+ <code>
813+ <value><![CDATA[
819814 ret = cryDecryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
820815
821816 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -827,32 +822,32 @@
827822 }
828823
829824 ]]></value>
830- </code>
831- </step>
832- <step>
833- <description>
834- <value>loading the key with 32 byte size</value>
835- </description>
836- <tags>
837- <value />
838- </tags>
839- <code>
840- <value><![CDATA[
825+ </code>
826+ </step>
827+ <step>
828+ <description>
829+ <value>loading the key with 32 byte size</value>
830+ </description>
831+ <tags>
832+ <value />
833+ </tags>
834+ <code>
835+ <value><![CDATA[
841836 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,32, (uint8_t *) test_keys);
842837
843838 test_assert(ret == CRY_NOERROR, "failed load transient key");
844839 ]]></value>
845- </code>
846- </step>
847- <step>
848- <description>
849- <value>Encrypt</value>
850- </description>
851- <tags>
852- <value />
853- </tags>
854- <code>
855- <value><![CDATA[
840+ </code>
841+ </step>
842+ <step>
843+ <description>
844+ <value>Encrypt</value>
845+ </description>
846+ <tags>
847+ <value />
848+ </tags>
849+ <code>
850+ <value><![CDATA[
856851 ret = cryEncryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
857852
858853 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -864,17 +859,17 @@
864859 }
865860
866861 ]]></value>
867- </code>
868- </step>
869- <step>
870- <description>
871- <value>Decrypt</value>
872- </description>
873- <tags>
874- <value />
875- </tags>
876- <code>
877- <value><![CDATA[
862+ </code>
863+ </step>
864+ <step>
865+ <description>
866+ <value>Decrypt</value>
867+ </description>
868+ <tags>
869+ <value />
870+ </tags>
871+ <code>
872+ <value><![CDATA[
878873 ret = cryDecryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
879874
880875 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -886,23 +881,23 @@
886881 }
887882
888883 ]]></value>
889- </code>
890- </step>
891- </steps>
892- </case>
893- <case>
894- <brief>
895- <value>AES CFB DMA</value>
896- </brief>
897- <description>
898- <value>testing AES CFB with various Keys</value>
899- </description>
900- <condition>
901- <value />
902- </condition>
903- <various_code>
904- <setup_code>
905- <value><![CDATA[
884+ </code>
885+ </step>
886+ </steps>
887+ </case>
888+ <case>
889+ <brief>
890+ <value>AES CFB DMA</value>
891+ </brief>
892+ <description>
893+ <value>testing AES CFB with various Keys</value>
894+ </description>
895+ <condition>
896+ <value />
897+ </condition>
898+ <various_code>
899+ <setup_code>
900+ <value><![CDATA[
906901 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
907902 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
908903 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -909,41 +904,41 @@
909904 cryStart(&CRYD1, &config_DMA);
910905
911906 ]]></value>
912- </setup_code>
913- <teardown_code>
914- <value><![CDATA[cryStop(&CRYD1);]]></value>
915- </teardown_code>
916- <local_variables>
917- <value><![CDATA[
907+ </setup_code>
908+ <teardown_code>
909+ <value><![CDATA[cryStop(&CRYD1);]]></value>
910+ </teardown_code>
911+ <local_variables>
912+ <value><![CDATA[
918913 cryerror_t ret;
919914 ]]></value>
920- </local_variables>
921- </various_code>
922- <steps>
923- <step>
924- <description>
925- <value>loading the key with 16 byte size</value>
926- </description>
927- <tags>
928- <value />
929- </tags>
930- <code>
931- <value><![CDATA[
915+ </local_variables>
916+ </various_code>
917+ <steps>
918+ <step>
919+ <description>
920+ <value>loading the key with 16 byte size</value>
921+ </description>
922+ <tags>
923+ <value />
924+ </tags>
925+ <code>
926+ <value><![CDATA[
932927 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,16, (uint8_t *) test_keys);
933928
934929 test_assert(ret == CRY_NOERROR, "failed load transient key");
935930 ]]></value>
936- </code>
937- </step>
938- <step>
939- <description>
940- <value>Encrypt</value>
941- </description>
942- <tags>
943- <value />
944- </tags>
945- <code>
946- <value><![CDATA[
931+ </code>
932+ </step>
933+ <step>
934+ <description>
935+ <value>Encrypt</value>
936+ </description>
937+ <tags>
938+ <value />
939+ </tags>
940+ <code>
941+ <value><![CDATA[
947942 ret = cryEncryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
948943
949944 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -955,17 +950,17 @@
955950 }
956951
957952 ]]></value>
958- </code>
959- </step>
960- <step>
961- <description>
962- <value>Decrypt</value>
963- </description>
964- <tags>
965- <value />
966- </tags>
967- <code>
968- <value><![CDATA[
953+ </code>
954+ </step>
955+ <step>
956+ <description>
957+ <value>Decrypt</value>
958+ </description>
959+ <tags>
960+ <value />
961+ </tags>
962+ <code>
963+ <value><![CDATA[
969964 ret = cryDecryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
970965
971966 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -977,32 +972,32 @@
977972 }
978973
979974 ]]></value>
980- </code>
981- </step>
982- <step>
983- <description>
984- <value>loading the key with 24 byte size</value>
985- </description>
986- <tags>
987- <value />
988- </tags>
989- <code>
990- <value><![CDATA[
975+ </code>
976+ </step>
977+ <step>
978+ <description>
979+ <value>loading the key with 24 byte size</value>
980+ </description>
981+ <tags>
982+ <value />
983+ </tags>
984+ <code>
985+ <value><![CDATA[
991986 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,24, (uint8_t *) test_keys);
992987
993988 test_assert(ret == CRY_NOERROR, "failed load transient key");
994989 ]]></value>
995- </code>
996- </step>
997- <step>
998- <description>
999- <value>Encrypt</value>
1000- </description>
1001- <tags>
1002- <value />
1003- </tags>
1004- <code>
1005- <value><![CDATA[
990+ </code>
991+ </step>
992+ <step>
993+ <description>
994+ <value>Encrypt</value>
995+ </description>
996+ <tags>
997+ <value />
998+ </tags>
999+ <code>
1000+ <value><![CDATA[
10061001 ret = cryEncryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
10071002
10081003 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1014,17 +1009,17 @@
10141009 }
10151010
10161011 ]]></value>
1017- </code>
1018- </step>
1019- <step>
1020- <description>
1021- <value>Decrypt</value>
1022- </description>
1023- <tags>
1024- <value />
1025- </tags>
1026- <code>
1027- <value><![CDATA[
1012+ </code>
1013+ </step>
1014+ <step>
1015+ <description>
1016+ <value>Decrypt</value>
1017+ </description>
1018+ <tags>
1019+ <value />
1020+ </tags>
1021+ <code>
1022+ <value><![CDATA[
10281023 ret = cryDecryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
10291024
10301025 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1036,32 +1031,32 @@
10361031 }
10371032
10381033 ]]></value>
1039- </code>
1040- </step>
1041- <step>
1042- <description>
1043- <value>loading the key with 32 byte size</value>
1044- </description>
1045- <tags>
1046- <value />
1047- </tags>
1048- <code>
1049- <value><![CDATA[
1034+ </code>
1035+ </step>
1036+ <step>
1037+ <description>
1038+ <value>loading the key with 32 byte size</value>
1039+ </description>
1040+ <tags>
1041+ <value />
1042+ </tags>
1043+ <code>
1044+ <value><![CDATA[
10501045 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,32, (uint8_t *) test_keys);
10511046
10521047 test_assert(ret == CRY_NOERROR, "failed load transient key");
10531048 ]]></value>
1054- </code>
1055- </step>
1056- <step>
1057- <description>
1058- <value>Encrypt</value>
1059- </description>
1060- <tags>
1061- <value />
1062- </tags>
1063- <code>
1064- <value><![CDATA[
1049+ </code>
1050+ </step>
1051+ <step>
1052+ <description>
1053+ <value>Encrypt</value>
1054+ </description>
1055+ <tags>
1056+ <value />
1057+ </tags>
1058+ <code>
1059+ <value><![CDATA[
10651060 ret = cryEncryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
10661061
10671062 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1073,17 +1068,17 @@
10731068 }
10741069
10751070 ]]></value>
1076- </code>
1077- </step>
1078- <step>
1079- <description>
1080- <value>Decrypt</value>
1081- </description>
1082- <tags>
1083- <value />
1084- </tags>
1085- <code>
1086- <value><![CDATA[
1071+ </code>
1072+ </step>
1073+ <step>
1074+ <description>
1075+ <value>Decrypt</value>
1076+ </description>
1077+ <tags>
1078+ <value />
1079+ </tags>
1080+ <code>
1081+ <value><![CDATA[
10871082 ret = cryDecryptAES_CFB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
10881083
10891084 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1095,29 +1090,29 @@
10951090 }
10961091
10971092 ]]></value>
1098- </code>
1099- </step>
1100- </steps>
1101- </case>
1102- </cases>
1103- </sequence>
1093+ </code>
1094+ </step>
1095+ </steps>
1096+ </case>
1097+ </cases>
1098+ </sequence>
11041099
11051100
1106-<sequence>
1107- <type index="0">
1108- <value>Internal Tests</value>
1109- </type>
1110- <brief>
1111- <value>AES CBC</value>
1112- </brief>
1113- <description>
1114- <value>AES CBC</value>
1115- </description>
1116- <condition>
1117- <value />
1118- </condition>
1119- <shared_code>
1120- <value><![CDATA[
1101+ <sequence>
1102+ <type index="0">
1103+ <value>Internal Tests</value>
1104+ </type>
1105+ <brief>
1106+ <value>AES CBC</value>
1107+ </brief>
1108+ <description>
1109+ <value>AES CBC</value>
1110+ </description>
1111+ <condition>
1112+ <value />
1113+ </condition>
1114+ <shared_code>
1115+ <value><![CDATA[
11211116 #include <string.h>
11221117 #include "ref_aes.h"
11231118 static const CRYConfig config_Polling = {
@@ -1130,21 +1125,21 @@
11301125 AES_CFBS_128 //cfbs
11311126 };
11321127 ]]></value>
1133- </shared_code>
1134- <cases>
1135- <case>
1136- <brief>
1137- <value>AES CBC Polling</value>
1138- </brief>
1139- <description>
1140- <value>testing AES CBC with various Keys</value>
1141- </description>
1142- <condition>
1143- <value />
1144- </condition>
1145- <various_code>
1146- <setup_code>
1147- <value><![CDATA[
1128+ </shared_code>
1129+ <cases>
1130+ <case>
1131+ <brief>
1132+ <value>AES CBC Polling</value>
1133+ </brief>
1134+ <description>
1135+ <value>testing AES CBC with various Keys</value>
1136+ </description>
1137+ <condition>
1138+ <value />
1139+ </condition>
1140+ <various_code>
1141+ <setup_code>
1142+ <value><![CDATA[
11481143 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
11491144 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
11501145 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -1151,41 +1146,41 @@
11511146 cryStart(&CRYD1, &config_Polling);
11521147
11531148 ]]></value>
1154- </setup_code>
1155- <teardown_code>
1156- <value><![CDATA[cryStop(&CRYD1);]]></value>
1157- </teardown_code>
1158- <local_variables>
1159- <value><![CDATA[
1149+ </setup_code>
1150+ <teardown_code>
1151+ <value><![CDATA[cryStop(&CRYD1);]]></value>
1152+ </teardown_code>
1153+ <local_variables>
1154+ <value><![CDATA[
11601155 cryerror_t ret;
11611156 ]]></value>
1162- </local_variables>
1163- </various_code>
1164- <steps>
1165- <step>
1166- <description>
1167- <value>loading the key with 16 byte size</value>
1168- </description>
1169- <tags>
1170- <value />
1171- </tags>
1172- <code>
1173- <value><![CDATA[
1157+ </local_variables>
1158+ </various_code>
1159+ <steps>
1160+ <step>
1161+ <description>
1162+ <value>loading the key with 16 byte size</value>
1163+ </description>
1164+ <tags>
1165+ <value />
1166+ </tags>
1167+ <code>
1168+ <value><![CDATA[
11741169 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,16, (uint8_t *) test_keys);
11751170
11761171 test_assert(ret == CRY_NOERROR, "failed load transient key");
11771172 ]]></value>
1178- </code>
1179- </step>
1180- <step>
1181- <description>
1182- <value>Encrypt</value>
1183- </description>
1184- <tags>
1185- <value />
1186- </tags>
1187- <code>
1188- <value><![CDATA[
1173+ </code>
1174+ </step>
1175+ <step>
1176+ <description>
1177+ <value>Encrypt</value>
1178+ </description>
1179+ <tags>
1180+ <value />
1181+ </tags>
1182+ <code>
1183+ <value><![CDATA[
11891184 ret = cryEncryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
11901185
11911186 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1195,19 +1190,18 @@
11951190 for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
11961191 test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_128)[i], "encrypt mismatch");
11971192 }
1198-
11991193 ]]></value>
1200- </code>
1201- </step>
1202- <step>
1203- <description>
1204- <value>Decrypt</value>
1205- </description>
1206- <tags>
1207- <value />
1208- </tags>
1209- <code>
1210- <value><![CDATA[
1194+ </code>
1195+ </step>
1196+ <step>
1197+ <description>
1198+ <value>Decrypt</value>
1199+ </description>
1200+ <tags>
1201+ <value />
1202+ </tags>
1203+ <code>
1204+ <value><![CDATA[
12111205 ret = cryDecryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
12121206
12131207 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1217,34 +1211,33 @@
12171211 for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
12181212 test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch");
12191213 }
1220-
12211214 ]]></value>
1222- </code>
1223- </step>
1224- <step>
1225- <description>
1226- <value>loading the key with 24 byte size</value>
1227- </description>
1228- <tags>
1229- <value />
1230- </tags>
1231- <code>
1232- <value><![CDATA[
1215+ </code>
1216+ </step>
1217+ <step>
1218+ <description>
1219+ <value>loading the key with 24 byte size</value>
1220+ </description>
1221+ <tags>
1222+ <value />
1223+ </tags>
1224+ <code>
1225+ <value><![CDATA[
12331226 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,24, (uint8_t *) test_keys);
12341227
12351228 test_assert(ret == CRY_NOERROR, "failed load transient key");
12361229 ]]></value>
1237- </code>
1238- </step>
1239- <step>
1240- <description>
1241- <value>Encrypt</value>
1242- </description>
1243- <tags>
1244- <value />
1245- </tags>
1246- <code>
1247- <value><![CDATA[
1230+ </code>
1231+ </step>
1232+ <step>
1233+ <description>
1234+ <value>Encrypt</value>
1235+ </description>
1236+ <tags>
1237+ <value />
1238+ </tags>
1239+ <code>
1240+ <value><![CDATA[
12481241 ret = cryEncryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
12491242
12501243 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1254,19 +1247,18 @@
12541247 for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
12551248 test_assert(msg_encrypted[i] == ((uint32_t*) refAES_CBC_192)[i], "encrypt mismatch");
12561249 }
1257-
12581250 ]]></value>
1259- </code>
1260- </step>
1261- <step>
1262- <description>
1263- <value>Decrypt</value>
1264- </description>
1265- <tags>
1266- <value />
1267- </tags>
1268- <code>
1269- <value><![CDATA[
1251+ </code>
1252+ </step>
1253+ <step>
1254+ <description>
1255+ <value>Decrypt</value>
1256+ </description>
1257+ <tags>
1258+ <value />
1259+ </tags>
1260+ <code>
1261+ <value><![CDATA[
12701262 ret = cryDecryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
12711263
12721264 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1276,34 +1268,33 @@
12761268 for (int i = 0; i < TEST_DATA_WORD_LEN; i++) {
12771269 test_assert(msg_decrypted[i] == msg_clear[i], "decrypt mismatch");
12781270 }
1279-
12801271 ]]></value>
1281- </code>
1282- </step>
1283- <step>
1284- <description>
1285- <value>loading the key with 32 byte size</value>
1286- </description>
1287- <tags>
1288- <value />
1289- </tags>
1290- <code>
1291- <value><![CDATA[
1272+ </code>
1273+ </step>
1274+ <step>
1275+ <description>
1276+ <value>loading the key with 32 byte size</value>
1277+ </description>
1278+ <tags>
1279+ <value />
1280+ </tags>
1281+ <code>
1282+ <value><![CDATA[
12921283 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,32, (uint8_t *) test_keys);
12931284
12941285 test_assert(ret == CRY_NOERROR, "failed load transient key");
12951286 ]]></value>
1296- </code>
1297- </step>
1298- <step>
1299- <description>
1300- <value>Encrypt</value>
1301- </description>
1302- <tags>
1303- <value />
1304- </tags>
1305- <code>
1306- <value><![CDATA[
1287+ </code>
1288+ </step>
1289+ <step>
1290+ <description>
1291+ <value>Encrypt</value>
1292+ </description>
1293+ <tags>
1294+ <value />
1295+ </tags>
1296+ <code>
1297+ <value><![CDATA[
13071298 ret = cryEncryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
13081299
13091300 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1315,17 +1306,17 @@
13151306 }
13161307
13171308 ]]></value>
1318- </code>
1319- </step>
1320- <step>
1321- <description>
1322- <value>Decrypt</value>
1323- </description>
1324- <tags>
1325- <value />
1326- </tags>
1327- <code>
1328- <value><![CDATA[
1309+ </code>
1310+ </step>
1311+ <step>
1312+ <description>
1313+ <value>Decrypt</value>
1314+ </description>
1315+ <tags>
1316+ <value />
1317+ </tags>
1318+ <code>
1319+ <value><![CDATA[
13291320 ret = cryDecryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
13301321
13311322 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1337,23 +1328,23 @@
13371328 }
13381329
13391330 ]]></value>
1340- </code>
1341- </step>
1342- </steps>
1343- </case>
1344- <case>
1345- <brief>
1346- <value>AES CBC DMA</value>
1347- </brief>
1348- <description>
1349- <value>testing AES CBC with various Keys</value>
1350- </description>
1351- <condition>
1352- <value />
1353- </condition>
1354- <various_code>
1355- <setup_code>
1356- <value><![CDATA[
1331+ </code>
1332+ </step>
1333+ </steps>
1334+ </case>
1335+ <case>
1336+ <brief>
1337+ <value>AES CBC DMA</value>
1338+ </brief>
1339+ <description>
1340+ <value>testing AES CBC with various Keys</value>
1341+ </description>
1342+ <condition>
1343+ <value />
1344+ </condition>
1345+ <various_code>
1346+ <setup_code>
1347+ <value><![CDATA[
13571348 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
13581349 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
13591350 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -1360,41 +1351,41 @@
13601351 cryStart(&CRYD1, &config_DMA);
13611352
13621353 ]]></value>
1363- </setup_code>
1364- <teardown_code>
1365- <value><![CDATA[cryStop(&CRYD1);]]></value>
1366- </teardown_code>
1367- <local_variables>
1368- <value><![CDATA[
1354+ </setup_code>
1355+ <teardown_code>
1356+ <value><![CDATA[cryStop(&CRYD1);]]></value>
1357+ </teardown_code>
1358+ <local_variables>
1359+ <value><![CDATA[
13691360 cryerror_t ret;
13701361 ]]></value>
1371- </local_variables>
1372- </various_code>
1373- <steps>
1374- <step>
1375- <description>
1376- <value>loading the key with 16 byte size</value>
1377- </description>
1378- <tags>
1379- <value />
1380- </tags>
1381- <code>
1382- <value><![CDATA[
1362+ </local_variables>
1363+ </various_code>
1364+ <steps>
1365+ <step>
1366+ <description>
1367+ <value>loading the key with 16 byte size</value>
1368+ </description>
1369+ <tags>
1370+ <value />
1371+ </tags>
1372+ <code>
1373+ <value><![CDATA[
13831374 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,16, (uint8_t *) test_keys);
13841375
13851376 test_assert(ret == CRY_NOERROR, "failed load transient key");
13861377 ]]></value>
1387- </code>
1388- </step>
1389- <step>
1390- <description>
1391- <value>Encrypt</value>
1392- </description>
1393- <tags>
1394- <value />
1395- </tags>
1396- <code>
1397- <value><![CDATA[
1378+ </code>
1379+ </step>
1380+ <step>
1381+ <description>
1382+ <value>Encrypt</value>
1383+ </description>
1384+ <tags>
1385+ <value />
1386+ </tags>
1387+ <code>
1388+ <value><![CDATA[
13981389 ret = cryEncryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
13991390
14001391 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1406,17 +1397,17 @@
14061397 }
14071398
14081399 ]]></value>
1409- </code>
1410- </step>
1411- <step>
1412- <description>
1413- <value>Decrypt</value>
1414- </description>
1415- <tags>
1416- <value />
1417- </tags>
1418- <code>
1419- <value><![CDATA[
1400+ </code>
1401+ </step>
1402+ <step>
1403+ <description>
1404+ <value>Decrypt</value>
1405+ </description>
1406+ <tags>
1407+ <value />
1408+ </tags>
1409+ <code>
1410+ <value><![CDATA[
14201411 ret = cryDecryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
14211412
14221413 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1428,32 +1419,32 @@
14281419 }
14291420
14301421 ]]></value>
1431- </code>
1432- </step>
1433- <step>
1434- <description>
1435- <value>loading the key with 24 byte size</value>
1436- </description>
1437- <tags>
1438- <value />
1439- </tags>
1440- <code>
1441- <value><![CDATA[
1422+ </code>
1423+ </step>
1424+ <step>
1425+ <description>
1426+ <value>loading the key with 24 byte size</value>
1427+ </description>
1428+ <tags>
1429+ <value />
1430+ </tags>
1431+ <code>
1432+ <value><![CDATA[
14421433 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,24, (uint8_t *) test_keys);
14431434
14441435 test_assert(ret == CRY_NOERROR, "failed load transient key");
14451436 ]]></value>
1446- </code>
1447- </step>
1448- <step>
1449- <description>
1450- <value>Encrypt</value>
1451- </description>
1452- <tags>
1453- <value />
1454- </tags>
1455- <code>
1456- <value><![CDATA[
1437+ </code>
1438+ </step>
1439+ <step>
1440+ <description>
1441+ <value>Encrypt</value>
1442+ </description>
1443+ <tags>
1444+ <value />
1445+ </tags>
1446+ <code>
1447+ <value><![CDATA[
14571448 ret = cryEncryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
14581449
14591450 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1465,17 +1456,17 @@
14651456 }
14661457
14671458 ]]></value>
1468- </code>
1469- </step>
1470- <step>
1471- <description>
1472- <value>Decrypt</value>
1473- </description>
1474- <tags>
1475- <value />
1476- </tags>
1477- <code>
1478- <value><![CDATA[
1459+ </code>
1460+ </step>
1461+ <step>
1462+ <description>
1463+ <value>Decrypt</value>
1464+ </description>
1465+ <tags>
1466+ <value />
1467+ </tags>
1468+ <code>
1469+ <value><![CDATA[
14791470 ret = cryDecryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
14801471
14811472 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1487,32 +1478,32 @@
14871478 }
14881479
14891480 ]]></value>
1490- </code>
1491- </step>
1492- <step>
1493- <description>
1494- <value>loading the key with 32 byte size</value>
1495- </description>
1496- <tags>
1497- <value />
1498- </tags>
1499- <code>
1500- <value><![CDATA[
1481+ </code>
1482+ </step>
1483+ <step>
1484+ <description>
1485+ <value>loading the key with 32 byte size</value>
1486+ </description>
1487+ <tags>
1488+ <value />
1489+ </tags>
1490+ <code>
1491+ <value><![CDATA[
15011492 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_aes,32, (uint8_t *) test_keys);
15021493
15031494 test_assert(ret == CRY_NOERROR, "failed load transient key");
15041495 ]]></value>
1505- </code>
1506- </step>
1507- <step>
1508- <description>
1509- <value>Encrypt</value>
1510- </description>
1511- <tags>
1512- <value />
1513- </tags>
1514- <code>
1515- <value><![CDATA[
1496+ </code>
1497+ </step>
1498+ <step>
1499+ <description>
1500+ <value>Encrypt</value>
1501+ </description>
1502+ <tags>
1503+ <value />
1504+ </tags>
1505+ <code>
1506+ <value><![CDATA[
15161507 ret = cryEncryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
15171508
15181509 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1524,17 +1515,17 @@
15241515 }
15251516
15261517 ]]></value>
1527- </code>
1528- </step>
1529- <step>
1530- <description>
1531- <value>Decrypt</value>
1532- </description>
1533- <tags>
1534- <value />
1535- </tags>
1536- <code>
1537- <value><![CDATA[
1518+ </code>
1519+ </step>
1520+ <step>
1521+ <description>
1522+ <value>Decrypt</value>
1523+ </description>
1524+ <tags>
1525+ <value />
1526+ </tags>
1527+ <code>
1528+ <value><![CDATA[
15381529 ret = cryDecryptAES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
15391530
15401531 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1546,29 +1537,29 @@
15461537 }
15471538
15481539 ]]></value>
1549- </code>
1550- </step>
1551- </steps>
1552- </case>
1553- </cases>
1554- </sequence>
1540+ </code>
1541+ </step>
1542+ </steps>
1543+ </case>
1544+ </cases>
1545+ </sequence>
15551546
1556-
1557-<sequence>
1558- <type index="0">
1559- <value>Internal Tests</value>
1560- </type>
1561- <brief>
1562- <value>(T)DES</value>
1563- </brief>
1564- <description>
1565- <value>(T)DES testing</value>
1566- </description>
1567- <condition>
1568- <value />
1569- </condition>
1570- <shared_code>
1571- <value><![CDATA[
1547+
1548+ <sequence>
1549+ <type index="0">
1550+ <value>Internal Tests</value>
1551+ </type>
1552+ <brief>
1553+ <value>(T)DES</value>
1554+ </brief>
1555+ <description>
1556+ <value>(T)DES testing</value>
1557+ </description>
1558+ <condition>
1559+ <value />
1560+ </condition>
1561+ <shared_code>
1562+ <value><![CDATA[
15721563 #include <string.h>
15731564 #include "ref_des.h"
15741565 static const CRYConfig configDES_Polling=
@@ -1584,21 +1575,21 @@
15841575 };
15851576
15861577 ]]></value>
1587- </shared_code>
1588- <cases>
1589- <case>
1590- <brief>
1591- <value>DES Polling</value>
1592- </brief>
1593- <description>
1594- <value>testing DES in polled mode</value>
1595- </description>
1596- <condition>
1597- <value />
1598- </condition>
1599- <various_code>
1600- <setup_code>
1601- <value><![CDATA[
1578+ </shared_code>
1579+ <cases>
1580+ <case>
1581+ <brief>
1582+ <value>DES Polling</value>
1583+ </brief>
1584+ <description>
1585+ <value>testing DES in polled mode</value>
1586+ </description>
1587+ <condition>
1588+ <value />
1589+ </condition>
1590+ <various_code>
1591+ <setup_code>
1592+ <value><![CDATA[
16021593 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
16031594 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
16041595 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -1605,41 +1596,41 @@
16051596 cryStart(&CRYD1, &configDES_Polling);
16061597
16071598 ]]></value>
1608- </setup_code>
1609- <teardown_code>
1610- <value><![CDATA[cryStop(&CRYD1);]]></value>
1611- </teardown_code>
1612- <local_variables>
1613- <value><![CDATA[
1599+ </setup_code>
1600+ <teardown_code>
1601+ <value><![CDATA[cryStop(&CRYD1);]]></value>
1602+ </teardown_code>
1603+ <local_variables>
1604+ <value><![CDATA[
16141605 cryerror_t ret;
16151606 ]]></value>
1616- </local_variables>
1617- </various_code>
1618- <steps>
1619- <step>
1620- <description>
1621- <value>loading the key with 8 byte size</value>
1622- </description>
1623- <tags>
1624- <value />
1625- </tags>
1626- <code>
1627- <value><![CDATA[
1607+ </local_variables>
1608+ </various_code>
1609+ <steps>
1610+ <step>
1611+ <description>
1612+ <value>loading the key with 8 byte size</value>
1613+ </description>
1614+ <tags>
1615+ <value />
1616+ </tags>
1617+ <code>
1618+ <value><![CDATA[
16281619 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_des,8, (uint8_t *) test_keys);
16291620
16301621 test_assert(ret == CRY_NOERROR, "failed load transient key");
16311622 ]]></value>
1632- </code>
1633- </step>
1634- <step>
1635- <description>
1636- <value>Encrypt</value>
1637- </description>
1638- <tags>
1639- <value />
1640- </tags>
1641- <code>
1642- <value><![CDATA[
1623+ </code>
1624+ </step>
1625+ <step>
1626+ <description>
1627+ <value>Encrypt</value>
1628+ </description>
1629+ <tags>
1630+ <value />
1631+ </tags>
1632+ <code>
1633+ <value><![CDATA[
16431634 ret = cryEncryptDES(&CRYD1, 0, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
16441635
16451636 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1651,17 +1642,17 @@
16511642 }
16521643
16531644 ]]></value>
1654- </code>
1655- </step>
1656- <step>
1657- <description>
1658- <value>Decrypt</value>
1659- </description>
1660- <tags>
1661- <value />
1662- </tags>
1663- <code>
1664- <value><![CDATA[
1645+ </code>
1646+ </step>
1647+ <step>
1648+ <description>
1649+ <value>Decrypt</value>
1650+ </description>
1651+ <tags>
1652+ <value />
1653+ </tags>
1654+ <code>
1655+ <value><![CDATA[
16651656 ret = cryDecryptDES(&CRYD1, 0, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
16661657
16671658 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1673,29 +1664,29 @@
16731664 }
16741665
16751666 ]]></value>
1676- </code>
1677- </step>
1678-
1679-
1667+ </code>
1668+ </step>
16801669
1681-
1682-
1683- </steps>
1684- </case>
1685-
1686- <case>
1687- <brief>
1688- <value>TDES CBC Polling</value>
1689- </brief>
1690- <description>
1691- <value>testing TDES CBC in polled mode</value>
1692- </description>
1693- <condition>
1694- <value />
1695- </condition>
1696- <various_code>
1697- <setup_code>
1698- <value><![CDATA[
1670+
1671+
1672+
1673+
1674+ </steps>
1675+ </case>
1676+
1677+ <case>
1678+ <brief>
1679+ <value>TDES CBC Polling</value>
1680+ </brief>
1681+ <description>
1682+ <value>testing TDES CBC in polled mode</value>
1683+ </description>
1684+ <condition>
1685+ <value />
1686+ </condition>
1687+ <various_code>
1688+ <setup_code>
1689+ <value><![CDATA[
16991690 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
17001691 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
17011692 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -1702,41 +1693,41 @@
17021693 cryStart(&CRYD1, &configDES_Polling);
17031694
17041695 ]]></value>
1705- </setup_code>
1706- <teardown_code>
1707- <value><![CDATA[cryStop(&CRYD1);]]></value>
1708- </teardown_code>
1709- <local_variables>
1710- <value><![CDATA[
1696+ </setup_code>
1697+ <teardown_code>
1698+ <value><![CDATA[cryStop(&CRYD1);]]></value>
1699+ </teardown_code>
1700+ <local_variables>
1701+ <value><![CDATA[
17111702 cryerror_t ret;
17121703 ]]></value>
1713- </local_variables>
1714- </various_code>
1715- <steps>
1716- <step>
1717- <description>
1718- <value>loading the key with 16 byte size</value>
1719- </description>
1720- <tags>
1721- <value />
1722- </tags>
1723- <code>
1724- <value><![CDATA[
1704+ </local_variables>
1705+ </various_code>
1706+ <steps>
1707+ <step>
1708+ <description>
1709+ <value>loading the key with 16 byte size</value>
1710+ </description>
1711+ <tags>
1712+ <value />
1713+ </tags>
1714+ <code>
1715+ <value><![CDATA[
17251716 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_des,16, (uint8_t *) test_keys);
17261717
17271718 test_assert(ret == CRY_NOERROR, "failed load transient key");
17281719 ]]></value>
1729- </code>
1730- </step>
1731- <step>
1732- <description>
1733- <value>Encrypt</value>
1734- </description>
1735- <tags>
1736- <value />
1737- </tags>
1738- <code>
1739- <value><![CDATA[
1720+ </code>
1721+ </step>
1722+ <step>
1723+ <description>
1724+ <value>Encrypt</value>
1725+ </description>
1726+ <tags>
1727+ <value />
1728+ </tags>
1729+ <code>
1730+ <value><![CDATA[
17401731 ret = cryEncryptDES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
17411732
17421733 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1748,17 +1739,17 @@
17481739 }
17491740
17501741 ]]></value>
1751- </code>
1752- </step>
1753- <step>
1754- <description>
1755- <value>Decrypt</value>
1756- </description>
1757- <tags>
1758- <value />
1759- </tags>
1760- <code>
1761- <value><![CDATA[
1742+ </code>
1743+ </step>
1744+ <step>
1745+ <description>
1746+ <value>Decrypt</value>
1747+ </description>
1748+ <tags>
1749+ <value />
1750+ </tags>
1751+ <code>
1752+ <value><![CDATA[
17621753 ret = cryDecryptDES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
17631754
17641755 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1770,32 +1761,32 @@
17701761 }
17711762
17721763 ]]></value>
1773- </code>
1774- </step>
1775- <step>
1776- <description>
1777- <value>loading the key with 24 byte size</value>
1778- </description>
1779- <tags>
1780- <value />
1781- </tags>
1782- <code>
1783- <value><![CDATA[
1764+ </code>
1765+ </step>
1766+ <step>
1767+ <description>
1768+ <value>loading the key with 24 byte size</value>
1769+ </description>
1770+ <tags>
1771+ <value />
1772+ </tags>
1773+ <code>
1774+ <value><![CDATA[
17841775 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_des,24, (uint8_t *) test_keys);
17851776
17861777 test_assert(ret == CRY_NOERROR, "failed load transient key");
17871778 ]]></value>
1788- </code>
1789- </step>
1790- <step>
1791- <description>
1792- <value>Encrypt</value>
1793- </description>
1794- <tags>
1795- <value />
1796- </tags>
1797- <code>
1798- <value><![CDATA[
1779+ </code>
1780+ </step>
1781+ <step>
1782+ <description>
1783+ <value>Encrypt</value>
1784+ </description>
1785+ <tags>
1786+ <value />
1787+ </tags>
1788+ <code>
1789+ <value><![CDATA[
17991790 ret = cryEncryptDES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
18001791
18011792 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1807,17 +1798,17 @@
18071798 }
18081799
18091800 ]]></value>
1810- </code>
1811- </step>
1812- <step>
1813- <description>
1814- <value>Decrypt</value>
1815- </description>
1816- <tags>
1817- <value />
1818- </tags>
1819- <code>
1820- <value><![CDATA[
1801+ </code>
1802+ </step>
1803+ <step>
1804+ <description>
1805+ <value>Decrypt</value>
1806+ </description>
1807+ <tags>
1808+ <value />
1809+ </tags>
1810+ <code>
1811+ <value><![CDATA[
18211812 ret = cryDecryptDES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
18221813
18231814 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1829,26 +1820,26 @@
18291820 }
18301821
18311822 ]]></value>
1832- </code>
1833- </step>
1834-
1835-
1823+ </code>
1824+ </step>
18361825
1837- </steps>
1838- </case>
1839- <case>
1840- <brief>
1841- <value>TDES ECB Polling</value>
1842- </brief>
1843- <description>
1844- <value>testing TDES ECB in polling mode</value>
1845- </description>
1846- <condition>
1847- <value />
1848- </condition>
1849- <various_code>
1850- <setup_code>
1851- <value><![CDATA[
1826+
1827+
1828+ </steps>
1829+ </case>
1830+ <case>
1831+ <brief>
1832+ <value>TDES ECB Polling</value>
1833+ </brief>
1834+ <description>
1835+ <value>testing TDES ECB in polling mode</value>
1836+ </description>
1837+ <condition>
1838+ <value />
1839+ </condition>
1840+ <various_code>
1841+ <setup_code>
1842+ <value><![CDATA[
18521843 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
18531844 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
18541845 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -1855,41 +1846,41 @@
18551846 cryStart(&CRYD1, &configDES_Polling);
18561847
18571848 ]]></value>
1858- </setup_code>
1859- <teardown_code>
1860- <value><![CDATA[cryStop(&CRYD1);]]></value>
1861- </teardown_code>
1862- <local_variables>
1863- <value><![CDATA[
1849+ </setup_code>
1850+ <teardown_code>
1851+ <value><![CDATA[cryStop(&CRYD1);]]></value>
1852+ </teardown_code>
1853+ <local_variables>
1854+ <value><![CDATA[
18641855 cryerror_t ret;
18651856 ]]></value>
1866- </local_variables>
1867- </various_code>
1868- <steps>
1869- <step>
1870- <description>
1871- <value>loading the key with 16 byte size</value>
1872- </description>
1873- <tags>
1874- <value />
1875- </tags>
1876- <code>
1877- <value><![CDATA[
1857+ </local_variables>
1858+ </various_code>
1859+ <steps>
1860+ <step>
1861+ <description>
1862+ <value>loading the key with 16 byte size</value>
1863+ </description>
1864+ <tags>
1865+ <value />
1866+ </tags>
1867+ <code>
1868+ <value><![CDATA[
18781869 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_des,16, (uint8_t *) test_keys);
18791870
18801871 test_assert(ret == CRY_NOERROR, "failed load transient key");
18811872 ]]></value>
1882- </code>
1883- </step>
1884- <step>
1885- <description>
1886- <value>Encrypt</value>
1887- </description>
1888- <tags>
1889- <value />
1890- </tags>
1891- <code>
1892- <value><![CDATA[
1873+ </code>
1874+ </step>
1875+ <step>
1876+ <description>
1877+ <value>Encrypt</value>
1878+ </description>
1879+ <tags>
1880+ <value />
1881+ </tags>
1882+ <code>
1883+ <value><![CDATA[
18931884 ret = cryEncryptDES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
18941885
18951886 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1901,17 +1892,17 @@
19011892 }
19021893
19031894 ]]></value>
1904- </code>
1905- </step>
1906- <step>
1907- <description>
1908- <value>Decrypt</value>
1909- </description>
1910- <tags>
1911- <value />
1912- </tags>
1913- <code>
1914- <value><![CDATA[
1895+ </code>
1896+ </step>
1897+ <step>
1898+ <description>
1899+ <value>Decrypt</value>
1900+ </description>
1901+ <tags>
1902+ <value />
1903+ </tags>
1904+ <code>
1905+ <value><![CDATA[
19151906 ret = cryDecryptDES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
19161907
19171908 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1923,32 +1914,32 @@
19231914 }
19241915
19251916 ]]></value>
1926- </code>
1927- </step>
1928- <step>
1929- <description>
1930- <value>loading the key with 24 byte size</value>
1931- </description>
1932- <tags>
1933- <value />
1934- </tags>
1935- <code>
1936- <value><![CDATA[
1917+ </code>
1918+ </step>
1919+ <step>
1920+ <description>
1921+ <value>loading the key with 24 byte size</value>
1922+ </description>
1923+ <tags>
1924+ <value />
1925+ </tags>
1926+ <code>
1927+ <value><![CDATA[
19371928 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_des,24, (uint8_t *) test_keys);
19381929
19391930 test_assert(ret == CRY_NOERROR, "failed load transient key");
19401931 ]]></value>
1941- </code>
1942- </step>
1943- <step>
1944- <description>
1945- <value>Encrypt</value>
1946- </description>
1947- <tags>
1948- <value />
1949- </tags>
1950- <code>
1951- <value><![CDATA[
1932+ </code>
1933+ </step>
1934+ <step>
1935+ <description>
1936+ <value>Encrypt</value>
1937+ </description>
1938+ <tags>
1939+ <value />
1940+ </tags>
1941+ <code>
1942+ <value><![CDATA[
19521943 ret = cryEncryptDES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
19531944
19541945 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -1960,17 +1951,17 @@
19601951 }
19611952
19621953 ]]></value>
1963- </code>
1964- </step>
1965- <step>
1966- <description>
1967- <value>Decrypt</value>
1968- </description>
1969- <tags>
1970- <value />
1971- </tags>
1972- <code>
1973- <value><![CDATA[
1954+ </code>
1955+ </step>
1956+ <step>
1957+ <description>
1958+ <value>Decrypt</value>
1959+ </description>
1960+ <tags>
1961+ <value />
1962+ </tags>
1963+ <code>
1964+ <value><![CDATA[
19741965 ret = cryDecryptDES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
19751966
19761967 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -1982,29 +1973,29 @@
19821973 }
19831974
19841975 ]]></value>
1985- </code>
1986- </step>
1976+ </code>
1977+ </step>
19871978
19881979
19891980
1990- </steps>
1991- </case>
1992-
1993-
1994-
1995- <case>
1996- <brief>
1997- <value>TDES CBC DMA</value>
1998- </brief>
1999- <description>
2000- <value>testing TDES CBC in polled mode</value>
2001- </description>
2002- <condition>
2003- <value />
2004- </condition>
2005- <various_code>
2006- <setup_code>
2007- <value><![CDATA[
1981+ </steps>
1982+ </case>
1983+
1984+
1985+
1986+ <case>
1987+ <brief>
1988+ <value>TDES CBC DMA</value>
1989+ </brief>
1990+ <description>
1991+ <value>testing TDES CBC in polled mode</value>
1992+ </description>
1993+ <condition>
1994+ <value />
1995+ </condition>
1996+ <various_code>
1997+ <setup_code>
1998+ <value><![CDATA[
20081999 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
20092000 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
20102001 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -2011,41 +2002,41 @@
20112002 cryStart(&CRYD1, &configDES_DMA);
20122003
20132004 ]]></value>
2014- </setup_code>
2015- <teardown_code>
2016- <value><![CDATA[cryStop(&CRYD1);]]></value>
2017- </teardown_code>
2018- <local_variables>
2019- <value><![CDATA[
2005+ </setup_code>
2006+ <teardown_code>
2007+ <value><![CDATA[cryStop(&CRYD1);]]></value>
2008+ </teardown_code>
2009+ <local_variables>
2010+ <value><![CDATA[
20202011 cryerror_t ret;
20212012 ]]></value>
2022- </local_variables>
2023- </various_code>
2024- <steps>
2025- <step>
2026- <description>
2027- <value>loading the key with 16 byte size</value>
2028- </description>
2029- <tags>
2030- <value />
2031- </tags>
2032- <code>
2033- <value><![CDATA[
2013+ </local_variables>
2014+ </various_code>
2015+ <steps>
2016+ <step>
2017+ <description>
2018+ <value>loading the key with 16 byte size</value>
2019+ </description>
2020+ <tags>
2021+ <value />
2022+ </tags>
2023+ <code>
2024+ <value><![CDATA[
20342025 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_des,16, (uint8_t *) test_keys);
20352026
20362027 test_assert(ret == CRY_NOERROR, "failed load transient key");
20372028 ]]></value>
2038- </code>
2039- </step>
2040- <step>
2041- <description>
2042- <value>Encrypt</value>
2043- </description>
2044- <tags>
2045- <value />
2046- </tags>
2047- <code>
2048- <value><![CDATA[
2029+ </code>
2030+ </step>
2031+ <step>
2032+ <description>
2033+ <value>Encrypt</value>
2034+ </description>
2035+ <tags>
2036+ <value />
2037+ </tags>
2038+ <code>
2039+ <value><![CDATA[
20492040 ret = cryEncryptDES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
20502041
20512042 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -2057,17 +2048,17 @@
20572048 }
20582049
20592050 ]]></value>
2060- </code>
2061- </step>
2062- <step>
2063- <description>
2064- <value>Decrypt</value>
2065- </description>
2066- <tags>
2067- <value />
2068- </tags>
2069- <code>
2070- <value><![CDATA[
2051+ </code>
2052+ </step>
2053+ <step>
2054+ <description>
2055+ <value>Decrypt</value>
2056+ </description>
2057+ <tags>
2058+ <value />
2059+ </tags>
2060+ <code>
2061+ <value><![CDATA[
20712062 ret = cryDecryptDES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
20722063
20732064 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -2079,32 +2070,32 @@
20792070 }
20802071
20812072 ]]></value>
2082- </code>
2083- </step>
2084- <step>
2085- <description>
2086- <value>loading the key with 24 byte size</value>
2087- </description>
2088- <tags>
2089- <value />
2090- </tags>
2091- <code>
2092- <value><![CDATA[
2073+ </code>
2074+ </step>
2075+ <step>
2076+ <description>
2077+ <value>loading the key with 24 byte size</value>
2078+ </description>
2079+ <tags>
2080+ <value />
2081+ </tags>
2082+ <code>
2083+ <value><![CDATA[
20932084 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_des,24, (uint8_t *) test_keys);
20942085
20952086 test_assert(ret == CRY_NOERROR, "failed load transient key");
20962087 ]]></value>
2097- </code>
2098- </step>
2099- <step>
2100- <description>
2101- <value>Encrypt</value>
2102- </description>
2103- <tags>
2104- <value />
2105- </tags>
2106- <code>
2107- <value><![CDATA[
2088+ </code>
2089+ </step>
2090+ <step>
2091+ <description>
2092+ <value>Encrypt</value>
2093+ </description>
2094+ <tags>
2095+ <value />
2096+ </tags>
2097+ <code>
2098+ <value><![CDATA[
21082099 ret = cryEncryptDES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted,(uint8_t*)test_vectors);
21092100
21102101 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -2116,17 +2107,17 @@
21162107 }
21172108
21182109 ]]></value>
2119- </code>
2120- </step>
2121- <step>
2122- <description>
2123- <value>Decrypt</value>
2124- </description>
2125- <tags>
2126- <value />
2127- </tags>
2128- <code>
2129- <value><![CDATA[
2110+ </code>
2111+ </step>
2112+ <step>
2113+ <description>
2114+ <value>Decrypt</value>
2115+ </description>
2116+ <tags>
2117+ <value />
2118+ </tags>
2119+ <code>
2120+ <value><![CDATA[
21302121 ret = cryDecryptDES_CBC(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted,(uint8_t*)test_vectors);
21312122
21322123 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -2138,26 +2129,26 @@
21382129 }
21392130
21402131 ]]></value>
2141- </code>
2142- </step>
2143-
2144-
2132+ </code>
2133+ </step>
21452134
2146- </steps>
2147- </case>
2148- <case>
2149- <brief>
2150- <value>TDES ECB DMA</value>
2151- </brief>
2152- <description>
2153- <value>testing TDES ECB in DMA mode</value>
2154- </description>
2155- <condition>
2156- <value />
2157- </condition>
2158- <various_code>
2159- <setup_code>
2160- <value><![CDATA[
2135+
2136+
2137+ </steps>
2138+ </case>
2139+ <case>
2140+ <brief>
2141+ <value>TDES ECB DMA</value>
2142+ </brief>
2143+ <description>
2144+ <value>testing TDES ECB in DMA mode</value>
2145+ </description>
2146+ <condition>
2147+ <value />
2148+ </condition>
2149+ <various_code>
2150+ <setup_code>
2151+ <value><![CDATA[
21612152 memcpy((char*) msg_clear, test_plain_data, TEST_DATA_BYTE_LEN);
21622153 memset(msg_encrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
21632154 memset(msg_decrypted, 0xff, TEST_MSG_DATA_BYTE_LEN);
@@ -2164,41 +2155,41 @@
21642155 cryStart(&CRYD1, &configDES_DMA);
21652156
21662157 ]]></value>
2167- </setup_code>
2168- <teardown_code>
2169- <value><![CDATA[cryStop(&CRYD1);]]></value>
2170- </teardown_code>
2171- <local_variables>
2172- <value><![CDATA[
2158+ </setup_code>
2159+ <teardown_code>
2160+ <value><![CDATA[cryStop(&CRYD1);]]></value>
2161+ </teardown_code>
2162+ <local_variables>
2163+ <value><![CDATA[
21732164 cryerror_t ret;
21742165 ]]></value>
2175- </local_variables>
2176- </various_code>
2177- <steps>
2178- <step>
2179- <description>
2180- <value>loading the key with 16 byte size</value>
2181- </description>
2182- <tags>
2183- <value />
2184- </tags>
2185- <code>
2186- <value><![CDATA[
2166+ </local_variables>
2167+ </various_code>
2168+ <steps>
2169+ <step>
2170+ <description>
2171+ <value>loading the key with 16 byte size</value>
2172+ </description>
2173+ <tags>
2174+ <value />
2175+ </tags>
2176+ <code>
2177+ <value><![CDATA[
21872178 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_des,16, (uint8_t *) test_keys);
21882179
21892180 test_assert(ret == CRY_NOERROR, "failed load transient key");
21902181 ]]></value>
2191- </code>
2192- </step>
2193- <step>
2194- <description>
2195- <value>Encrypt</value>
2196- </description>
2197- <tags>
2198- <value />
2199- </tags>
2200- <code>
2201- <value><![CDATA[
2182+ </code>
2183+ </step>
2184+ <step>
2185+ <description>
2186+ <value>Encrypt</value>
2187+ </description>
2188+ <tags>
2189+ <value />
2190+ </tags>
2191+ <code>
2192+ <value><![CDATA[
22022193 ret = cryEncryptDES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
22032194
22042195 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -2210,17 +2201,17 @@
22102201 }
22112202
22122203 ]]></value>
2213- </code>
2214- </step>
2215- <step>
2216- <description>
2217- <value>Decrypt</value>
2218- </description>
2219- <tags>
2220- <value />
2221- </tags>
2222- <code>
2223- <value><![CDATA[
2204+ </code>
2205+ </step>
2206+ <step>
2207+ <description>
2208+ <value>Decrypt</value>
2209+ </description>
2210+ <tags>
2211+ <value />
2212+ </tags>
2213+ <code>
2214+ <value><![CDATA[
22242215 ret = cryDecryptDES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
22252216
22262217 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -2232,32 +2223,32 @@
22322223 }
22332224
22342225 ]]></value>
2235- </code>
2236- </step>
2237- <step>
2238- <description>
2239- <value>loading the key with 24 byte size</value>
2240- </description>
2241- <tags>
2242- <value />
2243- </tags>
2244- <code>
2245- <value><![CDATA[
2226+ </code>
2227+ </step>
2228+ <step>
2229+ <description>
2230+ <value>loading the key with 24 byte size</value>
2231+ </description>
2232+ <tags>
2233+ <value />
2234+ </tags>
2235+ <code>
2236+ <value><![CDATA[
22462237 ret = cryLoadTransientKey(&CRYD1, (cryalgorithm_t) cry_algo_des,24, (uint8_t *) test_keys);
22472238
22482239 test_assert(ret == CRY_NOERROR, "failed load transient key");
22492240 ]]></value>
2250- </code>
2251- </step>
2252- <step>
2253- <description>
2254- <value>Encrypt</value>
2255- </description>
2256- <tags>
2257- <value />
2258- </tags>
2259- <code>
2260- <value><![CDATA[
2241+ </code>
2242+ </step>
2243+ <step>
2244+ <description>
2245+ <value>Encrypt</value>
2246+ </description>
2247+ <tags>
2248+ <value />
2249+ </tags>
2250+ <code>
2251+ <value><![CDATA[
22612252 ret = cryEncryptDES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_clear, (uint8_t*) msg_encrypted);
22622253
22632254 test_assert(ret == CRY_NOERROR, "encrypt failed");
@@ -2269,17 +2260,17 @@
22692260 }
22702261
22712262 ]]></value>
2272- </code>
2273- </step>
2274- <step>
2275- <description>
2276- <value>Decrypt</value>
2277- </description>
2278- <tags>
2279- <value />
2280- </tags>
2281- <code>
2282- <value><![CDATA[
2263+ </code>
2264+ </step>
2265+ <step>
2266+ <description>
2267+ <value>Decrypt</value>
2268+ </description>
2269+ <tags>
2270+ <value />
2271+ </tags>
2272+ <code>
2273+ <value><![CDATA[
22832274 ret = cryDecryptDES_ECB(&CRYD1, 0,TEST_DATA_BYTE_LEN, (uint8_t*) msg_encrypted, (uint8_t*) msg_decrypted);
22842275
22852276 test_assert(ret == CRY_NOERROR, "decrypt failed");
@@ -2291,36 +2282,36 @@
22912282 }
22922283
22932284 ]]></value>
2294- </code>
2295- </step>
2285+ </code>
2286+ </step>
22962287
22972288
22982289
2299- </steps>
2300- </case>
2301-
2290+ </steps>
2291+ </case>
23022292
2303- </cases>
2304- </sequence>
23052293
2306-
2307-
2308-
2309-<sequence>
2310- <type index="0">
2311- <value>Internal Tests</value>
2312- </type>
2313- <brief>
2314- <value>TRNG</value>
2315- </brief>
2316- <description>
2317- <value>TRNG testing</value>
2318- </description>
2319- <condition>
2320- <value />
2321- </condition>
2322- <shared_code>
2323- <value><![CDATA[
2294+ </cases>
2295+ </sequence>
2296+
2297+
2298+
2299+
2300+ <sequence>
2301+ <type index="0">
2302+ <value>Internal Tests</value>
2303+ </type>
2304+ <brief>
2305+ <value>TRNG</value>
2306+ </brief>
2307+ <description>
2308+ <value>TRNG testing</value>
2309+ </description>
2310+ <condition>
2311+ <value />
2312+ </condition>
2313+ <shared_code>
2314+ <value><![CDATA[
23242315 #include <string.h>
23252316
23262317 static const CRYConfig configTRNG_Polling=
@@ -2330,45 +2321,45 @@
23302321 };
23312322
23322323 ]]></value>
2333- </shared_code>
2334- <cases>
2335- <case>
2336- <brief>
2337- <value>TRNG Polling</value>
2338- </brief>
2339- <description>
2340- <value>testing TRNG in polled mode</value>
2341- </description>
2342- <condition>
2343- <value />
2344- </condition>
2345- <various_code>
2346- <setup_code>
2347- <value><![CDATA[
2324+ </shared_code>
2325+ <cases>
2326+ <case>
2327+ <brief>
2328+ <value>TRNG Polling</value>
2329+ </brief>
2330+ <description>
2331+ <value>testing TRNG in polled mode</value>
2332+ </description>
2333+ <condition>
2334+ <value />
2335+ </condition>
2336+ <various_code>
2337+ <setup_code>
2338+ <value><![CDATA[
23482339 cryStart(&CRYD1, &configTRNG_Polling);
23492340
23502341 ]]></value>
2351- </setup_code>
2352- <teardown_code>
2353- <value><![CDATA[cryStop(&CRYD1);]]></value>
2354- </teardown_code>
2355- <local_variables>
2356- <value><![CDATA[
2342+ </setup_code>
2343+ <teardown_code>
2344+ <value><![CDATA[cryStop(&CRYD1);]]></value>
2345+ </teardown_code>
2346+ <local_variables>
2347+ <value><![CDATA[
23572348 cryerror_t ret;
23582349 ]]></value>
2359- </local_variables>
2360- </various_code>
2361- <steps>
2362-
2363- <step>
2364- <description>
2365- <value>Random generation and test</value>
2366- </description>
2367- <tags>
2368- <value />
2369- </tags>
2370- <code>
2371- <value><![CDATA[
2350+ </local_variables>
2351+ </various_code>
2352+ <steps>
2353+
2354+ <step>
2355+ <description>
2356+ <value>Random generation and test</value>
2357+ </description>
2358+ <tags>
2359+ <value />
2360+ </tags>
2361+ <code>
2362+ <value><![CDATA[
23722363 uint32_t random[4];
23732364 int i;
23742365
@@ -2388,36 +2379,36 @@
23882379
23892380
23902381 ]]></value>
2391- </code>
2392- </step>
2393-
2394-
2382+ </code>
2383+ </step>
23952384
2396-
2397-
2398- </steps>
2399- </case>
2400-
2401-
24022385
2386+
2387+
2388+
2389+ </steps>
2390+ </case>
2391+
2392+
2393+
24032394 </cases>
2404- </sequence>
2395+ </sequence>
24052396
2406-<sequence>
2407- <type index="0">
2408- <value>Internal Tests</value>
2409- </type>
2410- <brief>
2411- <value>SHA</value>
2412- </brief>
2413- <description>
2414- <value>SHA testing</value>
2415- </description>
2416- <condition>
2417- <value />
2418- </condition>
2419- <shared_code>
2420- <value><![CDATA[
2397+ <sequence>
2398+ <type index="0">
2399+ <value>Internal Tests</value>
2400+ </type>
2401+ <brief>
2402+ <value>SHA</value>
2403+ </brief>
2404+ <description>
2405+ <value>SHA testing</value>
2406+ </description>
2407+ <condition>
2408+ <value />
2409+ </condition>
2410+ <shared_code>
2411+ <value><![CDATA[
24212412 #include <string.h>
24222413 #include "ref_sha.h"
24232414
@@ -2500,21 +2491,21 @@
25002491 }
25012492
25022493 ]]></value>
2503- </shared_code>
2504- <cases>
2505- <case>
2506- <brief>
2507- <value>SHA1 Polling</value>
2508- </brief>
2509- <description>
2510- <value>testing SHA1 in polled mode</value>
2511- </description>
2512- <condition>
2513- <value />
2514- </condition>
2515- <various_code>
2516- <setup_code>
2517- <value><![CDATA[
2494+ </shared_code>
2495+ <cases>
2496+ <case>
2497+ <brief>
2498+ <value>SHA1 Polling</value>
2499+ </brief>
2500+ <description>
2501+ <value>testing SHA1 in polled mode</value>
2502+ </description>
2503+ <condition>
2504+ <value />
2505+ </condition>
2506+ <various_code>
2507+ <setup_code>
2508+ <value><![CDATA[
25182509 memset(msg_clear, 0, TEST_MSG_DATA_BYTE_LEN);
25192510 memset(digest, 0, MAX_DIGEST_SIZE_INWORD);
25202511 memcpy((char*) msg_clear, sha_msg0, SHA_LEN_0);
@@ -2521,28 +2512,28 @@
25212512 cryStart(&CRYD1, &configSHA_Polling);
25222513
25232514 ]]></value>
2524- </setup_code>
2525- <teardown_code>
2526- <value><![CDATA[cryStop(&CRYD1);]]></value>
2527- </teardown_code>
2528- <local_variables>
2529- <value><![CDATA[
2515+ </setup_code>
2516+ <teardown_code>
2517+ <value><![CDATA[cryStop(&CRYD1);]]></value>
2518+ </teardown_code>
2519+ <local_variables>
2520+ <value><![CDATA[
25302521 cryerror_t ret;
25312522 uint32_t *ref;
25322523 ]]></value>
2533- </local_variables>
2534- </various_code>
2535- <steps>
2536-
2537- <step>
2538- <description>
2539- <value>Digest</value>
2540- </description>
2541- <tags>
2542- <value />
2543- </tags>
2544- <code>
2545- <value><![CDATA[
2524+ </local_variables>
2525+ </various_code>
2526+ <steps>
2527+
2528+ <step>
2529+ <description>
2530+ <value>Digest</value>
2531+ </description>
2532+ <tags>
2533+ <value />
2534+ </tags>
2535+ <code>
2536+ <value><![CDATA[
25462537 //---- Empty Block Test
25472538 ret = crySHA1(&CRYD1,0,(uint8_t*)msg_clear,(uint8_t*)digest);
25482539
@@ -2619,29 +2610,29 @@
26192610
26202611
26212612 ]]></value>
2622- </code>
2623- </step>
2624-
2625-
2613+ </code>
2614+ </step>
26262615
2627-
2628-
2629- </steps>
2630- </case>
2631-
2632- <case>
2633- <brief>
2634- <value>SHA256 Polling</value>
2635- </brief>
2636- <description>
2637- <value>testing SHA256 in polled mode</value>
2638- </description>
2639- <condition>
2640- <value />
2641- </condition>
2642- <various_code>
2643- <setup_code>
2644- <value><![CDATA[
2616+
2617+
2618+
2619+
2620+ </steps>
2621+ </case>
2622+
2623+ <case>
2624+ <brief>
2625+ <value>SHA256 Polling</value>
2626+ </brief>
2627+ <description>
2628+ <value>testing SHA256 in polled mode</value>
2629+ </description>
2630+ <condition>
2631+ <value />
2632+ </condition>
2633+ <various_code>
2634+ <setup_code>
2635+ <value><![CDATA[
26452636 memset(msg_clear, 0, TEST_MSG_DATA_BYTE_LEN);
26462637 memset(digest, 0, MAX_DIGEST_SIZE_INWORD);
26472638 memcpy((char*) msg_clear, sha_msg0, SHA_LEN_0);
@@ -2648,29 +2639,29 @@
26482639 cryStart(&CRYD1, &configSHA_Polling);
26492640
26502641 ]]></value>
2651- </setup_code>
2652- <teardown_code>
2653- <value><![CDATA[cryStop(&CRYD1);]]></value>
2654- </teardown_code>
2655- <local_variables>
2656- <value><![CDATA[
2642+ </setup_code>
2643+ <teardown_code>
2644+ <value><![CDATA[cryStop(&CRYD1);]]></value>
2645+ </teardown_code>
2646+ <local_variables>
2647+ <value><![CDATA[
26572648 cryerror_t ret;
26582649 uint32_t *ref;
26592650 ]]></value>
2660- </local_variables>
2661- </various_code>
2662- <steps>
2663-
2664- <step>
2665- <description>
2666- <value>Digest</value>
2667- </description>
2668- <tags>
2669- <value />
2670- </tags>
2671- <code>
2672- <value><![CDATA[
2651+ </local_variables>
2652+ </various_code>
2653+ <steps>
26732654
2655+ <step>
2656+ <description>
2657+ <value>Digest</value>
2658+ </description>
2659+ <tags>
2660+ <value />
2661+ </tags>
2662+ <code>
2663+ <value><![CDATA[
2664+
26742665 //---- One Block Test
26752666 ret = crySHA256(&CRYD1,SHA_LEN_0,(uint8_t*)msg_clear,(uint8_t*)digest);
26762667
@@ -2732,28 +2723,28 @@
27322723
27332724
27342725 ]]></value>
2735- </code>
2736- </step>
2737-
2738-
2726+ </code>
2727+ </step>
27392728
2740-
2741-
2742- </steps>
2743- </case>
2744- <case>
2745- <brief>
2746- <value>SHA512 Polling</value>
2747- </brief>
2748- <description>
2749- <value>testing SHA512 in polled mode</value>
2750- </description>
2751- <condition>
2752- <value />
2753- </condition>
2754- <various_code>
2755- <setup_code>
2756- <value><![CDATA[
2729+
2730+
2731+
2732+
2733+ </steps>
2734+ </case>
2735+ <case>
2736+ <brief>
2737+ <value>SHA512 Polling</value>
2738+ </brief>
2739+ <description>
2740+ <value>testing SHA512 in polled mode</value>
2741+ </description>
2742+ <condition>
2743+ <value />
2744+ </condition>
2745+ <various_code>
2746+ <setup_code>
2747+ <value><![CDATA[
27572748 memset(msg_clear, 0, TEST_MSG_DATA_BYTE_LEN);
27582749 memset(digest, 0, MAX_DIGEST_SIZE_INWORD);
27592750 memcpy((char*) msg_clear, sha_msg0, SHA_LEN_0);
@@ -2760,28 +2751,28 @@
27602751 cryStart(&CRYD1, &configSHA_Polling);
27612752
27622753 ]]></value>
2763- </setup_code>
2764- <teardown_code>
2765- <value><![CDATA[cryStop(&CRYD1);]]></value>
2766- </teardown_code>
2767- <local_variables>
2768- <value><![CDATA[
2754+ </setup_code>
2755+ <teardown_code>
2756+ <value><![CDATA[cryStop(&CRYD1);]]></value>
2757+ </teardown_code>
2758+ <local_variables>
2759+ <value><![CDATA[
27692760 cryerror_t ret;
27702761 uint32_t *ref;
27712762 ]]></value>
2772- </local_variables>
2773- </various_code>
2774- <steps>
2775-
2776- <step>
2777- <description>
2778- <value>Digest</value>
2779- </description>
2780- <tags>
2781- <value />
2782- </tags>
2783- <code>
2784- <value><![CDATA[
2763+ </local_variables>
2764+ </various_code>
2765+ <steps>
2766+
2767+ <step>
2768+ <description>
2769+ <value>Digest</value>
2770+ </description>
2771+ <tags>
2772+ <value />
2773+ </tags>
2774+ <code>
2775+ <value><![CDATA[
27852776 //---- One Block Test
27862777 ret = crySHA512(&CRYD1,SHA_LEN_0,(uint8_t*)msg_clear,(uint8_t*)digest);
27872778
@@ -2844,34 +2835,34 @@
28442835
28452836
28462837 ]]></value>
2847- </code>
2848- </step>
2849-
2850-
2838+ </code>
2839+ </step>
28512840
2852-
2853-
2854- </steps>
2855- </case>
2841+
2842+
2843+
2844+
2845+ </steps>
2846+ </case>
28562847 </cases>
2857- </sequence>
2848+ </sequence>
28582849
28592850
2860-<sequence>
2861- <type index="0">
2862- <value>Internal Tests</value>
2863- </type>
2864- <brief>
2865- <value>SHA</value>
2866- </brief>
2867- <description>
2868- <value>SHA testing</value>
2869- </description>
2870- <condition>
2871- <value />
2872- </condition>
2873- <shared_code>
2874- <value><![CDATA[
2851+ <sequence>
2852+ <type index="0">
2853+ <value>Internal Tests</value>
2854+ </type>
2855+ <brief>
2856+ <value>SHA</value>
2857+ </brief>
2858+ <description>
2859+ <value>SHA testing</value>
2860+ </description>
2861+ <condition>
2862+ <value />
2863+ </condition>
2864+ <shared_code>
2865+ <value><![CDATA[
28752866 #include <string.h>
28762867 #include "ref_sha.h"
28772868
@@ -2949,21 +2940,21 @@
29492940 }
29502941
29512942 ]]></value>
2952- </shared_code>
2953- <cases>
2954- <case>
2955- <brief>
2956- <value>SHA1 DMA</value>
2957- </brief>
2958- <description>
2959- <value>testing SHA1 in DMA mode</value>
2960- </description>
2961- <condition>
2962- <value />
2963- </condition>
2964- <various_code>
2965- <setup_code>
2966- <value><![CDATA[
2943+ </shared_code>
2944+ <cases>
2945+ <case>
2946+ <brief>
2947+ <value>SHA1 DMA</value>
2948+ </brief>
2949+ <description>
2950+ <value>testing SHA1 in DMA mode</value>
2951+ </description>
2952+ <condition>
2953+ <value />
2954+ </condition>
2955+ <various_code>
2956+ <setup_code>
2957+ <value><![CDATA[
29672958 memset(msg_clear, 0, TEST_MSG_DATA_BYTE_LEN);
29682959 memset(digest, 0, MAX_DIGEST_SIZE_INWORD);
29692960 memcpy((char*) msg_clear, sha_msg0, SHA_LEN_0);
@@ -2970,28 +2961,28 @@
29702961 cryStart(&CRYD1, &configSHA_DMA);
29712962
29722963 ]]></value>
2973- </setup_code>
2974- <teardown_code>
2975- <value><![CDATA[cryStop(&CRYD1);]]></value>
2976- </teardown_code>
2977- <local_variables>
2978- <value><![CDATA[
2964+ </setup_code>
2965+ <teardown_code>
2966+ <value><![CDATA[cryStop(&CRYD1);]]></value>
2967+ </teardown_code>
2968+ <local_variables>
2969+ <value><![CDATA[
29792970 cryerror_t ret;
29802971 uint32_t *ref;
29812972 ]]></value>
2982- </local_variables>
2983- </various_code>
2984- <steps>
2985-
2986- <step>
2987- <description>
2988- <value>Digest</value>
2989- </description>
2990- <tags>
2991- <value />
2992- </tags>
2993- <code>
2994- <value><![CDATA[
2973+ </local_variables>
2974+ </various_code>
2975+ <steps>
2976+
2977+ <step>
2978+ <description>
2979+ <value>Digest</value>
2980+ </description>
2981+ <tags>
2982+ <value />
2983+ </tags>
2984+ <code>
2985+ <value><![CDATA[
29952986 //---- Empty Block Test
29962987 ret = crySHA1(&CRYD1,0,(uint8_t*)msg_clear,(uint8_t*)digest);
29972988
@@ -3067,29 +3058,29 @@
30673058 }
30683059
30693060 ]]></value>
3070- </code>
3071- </step>
3072-
3073-
3061+ </code>
3062+ </step>
30743063
3075-
3076-
3077- </steps>
3078- </case>
3079-
3080- <case>
3081- <brief>
3082- <value>SHA256 DMA</value>
3083- </brief>
3084- <description>
3085- <value>testing SHA256 in DMA mode</value>
3086- </description>
3087- <condition>
3088- <value />
3089- </condition>
3090- <various_code>
3091- <setup_code>
3092- <value><![CDATA[
3064+
3065+
3066+
3067+
3068+ </steps>
3069+ </case>
3070+
3071+ <case>
3072+ <brief>
3073+ <value>SHA256 DMA</value>
3074+ </brief>
3075+ <description>
3076+ <value>testing SHA256 in DMA mode</value>
3077+ </description>
3078+ <condition>
3079+ <value />
3080+ </condition>
3081+ <various_code>
3082+ <setup_code>
3083+ <value><![CDATA[
30933084 memset(msg_clear, 0, TEST_MSG_DATA_BYTE_LEN);
30943085 memset(digest, 0, MAX_DIGEST_SIZE_INWORD);
30953086 memcpy((char*) msg_clear, sha_msg0, SHA_LEN_0);
@@ -3096,29 +3087,29 @@
30963087 cryStart(&CRYD1, &configSHA_DMA);
30973088
30983089 ]]></value>
3099- </setup_code>
3100- <teardown_code>
3101- <value><![CDATA[cryStop(&CRYD1);]]></value>
3102- </teardown_code>
3103- <local_variables>
3104- <value><![CDATA[
3090+ </setup_code>
3091+ <teardown_code>
3092+ <value><![CDATA[cryStop(&CRYD1);]]></value>
3093+ </teardown_code>
3094+ <local_variables>
3095+ <value><![CDATA[
31053096 cryerror_t ret;
31063097 uint32_t *ref;
31073098 ]]></value>
3108- </local_variables>
3109- </various_code>
3110- <steps>
3111-
3112- <step>
3113- <description>
3114- <value>Digest</value>
3115- </description>
3116- <tags>
3117- <value />
3118- </tags>
3119- <code>
3120- <value><![CDATA[
3099+ </local_variables>
3100+ </various_code>
3101+ <steps>
31213102
3103+ <step>
3104+ <description>
3105+ <value>Digest</value>
3106+ </description>
3107+ <tags>
3108+ <value />
3109+ </tags>
3110+ <code>
3111+ <value><![CDATA[
3112+
31223113 //---- One Block Test
31233114 ret = crySHA256(&CRYD1,SHA_LEN_0,(uint8_t*)msg_clear,(uint8_t*)digest);
31243115
@@ -3180,28 +3171,28 @@
31803171
31813172
31823173 ]]></value>
3183- </code>
3184- </step>
3185-
3186-
3174+ </code>
3175+ </step>
31873176
3188-
3189-
3190- </steps>
3191- </case>
3192- <case>
3193- <brief>
3194- <value>SHA512 DMA</value>
3195- </brief>
3196- <description>
3197- <value>testing SHA512 in DMA mode</value>
3198- </description>
3199- <condition>
3200- <value />
3201- </condition>
3202- <various_code>
3203- <setup_code>
3204- <value><![CDATA[
3177+
3178+
3179+
3180+
3181+ </steps>
3182+ </case>
3183+ <case>
3184+ <brief>
3185+ <value>SHA512 DMA</value>
3186+ </brief>
3187+ <description>
3188+ <value>testing SHA512 in DMA mode</value>
3189+ </description>
3190+ <condition>
3191+ <value />
3192+ </condition>
3193+ <various_code>
3194+ <setup_code>
3195+ <value><![CDATA[
32053196 memset(msg_clear, 0, TEST_MSG_DATA_BYTE_LEN);
32063197 memset(digest, 0, MAX_DIGEST_SIZE_INWORD);
32073198 memcpy((char*) msg_clear, sha_msg0, SHA_LEN_0);
@@ -3208,28 +3199,28 @@
32083199 cryStart(&CRYD1, &configSHA_DMA);
32093200
32103201 ]]></value>
3211- </setup_code>
3212- <teardown_code>
3213- <value><![CDATA[cryStop(&CRYD1);]]></value>
3214- </teardown_code>
3215- <local_variables>
3216- <value><![CDATA[
3202+ </setup_code>
3203+ <teardown_code>
3204+ <value><![CDATA[cryStop(&CRYD1);]]></value>
3205+ </teardown_code>
3206+ <local_variables>
3207+ <value><![CDATA[
32173208 cryerror_t ret;
32183209 uint32_t *ref;
32193210 ]]></value>
3220- </local_variables>
3221- </various_code>
3222- <steps>
3223-
3224- <step>
3225- <description>
3226- <value>Digest</value>
3227- </description>
3228- <tags>
3229- <value />
3230- </tags>
3231- <code>
3232- <value><![CDATA[
3211+ </local_variables>
3212+ </various_code>
3213+ <steps>
3214+
3215+ <step>
3216+ <description>
3217+ <value>Digest</value>
3218+ </description>
3219+ <tags>
3220+ <value />
3221+ </tags>
3222+ <code>
3223+ <value><![CDATA[
32333224 //---- One Block Test
32343225 ret = crySHA512(&CRYD1,SHA_LEN_0,(uint8_t*)msg_clear,(uint8_t*)digest);
32353226
@@ -3291,33 +3282,33 @@
32913282 }
32923283
32933284 ]]></value>
3294- </code>
3295- </step>
3296-
3297-
3285+ </code>
3286+ </step>
32983287
3299-
3300-
3301- </steps>
3302- </case>
3303- </cases>
3304- </sequence>
3305-
3306-<sequence>
3307- <type index="0">
3308- <value>Internal Tests</value>
3309- </type>
3310- <brief>
3311- <value>GCM</value>
3312- </brief>
3313- <description>
3314- <value>GCM testing</value>
3315- </description>
3316- <condition>
3317- <value />
3318- </condition>
3319- <shared_code>
3320- <value><![CDATA[
3288+
3289+
3290+
3291+
3292+ </steps>
3293+ </case>
3294+ </cases>
3295+ </sequence>
3296+
3297+ <sequence>
3298+ <type index="0">
3299+ <value>Internal Tests</value>
3300+ </type>
3301+ <brief>
3302+ <value>GCM</value>
3303+ </brief>
3304+ <description>
3305+ <value>GCM testing</value>
3306+ </description>
3307+ <condition>
3308+ <value />
3309+ </condition>
3310+ <shared_code>
3311+ <value><![CDATA[
33213312 #include <string.h>
33223313 #include "ref_gcm.h"
33233314 #define plaintext msg_clear
@@ -3364,48 +3355,48 @@
33643355
33653356
33663357 ]]></value>
3367- </shared_code>
3368- <cases>
3369- <case>
3370- <brief>
3371- <value>GCM Polling</value>
3372- </brief>
3373- <description>
3374- <value>testing GCM in polled mode</value>
3375- </description>
3376- <condition>
3377- <value />
3378- </condition>
3379- <various_code>
3380- <setup_code>
3381- <value><![CDATA[
3358+ </shared_code>
3359+ <cases>
3360+ <case>
3361+ <brief>
3362+ <value>GCM Polling</value>
3363+ </brief>
3364+ <description>
3365+ <value>testing GCM in polled mode</value>
3366+ </description>
3367+ <condition>
3368+ <value />
3369+ </condition>
3370+ <various_code>
3371+ <setup_code>
3372+ <value><![CDATA[
33823373 memset(cypher, 0xff, TEST_MSG_DATA_BYTE_LEN);
33833374 memset(authtag, 0xff, TEST_MSG_DATA_BYTE_LEN);
33843375 cryStart(&CRYD1, &config_Polling);
33853376
33863377 ]]></value>
3387- </setup_code>
3388- <teardown_code>
3389- <value><![CDATA[cryStop(&CRYD1);]]></value>
3390- </teardown_code>
3391- <local_variables>
3392- <value><![CDATA[
3378+ </setup_code>
3379+ <teardown_code>
3380+ <value><![CDATA[cryStop(&CRYD1);]]></value>
3381+ </teardown_code>
3382+ <local_variables>
3383+ <value><![CDATA[
33933384 cryerror_t ret;
33943385 uint32_t *ref;
33953386 uint8_t i,len1,len2;
33963387 ]]></value>
3397- </local_variables>
3398- </various_code>
3399- <steps>
3400- <step>
3401- <description>
3402- <value>loading the key, encrypt and decrypt</value>
3403- </description>
3404- <tags>
3405- <value />
3406- </tags>
3407- <code>
3408- <value><![CDATA[
3388+ </local_variables>
3389+ </various_code>
3390+ <steps>
3391+ <step>
3392+ <description>
3393+ <value>loading the key, encrypt and decrypt</value>
3394+ </description>
3395+ <tags>
3396+ <value />
3397+ </tags>
3398+ <code>
3399+ <value><![CDATA[
34093400 for (i = 0;i<TEST_GCM_LEN;i++) {
34103401
34113402 test_print("gcm test : ");
@@ -3489,59 +3480,59 @@
34893480
34903481 }
34913482 ]]></value>
3492- </code>
3493- </step>
3483+ </code>
3484+ </step>
34943485
34953486
3496-
3497-
34983487
3499-
3500-
3501- </steps>
3502- </case>
3503-
35043488
3505- <case>
3506- <brief>
3507- <value>GCM DMA</value>
3508- </brief>
3509- <description>
3510- <value>testing GCM in DMA mode</value>
3511- </description>
3512- <condition>
3513- <value />
3514- </condition>
3515- <various_code>
3516- <setup_code>
3517- <value><![CDATA[
3489+
3490+
3491+
3492+ </steps>
3493+ </case>
3494+
3495+
3496+ <case>
3497+ <brief>
3498+ <value>GCM DMA</value>
3499+ </brief>
3500+ <description>
3501+ <value>testing GCM in DMA mode</value>
3502+ </description>
3503+ <condition>
3504+ <value />
3505+ </condition>
3506+ <various_code>
3507+ <setup_code>
3508+ <value><![CDATA[
35183509 memset(cypher, 0xff, TEST_MSG_DATA_BYTE_LEN);
35193510 memset(authtag, 0xff, TEST_MSG_DATA_BYTE_LEN);
35203511 cryStart(&CRYD1, &config_DMA);
35213512
35223513 ]]></value>
3523- </setup_code>
3524- <teardown_code>
3525- <value><![CDATA[cryStop(&CRYD1);]]></value>
3526- </teardown_code>
3527- <local_variables>
3528- <value><![CDATA[
3514+ </setup_code>
3515+ <teardown_code>
3516+ <value><![CDATA[cryStop(&CRYD1);]]></value>
3517+ </teardown_code>
3518+ <local_variables>
3519+ <value><![CDATA[
35293520 cryerror_t ret;
35303521 uint32_t *ref;
35313522 uint8_t i,len1,len2;
35323523 ]]></value>
3533- </local_variables>
3534- </various_code>
3535- <steps>
3536- <step>
3537- <description>
3538- <value>loading the key, encrypt and decrypt</value>
3539- </description>
3540- <tags>
3541- <value />
3542- </tags>
3543- <code>
3544- <value><![CDATA[
3524+ </local_variables>
3525+ </various_code>
3526+ <steps>
3527+ <step>
3528+ <description>
3529+ <value>loading the key, encrypt and decrypt</value>
3530+ </description>
3531+ <tags>
3532+ <value />
3533+ </tags>
3534+ <code>
3535+ <value><![CDATA[
35453536 for (i = 0;i<TEST_GCM_LEN;i++) {
35463537
35473538 test_print("gcm test : ");
@@ -3625,38 +3616,38 @@
36253616
36263617 }
36273618 ]]></value>
3628- </code>
3629- </step>
3619+ </code>
3620+ </step>
36303621
36313622
3632-
3633-
36343623
3635-
3636-
3637- </steps>
3638- </case>
3639-
36403624
3641- </cases>
3642- </sequence>
36433625
3644-
3645-<sequence>
3646- <type index="0">
3647- <value>Internal Tests</value>
3648- </type>
3649- <brief>
3650- <value>HMAC</value>
3651- </brief>
3652- <description>
3653- <value>HMAC testing</value>
3654- </description>
3655- <condition>
3656- <value />
3657- </condition>
3658- <shared_code>
3659- <value><![CDATA[
3626+
3627+
3628+ </steps>
3629+ </case>
3630+
3631+
3632+ </cases>
3633+ </sequence>
3634+
3635+
3636+ <sequence>
3637+ <type index="0">
3638+ <value>Internal Tests</value>
3639+ </type>
3640+ <brief>
3641+ <value>HMAC</value>
3642+ </brief>
3643+ <description>
3644+ <value>HMAC testing</value>
3645+ </description>
3646+ <condition>
3647+ <value />
3648+ </condition>
3649+ <shared_code>
3650+ <value><![CDATA[
36603651 #include <string.h>
36613652 #include "ref_hmac.h"
36623653 #define plaintext msg_clear
@@ -3764,44 +3755,44 @@
37643755 }
37653756
37663757 ]]></value>
3767- </shared_code>
3768- <cases>
3769- <case>
3770- <brief>
3771- <value>HMAC Polling</value>
3772- </brief>
3773- <description>
3774- <value>testing HMAC in polled mode</value>
3775- </description>
3776- <condition>
3777- <value />
3778- </condition>
3779- <various_code>
3780- <setup_code>
3781- <value><![CDATA[
3758+ </shared_code>
3759+ <cases>
3760+ <case>
3761+ <brief>
3762+ <value>HMAC Polling</value>
3763+ </brief>
3764+ <description>
3765+ <value>testing HMAC in polled mode</value>
3766+ </description>
3767+ <condition>
3768+ <value />
3769+ </condition>
3770+ <various_code>
3771+ <setup_code>
3772+ <value><![CDATA[
37823773 memset(HMACOUT, 0xff, TEST_MSG_DATA_BYTE_LEN);
37833774 cryStart(&CRYD1, &config_Polling);
37843775
37853776 ]]></value>
3786- </setup_code>
3787- <teardown_code>
3788- <value><![CDATA[cryStop(&CRYD1);]]></value>
3789- </teardown_code>
3790- <local_variables>
3791- <value><![CDATA[
3777+ </setup_code>
3778+ <teardown_code>
3779+ <value><![CDATA[cryStop(&CRYD1);]]></value>
3780+ </teardown_code>
3781+ <local_variables>
3782+ <value><![CDATA[
37923783 ]]></value>
3793- </local_variables>
3794- </various_code>
3795- <steps>
3796- <step>
3797- <description>
3798- <value>hmac 256</value>
3799- </description>
3800- <tags>
3801- <value />
3802- </tags>
3803- <code>
3804- <value><![CDATA[
3784+ </local_variables>
3785+ </various_code>
3786+ <steps>
3787+ <step>
3788+ <description>
3789+ <value>hmac 256</value>
3790+ </description>
3791+ <tags>
3792+ <value />
3793+ </tags>
3794+ <code>
3795+ <value><![CDATA[
38053796 cryHMAC256(&CRYD1);
38063797
38073798 for (int i = 0; i < 8; i++) {
@@ -3808,17 +3799,17 @@
38083799 test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC256_1)[i], "hmac mismatch");
38093800 }
38103801 ]]></value>
3811- </code>
3812- </step>
3813- <step>
3814- <description>
3815- <value>hmac 512</value>
3816- </description>
3817- <tags>
3818- <value />
3819- </tags>
3820- <code>
3821- <value><![CDATA[
3802+ </code>
3803+ </step>
3804+ <step>
3805+ <description>
3806+ <value>hmac 512</value>
3807+ </description>
3808+ <tags>
3809+ <value />
3810+ </tags>
3811+ <code>
3812+ <value><![CDATA[
38223813 cryHMAC512(&CRYD1);
38233814
38243815 for (int i = 0; i < 16; i++) {
@@ -3825,52 +3816,46 @@
38253816 test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC512_1)[i], "hmac mismatch");
38263817 }
38273818 ]]></value>
3828- </code>
3829- </step>
3830-
3831-
3832-
3833-
3834- </steps>
3835- </case>
3836-
3837-
3838- <case>
3839- <brief>
3840- <value>HMAC DMA</value>
3841- </brief>
3842- <description>
3843- <value>testing HMAC in DMA mode</value>
3844- </description>
3845- <condition>
3846- <value />
3847- </condition>
3848- <various_code>
3849- <setup_code>
3850- <value><![CDATA[
3819+ </code>
3820+ </step>
3821+ </steps>
3822+ </case>
3823+ <case>
3824+ <brief>
3825+ <value>HMAC DMA</value>
3826+ </brief>
3827+ <description>
3828+ <value>testing HMAC in DMA mode</value>
3829+ </description>
3830+ <condition>
3831+ <value />
3832+ </condition>
3833+ <various_code>
3834+ <setup_code>
3835+ <value><![CDATA[
38513836 memset(HMACOUT, 0xff, TEST_MSG_DATA_BYTE_LEN);
38523837 cryStart(&CRYD1, &config_DMA);
38533838
38543839 ]]></value>
3855- </setup_code>
3856- <teardown_code>
3857- <value><![CDATA[cryStop(&CRYD1);]]></value>
3858- </teardown_code>
3859- <local_variables>
3860- <value><![CDATA[
3840+ </setup_code>
3841+ <teardown_code>
3842+ <value><![CDATA[cryStop(&CRYD1);]]></value>
3843+ </teardown_code>
3844+ <local_variables>
3845+ <value><![CDATA[
38613846 ]]></value>
3862- </local_variables>
3863- </various_code>
3864- <steps>
3865- <step>
3866- <description>
3867- <value>hmac 256</value>
3868- </description>
3869- <tags>
3870- <value />
3871- </tags>
3872- <code>
3873- <value><![CDATA[
3847+ </local_variables>
3848+ </various_code>
3849+ <steps>
3850+ <step>
3851+ <description>
3852+ <value>hmac 256</value>
3853+ </description>
3854+ <tags>
3855+ <value />
3856+ </tags>
3857+ <code>
3858+ <value><![CDATA[
38743859 cryHMAC256(&CRYD1);
38753860
38763861
@@ -3878,18 +3863,17 @@
38783863 test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC256_1)[i], "hmac mismatch");
38793864 }
38803865 ]]></value>
3881- </code>
3882- </step>
3883-
3884- <step>
3885- <description>
3886- <value>hmac 512</value>
3887- </description>
3888- <tags>
3889- <value />
3890- </tags>
3891- <code>
3892- <value><![CDATA[
3866+ </code>
3867+ </step>
3868+ <step>
3869+ <description>
3870+ <value>hmac 512</value>
3871+ </description>
3872+ <tags>
3873+ <value />
3874+ </tags>
3875+ <code>
3876+ <value><![CDATA[
38933877 cryHMAC512(&CRYD1);
38943878
38953879 for (int i = 0; i < 16; i++) {
@@ -3896,26 +3880,11 @@
38963880 test_assert(HMACOUT[i] == ((uint32_t*) refHMAC_HMAC512_1)[i], "hmac mismatch");
38973881 }
38983882 ]]></value>
3899- </code>
3900- </step>
3901-
3902-
3903-
3904-
3905-
3906-
3907-
3908- </steps>
3909- </case>
3910-
3911-
3912- </cases>
3913- </sequence>
3914-
3915-
3916- </sequences>
3917- </instance>
3918- </instances>
3919- <exportedFeatures />
3920- </application>
3921-</SPC5-Config>
3883+ </code>
3884+ </step>
3885+ </steps>
3886+ </case>
3887+ </cases>
3888+ </sequence>
3889+ </sequences>
3890+</instance>
--- trunk/test/mfs/configuration.xml (revision 14521)
+++ trunk/test/mfs/configuration.xml (revision 14522)
@@ -1,19 +1,12 @@
1-<?xml version="1.0" encoding="UTF-8"?>
2-<SPC5-Config version="1.0.0">
3- <application name="ChibiOS/HAL MFS Test Suite" version="1.0.0" standalone="true" locked="false">
4- <description>Test Specification for ChibiOS/HAL MFS Complex Driver.</description>
5- <component id="org.chibios.spc5.components.portable.generic_startup">
6- <component id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine" />
7- </component>
8- <instances>
9- <instance locked="false" id="org.chibios.spc5.components.portable.generic_startup" />
10- <instance locked="false" id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
11- <description>
12- <brief>
13- <value>ChibiOS/HAL MFS Test Suite.</value>
14- </brief>
15- <copyright>
16- <value><![CDATA[/*
1+
2+<instance locked="false"
3+ id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
4+ <description>
5+ <brief>
6+ <value>ChibiOS/HAL MFS Test Suite.</value>
7+ </brief>
8+ <copyright>
9+ <value><![CDATA[/*
1710 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
1811
1912 Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,17 +21,19 @@
2821 See the License for the specific language governing permissions and
2922 limitations under the License.
3023 */]]></value>
31- </copyright>
32- <introduction>
33- <value>Test suite for ChibiOS/HAL MFS. The purpose of this suite is to perform unit tests on the MFS module and to converge to 100% code coverage through successive improvements.</value>
34- </introduction>
35- </description>
36- <global_data_and_code>
37- <code_prefix>
38- <value>mfs_</value>
39- </code_prefix>
40- <global_definitions>
41- <value><![CDATA[#include "hal_mfs.h"
24+ </copyright>
25+ <introduction>
26+ <value>Test suite for ChibiOS/HAL MFS. The purpose of this suite
27+ is to perform unit tests on the MFS module and to converge to
28+ 100% code coverage through successive improvements.</value>
29+ </introduction>
30+ </description>
31+ <global_data_and_code>
32+ <code_prefix>
33+ <value>mfs_</value>
34+ </code_prefix>
35+ <global_definitions>
36+ <value><![CDATA[#include "hal_mfs.h"
4237
4338 #define TEST_SUITE_NAME "ChibiOS/HAL MFS Test Suite"
4439
@@ -55,9 +50,9 @@
5550 flash_error_t bank_erase(mfs_bank_t bank);
5651 flash_error_t bank_verify_erased(mfs_bank_t bank);
5752 void test_print_mfs_info(void);]]></value>
58- </global_definitions>
59- <global_code>
60- <value><![CDATA[#include "hal_mfs.h"
53+ </global_definitions>
54+ <global_code>
55+ <value><![CDATA[#include "hal_mfs.h"
6156
6257 MFSDriver mfs1;
6358 uint8_t mfs_buffer[512];
@@ -162,126 +157,134 @@
162157 }
163158 return FLASH_NO_ERROR;
164159 }]]></value>
165- </global_code>
166- </global_data_and_code>
167- <sequences>
168- <sequence>
169- <type index="0">
170- <value>Internal Tests</value>
171- </type>
172- <brief>
173- <value>Functional tests.</value>
174- </brief>
175- <description>
176- <value>The APIs are tested for functionality, correct cases and expected error cases are tested.</value>
177- </description>
178- <condition>
160+ </global_code>
161+ </global_data_and_code>
162+ <sequences>
163+ <sequence>
164+ <type index="0">
165+ <value>Internal Tests</value>
166+ </type>
167+ <brief>
168+ <value>Functional tests.</value>
169+ </brief>
170+ <description>
171+ <value>The APIs are tested for functionality, correct cases and
172+ expected error cases are tested.</value>
173+ </description>
174+ <condition>
175+ <value />
176+ </condition>
177+ <shared_code>
178+ <value><![CDATA[#include <string.h>
179+#include "hal_mfs.h"]]></value>
180+ </shared_code>
181+ <cases>
182+ <case>
183+ <brief>
184+ <value>Testing mfsStart() behavior.</value>
185+ </brief>
186+ <description>
187+ <value>The initialization function is tested. This function
188+ can fail only in case of Flash Array failures or in case
189+ of unexpected internal errors.</value>
190+ </description>
191+ <condition>
192+ <value />
193+ </condition>
194+ <various_code>
195+ <setup_code>
196+ <value><![CDATA[mfsObjectInit(&mfs1);]]></value>
197+ </setup_code>
198+ <teardown_code>
199+ <value><![CDATA[mfsStop(&mfs1);]]></value>
200+ </teardown_code>
201+ <local_variables>
179202 <value />
180- </condition>
181- <shared_code>
182- <value><![CDATA[#include <string.h>
183-#include "hal_mfs.h"]]></value>
184- </shared_code>
185- <cases>
186- <case>
187- <brief>
188- <value>Testing mfsStart() behavior.</value>
189- </brief>
190- <description>
191- <value>The initialization function is tested. This function can fail only in case of Flash Array failures or in case of unexpected internal errors.</value>
192- </description>
193- <condition>
194- <value />
195- </condition>
196- <various_code>
197- <setup_code>
198- <value><![CDATA[mfsObjectInit(&mfs1);]]></value>
199- </setup_code>
200- <teardown_code>
201- <value><![CDATA[mfsStop(&mfs1);]]></value>
202- </teardown_code>
203- <local_variables>
204- <value />
205- </local_variables>
206- </various_code>
207- <steps>
208- <step>
209- <description>
210- <value>Erasing the flash array using a low level function.</value>
211- </description>
212- <tags>
213- <value />
214- </tags>
215- <code>
216- <value><![CDATA[flash_error_t ferr;
203+ </local_variables>
204+ </various_code>
205+ <steps>
206+ <step>
207+ <description>
208+ <value>Erasing the flash array using a low level
209+ function.</value>
210+ </description>
211+ <tags>
212+ <value />
213+ </tags>
214+ <code>
215+ <value><![CDATA[flash_error_t ferr;
217216
218217 ferr = bank_erase(MFS_BANK_0);
219218 test_assert(ferr == FLASH_NO_ERROR, "Bank 0 erase failure");
220219 ferr = bank_erase(MFS_BANK_1);
221220 test_assert(ferr == FLASH_NO_ERROR, "Bank 1 erase failure");]]></value>
222- </code>
223- </step>
224- <step>
225- <description>
226- <value>Calling mfsStart() on an uninitialized flash array, MFS_NO_ERROR is expected.</value>
227- </description>
228- <tags>
229- <value />
230- </tags>
231- <code>
232- <value><![CDATA[mfs_error_t err;
221+ </code>
222+ </step>
223+ <step>
224+ <description>
225+ <value>Calling mfsStart() on an uninitialized flash
226+ array, MFS_NO_ERROR is expected.</value>
227+ </description>
228+ <tags>
229+ <value />
230+ </tags>
231+ <code>
232+ <value><![CDATA[mfs_error_t err;
233233
234234 err = mfsStart(&mfs1, &mfscfg1);
235235 test_assert(err == MFS_NO_ERROR, "initialization error with erased flash");]]></value>
236- </code>
237- </step>
238- <step>
239- <description>
240- <value>Calling mfsStart() on a newly initialized flash array, MFS_NO_ERROR is expected.</value>
241- </description>
242- <tags>
243- <value />
244- </tags>
245- <code>
246- <value><![CDATA[mfs_error_t err;
236+ </code>
237+ </step>
238+ <step>
239+ <description>
240+ <value>Calling mfsStart() on a newly initialized flash
241+ array, MFS_NO_ERROR is expected.</value>
242+ </description>
243+ <tags>
244+ <value />
245+ </tags>
246+ <code>
247+ <value><![CDATA[mfs_error_t err;
247248
248249 err = mfsStart(&mfs1, &mfscfg1);
249250 test_assert(err == MFS_NO_ERROR, "initialization error with initialized flash");]]></value>
250- </code>
251- </step>
252- </steps>
253- </case>
254- <case>
255- <brief>
256- <value>Checking for non existing record.</value>
257- </brief>
258- <description>
259- <value>The records space is explored with an initialized but empty managed storage, no record should exist.</value>
260- </description>
261- <condition>
262- <value />
263- </condition>
264- <various_code>
265- <setup_code>
266- <value><![CDATA[mfsStart(&mfs1, &mfscfg1);]]></value>
267- </setup_code>
268- <teardown_code>
269- <value><![CDATA[mfsStop(&mfs1);]]></value>
270- </teardown_code>
271- <local_variables>
272- <value />
273- </local_variables>
274- </various_code>
275- <steps>
276- <step>
277- <description>
278- <value>Exploring the records space, MFS_ERR_NOT_FOUND is expected for each index.</value>
279- </description>
280- <tags>
281- <value />
282- </tags>
283- <code>
284- <value><![CDATA[mfs_error_t err;
251+ </code>
252+ </step>
253+ </steps>
254+ </case>
255+ <case>
256+ <brief>
257+ <value>Checking for non existing record.</value>
258+ </brief>
259+ <description>
260+ <value>The records space is explored with an initialized but
261+ empty managed storage, no record should exist.</value>
262+ </description>
263+ <condition>
264+ <value />
265+ </condition>
266+ <various_code>
267+ <setup_code>
268+ <value><![CDATA[mfsStart(&mfs1, &mfscfg1);]]></value>
269+ </setup_code>
270+ <teardown_code>
271+ <value><![CDATA[mfsStop(&mfs1);]]></value>
272+ </teardown_code>
273+ <local_variables>
274+ <value />
275+ </local_variables>
276+ </various_code>
277+ <steps>
278+ <step>
279+ <description>
280+ <value>Exploring the records space, MFS_ERR_NOT_FOUND is
281+ expected for each index.</value>
282+ </description>
283+ <tags>
284+ <value />
285+ </tags>
286+ <code>
287+ <value><![CDATA[mfs_error_t err;
285288 mfs_id_t id;
286289 size_t size;
287290
@@ -291,54 +294,58 @@
291294 test_assert(err == MFS_ERR_NOT_FOUND,
292295 "found a record that should not exists");
293296 }]]></value>
294- </code>
295- </step>
296- </steps>
297- </case>
298- <case>
299- <brief>
300- <value>Creating, updating and erasing a record.</value>
301- </brief>
302- <description>
303- <value>A record is created, updated several times with different payloads and finally erased.</value>
304- </description>
305- <condition>
306- <value />
307- </condition>
308- <various_code>
309- <setup_code>
310- <value><![CDATA[mfsStart(&mfs1, &mfscfg1);]]></value>
311- </setup_code>
312- <teardown_code>
313- <value><![CDATA[mfsStop(&mfs1);]]></value>
314- </teardown_code>
315- <local_variables>
316- <value><![CDATA[size_t size;]]></value>
317- </local_variables>
318- </various_code>
319- <steps>
320- <step>
321- <description>
322- <value>The record must not already exists, MFS_ERR_NOT_FOUND is expected.</value>
323- </description>
324- <tags>
325- <value />
326- </tags>
327- <code>
328- <value><![CDATA[size = sizeof mfs_buffer;
297+ </code>
298+ </step>
299+ </steps>
300+ </case>
301+ <case>
302+ <brief>
303+ <value>Creating, updating and erasing a record.</value>
304+ </brief>
305+ <description>
306+ <value>A record is created, updated several times with
307+ different payloads and finally erased.</value>
308+ </description>
309+ <condition>
310+ <value />
311+ </condition>
312+ <various_code>
313+ <setup_code>
314+ <value><![CDATA[mfsStart(&mfs1, &mfscfg1);]]></value>
315+ </setup_code>
316+ <teardown_code>
317+ <value><![CDATA[mfsStop(&mfs1);]]></value>
318+ </teardown_code>
319+ <local_variables>
320+ <value><![CDATA[size_t size;]]></value>
321+ </local_variables>
322+ </various_code>
323+ <steps>
324+ <step>
325+ <description>
326+ <value>The record must not already exists,
327+ MFS_ERR_NOT_FOUND is expected.</value>
328+ </description>
329+ <tags>
330+ <value />
331+ </tags>
332+ <code>
333+ <value><![CDATA[size = sizeof mfs_buffer;
329334 mfs_error_t err = mfsReadRecord(&mfs1, 1, &size, mfs_buffer);
330335 test_assert(err == MFS_ERR_NOT_FOUND , "record was already present");]]></value>
331- </code>
332- </step>
333- <step>
334- <description>
335- <value>Creating the record then retrieving it again, MFS_NO_ERROR is expected, record content and size are compared with the original.</value>
336- </description>
337- <tags>
338- <value />
339- </tags>
340- <code>
341- <value><![CDATA[mfs_error_t err;
336+ </code>
337+ </step>
338+ <step>
339+ <description>
340+ <value>Creating the record then retrieving it again,
341+ MFS_NO_ERROR is expected, record content and size are
342+ compared with the original.</value>
343+ </description>
344+ <tags>
345+ <value />
346+ </tags>
347+ <code>
348+ <value><![CDATA[mfs_error_t err;
342349
343350 err = mfsWriteRecord(&mfs1, 1, sizeof mfs_pattern16, mfs_pattern16);
344351 test_assert(err == MFS_NO_ERROR, "error creating the record");
@@ -347,17 +354,19 @@
347354 test_assert(err == MFS_NO_ERROR, "record not found");
348355 test_assert(size == sizeof mfs_pattern16, "unexpected record length");
349356 test_assert(memcmp(mfs_pattern16, mfs_buffer, size) == 0, "wrong record content");]]></value>
350- </code>
351- </step>
352- <step>
353- <description>
354- <value>Updating the record then retrieving it again, MFS_NO_ERROR is expected, record content and size are compared with the original.</value>
355- </description>
356- <tags>
357- <value />
358- </tags>
359- <code>
360- <value><![CDATA[mfs_error_t err;
357+ </code>
358+ </step>
359+ <step>
360+ <description>
361+ <value>Updating the record then retrieving it again,
362+ MFS_NO_ERROR is expected, record content and size are
363+ compared with the original.</value>
364+ </description>
365+ <tags>
366+ <value />
367+ </tags>
368+ <code>
369+ <value><![CDATA[mfs_error_t err;
361370
362371 err = mfsWriteRecord(&mfs1, 1, sizeof mfs_pattern32, mfs_pattern32);
363372 test_assert(err == MFS_NO_ERROR, "error updating the record");
@@ -366,17 +375,19 @@
366375 test_assert(err == MFS_NO_ERROR, "record not found");
367376 test_assert(size == sizeof mfs_pattern32, "unexpected record length");
368377 test_assert(memcmp(mfs_pattern32, mfs_buffer, size) == 0, "wrong record content");]]></value>
369- </code>
370- </step>
371- <step>
372- <description>
373- <value>Erasing the record then trying to retrieve it again, MFS_NO_ERROR is expected on erase, MFS_ERR_NOT_FOUND is expected on retrieve.</value>
374- </description>
375- <tags>
376- <value />
377- </tags>
378- <code>
379- <value><![CDATA[mfs_error_t err;
378+ </code>
379+ </step>
380+ <step>
381+ <description>
382+ <value>Erasing the record then trying to retrieve it
383+ again, MFS_NO_ERROR is expected on erase,
384+ MFS_ERR_NOT_FOUND is expected on retrieve.</value>
385+ </description>
386+ <tags>
387+ <value />
388+ </tags>
389+ <code>
390+ <value><![CDATA[mfs_error_t err;
380391
381392 err = mfsEraseRecord(&mfs1, 1);
382393 test_assert(err == MFS_NO_ERROR, "error erasing the record");
@@ -383,43 +394,46 @@
383394 size = sizeof mfs_buffer;
384395 err = mfsReadRecord(&mfs1, 1, &size, mfs_buffer);
385396 test_assert(err == MFS_ERR_NOT_FOUND, "record not erased");]]></value>
386- </code>
387- </step>
388- </steps>
389- </case>
390- <case>
391- <brief>
392- <value>Erasing the whole storage and re-initialization.</value>
393- </brief>
394- <description>
395- <value>The managed storage is erased, initialized and re-mounted.</value>
396- </description>
397- <condition>
398- <value />
399- </condition>
400- <various_code>
401- <setup_code>
402- <value><![CDATA[bank_erase(MFS_BANK_0);
397+ </code>
398+ </step>
399+ </steps>
400+ </case>
401+ <case>
402+ <brief>
403+ <value>Erasing the whole storage and re-initialization.
404+ </value>
405+ </brief>
406+ <description>
407+ <value>The managed storage is erased, initialized and
408+ re-mounted.</value>
409+ </description>
410+ <condition>
411+ <value />
412+ </condition>
413+ <various_code>
414+ <setup_code>
415+ <value><![CDATA[bank_erase(MFS_BANK_0);
403416 bank_erase(MFS_BANK_1);
404417 mfsStart(&mfs1, &mfscfg1);]]></value>
405- </setup_code>
406- <teardown_code>
407- <value><![CDATA[mfsStop(&mfs1);]]></value>
408- </teardown_code>
409- <local_variables>
410- <value />
411- </local_variables>
412- </various_code>
413- <steps>
414- <step>
415- <description>
416- <value>Creating records 1, 2 and 3, MFS_NO_ERROR is expected.</value>
417- </description>
418- <tags>
419- <value />
420- </tags>
421- <code>
422- <value><![CDATA[mfs_error_t err;
418+ </setup_code>
419+ <teardown_code>
420+ <value><![CDATA[mfsStop(&mfs1);]]></value>
421+ </teardown_code>
422+ <local_variables>
423+ <value />
424+ </local_variables>
425+ </various_code>
426+ <steps>
427+ <step>
428+ <description>
429+ <value>Creating records 1, 2 and 3, MFS_NO_ERROR is
430+ expected.</value>
431+ </description>
432+ <tags>
433+ <value />
434+ </tags>
435+ <code>
436+ <value><![CDATA[mfs_error_t err;
423437
424438 err = mfsWriteRecord(&mfs1, 1, sizeof mfs_pattern16, mfs_pattern16);
425439 test_assert(err == MFS_NO_ERROR, "error creating record 1");
@@ -427,17 +441,17 @@
427441 test_assert(err == MFS_NO_ERROR, "error creating record 2");
428442 err = mfsWriteRecord(&mfs1, 3, sizeof mfs_pattern10, mfs_pattern10);
429443 test_assert(err == MFS_NO_ERROR, "error creating record 3");]]></value>
430- </code>
431- </step>
432- <step>
433- <description>
434- <value>Records must exist.</value>
435- </description>
436- <tags>
437- <value />
438- </tags>
439- <code>
440- <value><![CDATA[mfs_error_t err;
444+ </code>
445+ </step>
446+ <step>
447+ <description>
448+ <value>Records must exist.</value>
449+ </description>
450+ <tags>
451+ <value />
452+ </tags>
453+ <code>
454+ <value><![CDATA[mfs_error_t err;
441455 size_t size;
442456
443457 size = sizeof mfs_buffer;
@@ -449,17 +463,17 @@
449463 size = sizeof mfs_buffer;
450464 err = mfsReadRecord(&mfs1, 3, &size, mfs_buffer);
451465 test_assert(err == MFS_NO_ERROR, "record 2 not present");]]></value>
452- </code>
453- </step>
454- <step>
455- <description>
456- <value>Re-mounting, records must still exist.</value>
457- </description>
458- <tags>
459- <value />
460- </tags>
461- <code>
462- <value><![CDATA[mfs_error_t err;
466+ </code>
467+ </step>
468+ <step>
469+ <description>
470+ <value>Re-mounting, records must still exist.</value>
471+ </description>
472+ <tags>
473+ <value />
474+ </tags>
475+ <code>
476+ <value><![CDATA[mfs_error_t err;
463477 size_t size;
464478
465479 err = mfsStart(&mfs1, &mfscfg1);
@@ -473,17 +487,19 @@
473487 size = sizeof mfs_buffer;
474488 err = mfsReadRecord(&mfs1, 3, &size, mfs_buffer);
475489 test_assert(err == MFS_NO_ERROR, "record 2 not present");]]></value>
476- </code>
477- </step>
478- <step>
479- <description>
480- <value>Erasing storage and verify that the records have been removed, MFS_NO_ERROR is expected on erase, MFS_ERR_NOT_FOUND is expected on retrieve.</value>
481- </description>
482- <tags>
483- <value />
484- </tags>
485- <code>
486- <value><![CDATA[mfs_error_t err;
490+ </code>
491+ </step>
492+ <step>
493+ <description>
494+ <value>Erasing storage and verify that the records have
495+ been removed, MFS_NO_ERROR is expected on erase,
496+ MFS_ERR_NOT_FOUND is expected on retrieve.</value>
497+ </description>
498+ <tags>
499+ <value />
500+ </tags>
501+ <code>
502+ <value><![CDATA[mfs_error_t err;
487503 size_t size;
488504
489505 err = mfsErase(&mfs1);
@@ -497,42 +513,44 @@
497513 size = sizeof mfs_buffer;
498514 err = mfsReadRecord(&mfs1, 3, &size, mfs_buffer);
499515 test_assert(err == MFS_ERR_NOT_FOUND, "record 2 still present");]]></value>
500- </code>
501- </step>
502- </steps>
503- </case>
504- <case>
505- <brief>
506- <value>Testing storage size limit.</value>
507- </brief>
508- <description>
509- <value>The storage is entirely filled with different records and the final error is tested.</value>
510- </description>
511- <condition>
512- <value />
513- </condition>
514- <various_code>
515- <setup_code>
516- <value><![CDATA[mfsStart(&mfs1, &mfscfg1);
516+ </code>
517+ </step>
518+ </steps>
519+ </case>
520+ <case>
521+ <brief>
522+ <value>Testing storage size limit.</value>
523+ </brief>
524+ <description>
525+ <value>The storage is entirely filled with different records
526+ and the final error is tested.</value>
527+ </description>
528+ <condition>
529+ <value />
530+ </condition>
531+ <various_code>
532+ <setup_code>
533+ <value><![CDATA[mfsStart(&mfs1, &mfscfg1);
517534 mfsErase(&mfs1);]]></value>
518- </setup_code>
519- <teardown_code>
520- <value><![CDATA[mfsStop(&mfs1);]]></value>
521- </teardown_code>
522- <local_variables>
523- <value />
524- </local_variables>
525- </various_code>
526- <steps>
527- <step>
528- <description>
529- <value>Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected.</value>
530- </description>
531- <tags>
532- <value />
533- </tags>
534- <code>
535- <value><![CDATA[mfs_id_t id;
535+ </setup_code>
536+ <teardown_code>
537+ <value><![CDATA[mfsStop(&mfs1);]]></value>
538+ </teardown_code>
539+ <local_variables>
540+ <value />
541+ </local_variables>
542+ </various_code>
543+ <steps>
544+ <step>
545+ <description>
546+ <value>Filling up the storage by writing records with
547+ increasing IDs, MFS_NO_ERROR is expected.</value>
548+ </description>
549+ <tags>
550+ <value />
551+ </tags>
552+ <code>
553+ <value><![CDATA[mfs_id_t id;
536554 mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
537555 sizeof (mfs_data_header_t))) /
538556 (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
@@ -552,17 +570,18 @@
552570 test_assert(memcmp(mfs_pattern512, mfs_buffer, size) == 0,
553571 "wrong record content");
554572 }]]></value>
555- </code>
556- </step>
557- <step>
558- <description>
559- <value>Creating one more record, should fail, MFS_ERR_OUT_OF_MEM is expected.</value>
560- </description>
561- <tags>
562- <value />
563- </tags>
564- <code>
565- <value><![CDATA[mfs_error_t err;
573+ </code>
574+ </step>
575+ <step>
576+ <description>
577+ <value>Creating one more record, should fail,
578+ MFS_ERR_OUT_OF_MEM is expected.</value>
579+ </description>
580+ <tags>
581+ <value />
582+ </tags>
583+ <code>
584+ <value><![CDATA[mfs_error_t err;
566585 mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
567586 sizeof (mfs_data_header_t))) /
568587 (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
@@ -569,17 +588,19 @@
569588
570589 err = mfsWriteRecord(&mfs1, id_max, sizeof mfs_pattern512 , mfs_pattern512);
571590 test_assert(err == MFS_ERR_OUT_OF_MEM, "creation didn't fail");]]></value>
572- </code>
573- </step>
574- <step>
575- <description>
576- <value>Adding a smaller record to fill the final gap. A reinitialization is performed and MFS_NO_ERROR is expected.</value>
577- </description>
578- <tags>
579- <value />
580- </tags>
581- <code>
582- <value><![CDATA[mfs_error_t err;
591+ </code>
592+ </step>
593+ <step>
594+ <description>
595+ <value>Adding a smaller record to fill the final gap. A
596+ reinitialization is performed and MFS_NO_ERROR is
597+ expected.</value>
598+ </description>
599+ <tags>
600+ <value />
601+ </tags>
602+ <code>
603+ <value><![CDATA[mfs_error_t err;
583604 size_t remaining;
584605
585606 remaining = (size_t)flashGetSectorOffset(mfscfg1.flashp, mfscfg1.bank0_start) +
@@ -610,42 +631,45 @@
610631 mfsStop(&mfs1);
611632 err = mfsStart(&mfs1, &mfscfg1);
612633 test_assert(err == MFS_NO_ERROR, "initialization error");]]></value>
613- </code>
614- </step>
615- </steps>
616- </case>
617- <case>
618- <brief>
619- <value>Testing garbage collection by writing.</value>
620- </brief>
621- <description>
622- <value>The garbage collection procedure is triggeredby a write operation and the state of both banks is checked.</value>
623- </description>
624- <condition>
625- <value />
626- </condition>
627- <various_code>
628- <setup_code>
629- <value><![CDATA[mfsStart(&mfs1, &mfscfg1);
634+ </code>
635+ </step>
636+ </steps>
637+ </case>
638+ <case>
639+ <brief>
640+ <value>Testing garbage collection by writing.</value>
641+ </brief>
642+ <description>
643+ <value>The garbage collection procedure is triggeredby a
644+ write operation and the state of both banks is checked.
645+ </value>
646+ </description>
647+ <condition>
648+ <value />
649+ </condition>
650+ <various_code>
651+ <setup_code>
652+ <value><![CDATA[mfsStart(&mfs1, &mfscfg1);
630653 mfsErase(&mfs1);]]></value>
631- </setup_code>
632- <teardown_code>
633- <value><![CDATA[mfsStop(&mfs1);]]></value>
634- </teardown_code>
635- <local_variables>
636- <value />
637- </local_variables>
638- </various_code>
639- <steps>
640- <step>
641- <description>
642- <value>Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected.</value>
643- </description>
644- <tags>
645- <value />
646- </tags>
647- <code>
648- <value><![CDATA[mfs_id_t id;
654+ </setup_code>
655+ <teardown_code>
656+ <value><![CDATA[mfsStop(&mfs1);]]></value>
657+ </teardown_code>
658+ <local_variables>
659+ <value />
660+ </local_variables>
661+ </various_code>
662+ <steps>
663+ <step>
664+ <description>
665+ <value>Filling up the storage by writing records with
666+ increasing IDs, MFS_NO_ERROR is expected.</value>
667+ </description>
668+ <tags>
669+ <value />
670+ </tags>
671+ <code>
672+ <value><![CDATA[mfs_id_t id;
649673 mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
650674 sizeof (mfs_data_header_t))) /
651675 (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
@@ -665,17 +689,18 @@
665689 test_assert(memcmp(mfs_pattern512, mfs_buffer, size) == 0,
666690 "wrong record content");
667691 }]]></value>
668- </code>
669- </step>
670- <step>
671- <description>
672- <value>Erasing one record, MFS_NO_ERROR is expected.</value>
673- </description>
674- <tags>
675- <value />
676- </tags>
677- <code>
678- <value><![CDATA[mfs_error_t err;
692+ </code>
693+ </step>
694+ <step>
695+ <description>
696+ <value>Erasing one record, MFS_NO_ERROR is expected.
697+ </value>
698+ </description>
699+ <tags>
700+ <value />
701+ </tags>
702+ <code>
703+ <value><![CDATA[mfs_error_t err;
679704 size_t size;
680705
681706 err = mfsEraseRecord(&mfs1, 1);
@@ -683,17 +708,19 @@
683708 size = sizeof mfs_buffer;
684709 err = mfsReadRecord(&mfs1, 1, &size, mfs_buffer);
685710 test_assert(err == MFS_ERR_NOT_FOUND, "record not erased");]]></value>
686- </code>
687- </step>
688- <step>
689- <description>
690- <value>Writing one more record triggers garbage collection, MFS_WARN_GC is expected, KS state is checked for correctness after the operation.</value>
691- </description>
692- <tags>
693- <value />
694- </tags>
695- <code>
696- <value><![CDATA[mfs_error_t err;
711+ </code>
712+ </step>
713+ <step>
714+ <description>
715+ <value>Writing one more record triggers garbage
716+ collection, MFS_WARN_GC is expected, KS state is
717+ checked for correctness after the operation.</value>
718+ </description>
719+ <tags>
720+ <value />
721+ </tags>
722+ <code>
723+ <value><![CDATA[mfs_error_t err;
697724 size_t size;
698725
699726 test_assert(mfs1.current_counter == 1, "not first instance");
@@ -708,17 +735,18 @@
708735 "wrong record content");
709736 test_assert(mfs1.current_bank == MFS_BANK_1, "unexpected bank");
710737 test_assert(bank_verify_erased(MFS_BANK_0) == FLASH_NO_ERROR, "bank 0 not erased");]]></value>
711- </code>
712- </step>
713- <step>
714- <description>
715- <value>Checking for all records in the new bank, MFS_NOERROR is expected for each record.</value>
716- </description>
717- <tags>
718- <value />
719- </tags>
720- <code>
721- <value><![CDATA[mfs_id_t id;
738+ </code>
739+ </step>
740+ <step>
741+ <description>
742+ <value>Checking for all records in the new bank,
743+ MFS_NOERROR is expected for each record.</value>
744+ </description>
745+ <tags>
746+ <value />
747+ </tags>
748+ <code>
749+ <value><![CDATA[mfs_id_t id;
722750 mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
723751 sizeof (mfs_data_header_t))) /
724752 (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
@@ -741,17 +769,18 @@
741769 test_assert(err == MFS_ERR_NOT_FOUND, "found unexpected record");
742770 }
743771 }]]></value>
744- </code>
745- </step>
746- <step>
747- <description>
748- <value>Erasing one record, MFS_NO_ERROR is expected.</value>
749- </description>
750- <tags>
751- <value />
752- </tags>
753- <code>
754- <value><![CDATA[mfs_error_t err;
772+ </code>
773+ </step>
774+ <step>
775+ <description>
776+ <value>Erasing one record, MFS_NO_ERROR is expected.
777+ </value>
778+ </description>
779+ <tags>
780+ <value />
781+ </tags>
782+ <code>
783+ <value><![CDATA[mfs_error_t err;
755784 size_t size;
756785
757786 err = mfsEraseRecord(&mfs1, 1);
@@ -759,17 +788,20 @@
759788 size = sizeof mfs_buffer;
760789 err = mfsReadRecord(&mfs1, 1, &size, mfs_buffer);
761790 test_assert(err == MFS_ERR_NOT_FOUND, "record not erased");]]></value>
762- </code>
763- </step>
764- <step>
765- <description>
766- <value>Writing one more record triggers garbage collection, MFS_WARN_GC is expected, MFS object state is checked for correctness after the operation.</value>
767- </description>
768- <tags>
769- <value />
770- </tags>
771- <code>
772- <value><![CDATA[mfs_error_t err;
791+ </code>
792+ </step>
793+ <step>
794+ <description>
795+ <value>Writing one more record triggers garbage
796+ collection, MFS_WARN_GC is expected, MFS object state
797+ is checked for correctness after the operation.
798+ </value>
799+ </description>
800+ <tags>
801+ <value />
802+ </tags>
803+ <code>
804+ <value><![CDATA[mfs_error_t err;
773805 size_t size;
774806
775807 test_assert(mfs1.current_counter == 2, "not second instance");
@@ -784,17 +816,18 @@
784816 "wrong record content");
785817 test_assert(mfs1.current_bank == MFS_BANK_0, "unexpected bank");
786818 test_assert(bank_verify_erased(MFS_BANK_1) == FLASH_NO_ERROR, "bank 1 not erased");]]></value>
787- </code>
788- </step>
789- <step>
790- <description>
791- <value>Checking for all records in the new bank, MFS_NO_ERROR is expected for each record.</value>
792- </description>
793- <tags>
794- <value />
795- </tags>
796- <code>
797- <value><![CDATA[mfs_id_t id;
819+ </code>
820+ </step>
821+ <step>
822+ <description>
823+ <value>Checking for all records in the new bank,
824+ MFS_NO_ERROR is expected for each record.</value>
825+ </description>
826+ <tags>
827+ <value />
828+ </tags>
829+ <code>
830+ <value><![CDATA[mfs_id_t id;
798831 mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
799832 sizeof (mfs_data_header_t))) /
800833 (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
@@ -817,42 +850,45 @@
817850 test_assert(err == MFS_ERR_NOT_FOUND, "found unexpected record");
818851 }
819852 }]]></value>
820- </code>
821- </step>
822- </steps>
823- </case>
824- <case>
825- <brief>
826- <value>Testing garbage collection by erasing</value>
827- </brief>
828- <description>
829- <value>The garbage collection procedure is triggered by an erase operation and the state of both banks is checked.</value>
830- </description>
831- <condition>
832- <value />
833- </condition>
834- <various_code>
835- <setup_code>
836- <value><![CDATA[mfsStart(&mfs1, &mfscfg1);
853+ </code>
854+ </step>
855+ </steps>
856+ </case>
857+ <case>
858+ <brief>
859+ <value>Testing garbage collection by erasing</value>
860+ </brief>
861+ <description>
862+ <value>The garbage collection procedure is triggered by an
863+ erase operation and the state of both banks is checked.
864+ </value>
865+ </description>
866+ <condition>
867+ <value />
868+ </condition>
869+ <various_code>
870+ <setup_code>
871+ <value><![CDATA[mfsStart(&mfs1, &mfscfg1);
837872 mfsErase(&mfs1);]]></value>
838- </setup_code>
839- <teardown_code>
840- <value><![CDATA[mfsStop(&mfs1);]]></value>
841- </teardown_code>
842- <local_variables>
843- <value />
844- </local_variables>
845- </various_code>
846- <steps>
847- <step>
848- <description>
849- <value>Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected.</value>
850- </description>
851- <tags>
852- <value />
853- </tags>
854- <code>
855- <value><![CDATA[mfs_id_t id;
873+ </setup_code>
874+ <teardown_code>
875+ <value><![CDATA[mfsStop(&mfs1);]]></value>
876+ </teardown_code>
877+ <local_variables>
878+ <value />
879+ </local_variables>
880+ </various_code>
881+ <steps>
882+ <step>
883+ <description>
884+ <value>Filling up the storage by writing records with
885+ increasing IDs, MFS_NO_ERROR is expected.</value>
886+ </description>
887+ <tags>
888+ <value />
889+ </tags>
890+ <code>
891+ <value><![CDATA[mfs_id_t id;
856892 mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
857893 sizeof (mfs_data_header_t))) /
858894 (sizeof (mfs_data_header_t) + (sizeof mfs_pattern512 / 4));
@@ -870,17 +906,18 @@
870906 test_assert(memcmp(mfs_pattern512, mfs_buffer, size) == 0,
871907 "wrong record content");
872908 }]]></value>
873- </code>
874- </step>
875- <step>
876- <description>
877- <value>Erase records until the flash bank is filled entirely.</value>
878- </description>
879- <tags>
880- <value />
881- </tags>
882- <code>
883- <value><![CDATA[mfs_error_t err;
909+ </code>
910+ </step>
911+ <step>
912+ <description>
913+ <value>Erase records until the flash bank is filled
914+ entirely.</value>
915+ </description>
916+ <tags>
917+ <value />
918+ </tags>
919+ <code>
920+ <value><![CDATA[mfs_error_t err;
884921 size_t size;
885922 mfs_id_t id;
886923 mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
@@ -897,17 +934,19 @@
897934 err = mfsReadRecord(&mfs1, id, &size, mfs_buffer);
898935 test_assert(err == MFS_ERR_NOT_FOUND, "record not erased");
899936 }]]></value>
900- </code>
901- </step>
902- <step>
903- <description>
904- <value>Erasing one more record triggers garbage collection, MFS_WARN_GC is expected, KS state is checked for correctness after the operation.</value>
905- </description>
906- <tags>
907- <value />
908- </tags>
909- <code>
910- <value><![CDATA[mfs_error_t err;
937+ </code>
938+ </step>
939+ <step>
940+ <description>
941+ <value>Erasing one more record triggers garbage
942+ collection, MFS_WARN_GC is expected, KS state is
943+ checked for correctness after the operation.</value>
944+ </description>
945+ <tags>
946+ <value />
947+ </tags>
948+ <code>
949+ <value><![CDATA[mfs_error_t err;
911950 size_t size;
912951 mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
913952 sizeof (mfs_data_header_t))) /
@@ -922,64 +961,69 @@
922961 test_assert(err == MFS_ERR_NOT_FOUND, "record not erased");
923962 test_assert(mfs1.current_bank == MFS_BANK_1, "unexpected bank");
924963 test_assert(bank_verify_erased(MFS_BANK_0) == FLASH_NO_ERROR, "bank 0 not erased");]]></value>
925- </code>
926- </step>
927- </steps>
928- </case>
929- </cases>
930- </sequence>
931- <sequence>
932- <type index="0">
933- <value>Internal Tests</value>
934- </type>
935- <brief>
936- <value>Transaction Mode tests.</value>
937- </brief>
938- <description>
939- <value>This sequence tests the MFS behavior when used in transaction mode, correct cases and expected error cases are tested.</value>
940- </description>
941- <condition>
942- <value />
943- </condition>
944- <shared_code>
945- <value><![CDATA[#include <string.h>
964+ </code>
965+ </step>
966+ </steps>
967+ </case>
968+ </cases>
969+ </sequence>
970+ <sequence>
971+ <type index="0">
972+ <value>Internal Tests</value>
973+ </type>
974+ <brief>
975+ <value>Transaction Mode tests.</value>
976+ </brief>
977+ <description>
978+ <value>This sequence tests the MFS behavior when used in
979+ transaction mode, correct cases and expected error cases are
980+ tested.</value>
981+ </description>
982+ <condition>
983+ <value />
984+ </condition>
985+ <shared_code>
986+ <value><![CDATA[#include <string.h>
946987 #include "hal_mfs.h"]]></value>
947- </shared_code>
948- <cases>
949- <case>
950- <brief>
951- <value>Committing a transaction</value>
952- </brief>
953- <description>
954- <value>A set of new/existing records are written/erased within a transaction then the transaction is committed, the state is checked afterward.</value>
955- </description>
956- <condition>
957- <value />
958- </condition>
959- <various_code>
960- <setup_code>
961- <value><![CDATA[bank_erase(MFS_BANK_0);
988+ </shared_code>
989+ <cases>
990+ <case>
991+ <brief>
992+ <value>Committing a transaction</value>
993+ </brief>
994+ <description>
995+ <value>A set of new/existing records are written/erased
996+ within a transaction then the transaction is committed,
997+ the state is checked afterward.</value>
998+ </description>
999+ <condition>
1000+ <value />
1001+ </condition>
1002+ <various_code>
1003+ <setup_code>
1004+ <value><![CDATA[bank_erase(MFS_BANK_0);
9621005 bank_erase(MFS_BANK_1);
9631006 mfsStart(&mfs1, &mfscfg1);]]></value>
964- </setup_code>
965- <teardown_code>
966- <value><![CDATA[mfsStop(&mfs1);]]></value>
967- </teardown_code>
968- <local_variables>
969- <value><![CDATA[uint32_t current_counter;
1007+ </setup_code>
1008+ <teardown_code>
1009+ <value><![CDATA[mfsStop(&mfs1);]]></value>
1010+ </teardown_code>
1011+ <local_variables>
1012+ <value><![CDATA[uint32_t current_counter;
9701013 uint32_t used_space;]]></value>
971- </local_variables>
972- </various_code>
973- <steps>
974- <step>
975- <description>
976- <value>Records 1, 2 and 3 are created, MFS_NO_ERROR is expected.</value>
977- </description>
978- <tags>
979- <value />
980- </tags>
981- <code>
982- <value><![CDATA[mfs_error_t err;
1014+ </local_variables>
1015+ </various_code>
1016+ <steps>
1017+ <step>
1018+ <description>
1019+ <value>Records 1, 2 and 3 are created, MFS_NO_ERROR is
1020+ expected.</value>
1021+ </description>
1022+ <tags>
1023+ <value />
1024+ </tags>
1025+ <code>
1026+ <value><![CDATA[mfs_error_t err;
9831027
9841028 err = mfsWriteRecord(&mfs1, 1, sizeof mfs_pattern16, mfs_pattern16);
9851029 test_assert(err == MFS_NO_ERROR, "error creating record 1");
@@ -987,17 +1031,18 @@
9871031 test_assert(err == MFS_NO_ERROR, "error creating record 2");
9881032 err = mfsWriteRecord(&mfs1, 3, sizeof mfs_pattern16, mfs_pattern16);
9891033 test_assert(err == MFS_NO_ERROR, "error creating record 3");]]></value>
990- </code>
991- </step>
992- <step>
993- <description>
994- <value>Presence of records 1, 2 and 3 is verified, MFS_NO_ERROR is expected.</value>
995- </description>
996- <tags>
997- <value />
998- </tags>
999- <code>
1000- <value><![CDATA[mfs_error_t err;
1034+ </code>
1035+ </step>
1036+ <step>
1037+ <description>
1038+ <value>Presence of records 1, 2 and 3 is verified,
1039+ MFS_NO_ERROR is expected.</value>
1040+ </description>
1041+ <tags>
1042+ <value />
1043+ </tags>
1044+ <code>
1045+ <value><![CDATA[mfs_error_t err;
10011046 size_t size;
10021047
10031048 size = sizeof mfs_buffer;
@@ -1009,31 +1054,33 @@
10091054 size = sizeof mfs_buffer;
10101055 err = mfsReadRecord(&mfs1, 3, &size, mfs_buffer);
10111056 test_assert(err == MFS_NO_ERROR, "record not found");]]></value>
1012- </code>
1013- </step>
1014- <step>
1015- <description>
1016- <value>Starting a transaction with sufficient pre-allocated space, MFS_NO_ERROR is expected.</value>
1017- </description>
1018- <tags>
1019- <value />
1020- </tags>
1021- <code>
1022- <value><![CDATA[mfs_error_t err;
1057+ </code>
1058+ </step>
1059+ <step>
1060+ <description>
1061+ <value>Starting a transaction with sufficient
1062+ pre-allocated space, MFS_NO_ERROR is expected.</value>
1063+ </description>
1064+ <tags>
1065+ <value />
1066+ </tags>
1067+ <code>
1068+ <value><![CDATA[mfs_error_t err;
10231069
10241070 err = mfsStartTransaction(&mfs1, 1024U);
10251071 test_assert(err == MFS_NO_ERROR, "error starting transaction");]]></value>
1026- </code>
1027- </step>
1028- <step>
1029- <description>
1030- <value>Atomically erasing record 1, updating record 2, reading record 3.</value>
1031- </description>
1032- <tags>
1033- <value />
1034- </tags>
1035- <code>
1036- <value><![CDATA[mfs_error_t err;
1072+ </code>
1073+ </step>
1074+ <step>
1075+ <description>
1076+ <value>Atomically erasing record 1, updating record 2,
1077+ reading record 3.</value>
1078+ </description>
1079+ <tags>
1080+ <value />
1081+ </tags>
1082+ <code>
1083+ <value><![CDATA[mfs_error_t err;
10371084 size_t size;
10381085
10391086 err = mfsEraseRecord(&mfs1, 1);
@@ -1045,17 +1092,18 @@
10451092 test_assert(err == MFS_NO_ERROR, "record not found");
10461093 test_assert(size == sizeof mfs_pattern16, "unexpected record length");
10471094 test_assert(memcmp(mfs_pattern16, mfs_buffer, size) == 0, "wrong record content");]]></value>
1048- </code>
1049- </step>
1050- <step>
1051- <description>
1052- <value>Committing the transaction, MFS_NO_ERROR is expected.</value>
1053- </description>
1054- <tags>
1055- <value />
1056- </tags>
1057- <code>
1058- <value><![CDATA[mfs_error_t err;
1095+ </code>
1096+ </step>
1097+ <step>
1098+ <description>
1099+ <value>Committing the transaction, MFS_NO_ERROR is
1100+ expected.</value>
1101+ </description>
1102+ <tags>
1103+ <value />
1104+ </tags>
1105+ <code>
1106+ <value><![CDATA[mfs_error_t err;
10591107
10601108 err = mfsCommitTransaction(&mfs1);
10611109 test_assert(err == MFS_NO_ERROR, "error committing transaction");
@@ -1063,17 +1111,19 @@
10631111 /* Saving some internal state for successive checks.*/
10641112 current_counter = mfs1.current_counter;
10651113 used_space = mfs1.used_space;]]></value>
1066- </code>
1067- </step>
1068- <step>
1069- <description>
1070- <value>Testing outcome, records 1 must not be present, record 2 must contain the new value and record 3 must be unchanged.</value>
1071- </description>
1072- <tags>
1073- <value />
1074- </tags>
1075- <code>
1076- <value><![CDATA[mfs_error_t err;
1114+ </code>
1115+ </step>
1116+ <step>
1117+ <description>
1118+ <value>Testing outcome, records 1 must not be present,
1119+ record 2 must contain the new value and record 3 must
1120+ be unchanged.</value>
1121+ </description>
1122+ <tags>
1123+ <value />
1124+ </tags>
1125+ <code>
1126+ <value><![CDATA[mfs_error_t err;
10771127 size_t size;
10781128
10791129 /* Record 1 must not be present.*/
@@ -1099,31 +1149,32 @@
10991149 test_assert(MFS_BANK_0 == mfs1.current_bank, "internal data mismatch");
11001150 test_assert(current_counter == mfs1.current_counter, "internal data mismatch");
11011151 test_assert(used_space == mfs1.used_space, "internal data mismatch");]]></value>
1102- </code>
1103- </step>
1104- <step>
1105- <description>
1106- <value>Re-mounting the manage storage, MFS_NO_ERROR is expected.</value>
1107- </description>
1108- <tags>
1109- <value />
1110- </tags>
1111- <code>
1112- <value><![CDATA[mfs_error_t err;
1152+ </code>
1153+ </step>
1154+ <step>
1155+ <description>
1156+ <value>Re-mounting the manage storage, MFS_NO_ERROR is
1157+ expected.</value>
1158+ </description>
1159+ <tags>
1160+ <value />
1161+ </tags>
1162+ <code>
1163+ <value><![CDATA[mfs_error_t err;
11131164
11141165 err = mfsStart(&mfs1, &mfscfg1);
11151166 test_assert(err == MFS_NO_ERROR, "re-start failed");]]></value>
1116- </code>
1117- </step>
1118- <step>
1119- <description>
1120- <value>Testing outcome again after re-start.</value>
1121- </description>
1122- <tags>
1123- <value />
1124- </tags>
1125- <code>
1126- <value><![CDATA[mfs_error_t err;
1167+ </code>
1168+ </step>
1169+ <step>
1170+ <description>
1171+ <value>Testing outcome again after re-start.</value>
1172+ </description>
1173+ <tags>
1174+ <value />
1175+ </tags>
1176+ <code>
1177+ <value><![CDATA[mfs_error_t err;
11271178 size_t size;
11281179
11291180 /* Record 1 must not be present.*/
@@ -1149,32 +1200,34 @@
11491200 test_assert(MFS_BANK_0 == mfs1.current_bank, "internal data mismatch");
11501201 test_assert(current_counter == mfs1.current_counter, "internal data mismatch");
11511202 test_assert(used_space == mfs1.used_space, "internal data mismatch");]]></value>
1152- </code>
1153- </step>
1154- <step>
1155- <description>
1156- <value>Performing a garbage collection, the result must
1157- not change.</value>
1158- </description>
1159- <tags>
1160- <value />
1161- </tags>
1162- <code>
1163- <value><![CDATA[mfs_error_t err;
1203+ </code>
1204+ </step>
1205+ <step>
1206+ <description>
1207+ <value>Performing a garbage collection, the result must
1208+ not change.
1209+ </value>
1210+ </description>
1211+ <tags>
1212+ <value />
1213+ </tags>
1214+ <code>
1215+ <value><![CDATA[mfs_error_t err;
11641216
11651217 err = mfsPerformGarbageCollection(&mfs1);
11661218 test_assert(err == MFS_NO_ERROR, "garbage collection failed");]]></value>
1167- </code>
1168- </step>
1169- <step>
1170- <description>
1171- <value>Testing outcome again after garbage collection.</value>
1172- </description>
1173- <tags>
1174- <value />
1175- </tags>
1176- <code>
1177- <value><![CDATA[mfs_error_t err;
1219+ </code>
1220+ </step>
1221+ <step>
1222+ <description>
1223+ <value>Testing outcome again after garbage collection.
1224+ </value>
1225+ </description>
1226+ <tags>
1227+ <value />
1228+ </tags>
1229+ <code>
1230+ <value><![CDATA[mfs_error_t err;
11781231 size_t size;
11791232
11801233 /* Record 1 must not be present.*/
@@ -1200,44 +1253,47 @@
12001253 test_assert(MFS_BANK_1 == mfs1.current_bank, "internal data mismatch");
12011254 test_assert(current_counter == mfs1.current_counter - 1, "internal data mismatch");
12021255 test_assert(used_space == mfs1.used_space, "internal data mismatch");]]></value>
1203- </code>
1204- </step>
1205- </steps>
1206- </case>
1207- <case>
1208- <brief>
1209- <value>Rolling back a transaction.</value>
1210- </brief>
1211- <description>
1212- <value>A set of new/existing records are written/erased within a transaction then the transaction is rolled back, the state is checked afterward.</value>
1213- </description>
1214- <condition>
1215- <value />
1216- </condition>
1217- <various_code>
1218- <setup_code>
1219- <value><![CDATA[bank_erase(MFS_BANK_0);
1256+ </code>
1257+ </step>
1258+ </steps>
1259+ </case>
1260+ <case>
1261+ <brief>
1262+ <value>Rolling back a transaction.</value>
1263+ </brief>
1264+ <description>
1265+ <value>A set of new/existing records are written/erased
1266+ within a transaction then the transaction is rolled back,
1267+ the state is checked afterward.</value>
1268+ </description>
1269+ <condition>
1270+ <value />
1271+ </condition>
1272+ <various_code>
1273+ <setup_code>
1274+ <value><![CDATA[bank_erase(MFS_BANK_0);
12201275 bank_erase(MFS_BANK_1);
12211276 mfsStart(&mfs1, &mfscfg1);]]></value>
1222- </setup_code>
1223- <teardown_code>
1224- <value><![CDATA[mfsStop(&mfs1);]]></value>
1225- </teardown_code>
1226- <local_variables>
1227- <value><![CDATA[uint32_t current_counter;
1277+ </setup_code>
1278+ <teardown_code>
1279+ <value><![CDATA[mfsStop(&mfs1);]]></value>
1280+ </teardown_code>
1281+ <local_variables>
1282+ <value><![CDATA[uint32_t current_counter;
12281283 uint32_t used_space;]]></value>
1229- </local_variables>
1230- </various_code>
1231- <steps>
1232- <step>
1233- <description>
1234- <value>Records 1, 2 and 3 are created, MFS_NO_ERROR is expected.</value>
1235- </description>
1236- <tags>
1237- <value />
1238- </tags>
1239- <code>
1240- <value><![CDATA[mfs_error_t err;
1284+ </local_variables>
1285+ </various_code>
1286+ <steps>
1287+ <step>
1288+ <description>
1289+ <value>Records 1, 2 and 3 are created, MFS_NO_ERROR is
1290+ expected.</value>
1291+ </description>
1292+ <tags>
1293+ <value />
1294+ </tags>
1295+ <code>
1296+ <value><![CDATA[mfs_error_t err;
12411297
12421298 err = mfsWriteRecord(&mfs1, 1, sizeof mfs_pattern16, mfs_pattern16);
12431299 test_assert(err == MFS_NO_ERROR, "error creating record 1");
@@ -1245,17 +1301,18 @@
12451301 test_assert(err == MFS_NO_ERROR, "error creating record 2");
12461302 err = mfsWriteRecord(&mfs1, 3, sizeof mfs_pattern16, mfs_pattern16);
12471303 test_assert(err == MFS_NO_ERROR, "error creating record 3");]]></value>
1248- </code>
1249- </step>
1250- <step>
1251- <description>
1252- <value>Presence of records 1, 2 and 3 is verified, MFS_NO_ERROR is expected.</value>
1253- </description>
1254- <tags>
1255- <value />
1256- </tags>
1257- <code>
1258- <value><![CDATA[mfs_error_t err;
1304+ </code>
1305+ </step>
1306+ <step>
1307+ <description>
1308+ <value>Presence of records 1, 2 and 3 is verified,
1309+ MFS_NO_ERROR is expected.</value>
1310+ </description>
1311+ <tags>
1312+ <value />
1313+ </tags>
1314+ <code>
1315+ <value><![CDATA[mfs_error_t err;
12591316 size_t size;
12601317
12611318 size = sizeof mfs_buffer;
@@ -1267,31 +1324,34 @@
12671324 size = sizeof mfs_buffer;
12681325 err = mfsReadRecord(&mfs1, 3, &size, mfs_buffer);
12691326 test_assert(err == MFS_NO_ERROR, "record not found");]]></value>
1270- </code>
1271- </step>
1272- <step>
1273- <description>
1274- <value>Starting a transaction with sufficient pre-allocated space, MFS_NO_ERROR is expected..</value>
1275- </description>
1276- <tags>
1277- <value />
1278- </tags>
1279- <code>
1280- <value><![CDATA[mfs_error_t err;
1327+ </code>
1328+ </step>
1329+ <step>
1330+ <description>
1331+ <value>Starting a transaction with sufficient
1332+ pre-allocated space, MFS_NO_ERROR is expected..
1333+ </value>
1334+ </description>
1335+ <tags>
1336+ <value />
1337+ </tags>
1338+ <code>
1339+ <value><![CDATA[mfs_error_t err;
12811340
12821341 err = mfsStartTransaction(&mfs1, 1024U);
12831342 test_assert(err == MFS_NO_ERROR, "error starting transaction");]]></value>
1284- </code>
1285- </step>
1286- <step>
1287- <description>
1288- <value>Atomically erasing record 1, updating record 2, reading record 3.</value>
1289- </description>
1290- <tags>
1291- <value />
1292- </tags>
1293- <code>
1294- <value><![CDATA[mfs_error_t err;
1343+ </code>
1344+ </step>
1345+ <step>
1346+ <description>
1347+ <value>Atomically erasing record 1, updating record 2,
1348+ reading record 3.</value>
1349+ </description>
1350+ <tags>
1351+ <value />
1352+ </tags>
1353+ <code>
1354+ <value><![CDATA[mfs_error_t err;
12951355 size_t size;
12961356
12971357 err = mfsEraseRecord(&mfs1, 1);
@@ -1307,31 +1367,33 @@
13071367 /* Saving some internal state for successive checks.*/
13081368 current_counter = mfs1.current_counter;
13091369 used_space = mfs1.used_space;]]></value>
1310- </code>
1311- </step>
1312- <step>
1313- <description>
1314- <value>Rolling back the transaction, MFS_NO_ERROR is expected.</value>
1315- </description>
1316- <tags>
1317- <value />
1318- </tags>
1319- <code>
1320- <value><![CDATA[mfs_error_t err;
1370+ </code>
1371+ </step>
1372+ <step>
1373+ <description>
1374+ <value>Rolling back the transaction, MFS_NO_ERROR is
1375+ expected.</value>
1376+ </description>
1377+ <tags>
1378+ <value />
1379+ </tags>
1380+ <code>
1381+ <value><![CDATA[mfs_error_t err;
13211382
13221383 err = mfsRollbackTransaction(&mfs1);
13231384 test_assert(err == MFS_NO_ERROR, "error rolling back transaction");]]></value>
1324- </code>
1325- </step>
1326- <step>
1327- <description>
1328- <value>State must not have changed, records 1, 2 and 3 must still be there unchanged.</value>
1329- </description>
1330- <tags>
1331- <value />
1332- </tags>
1333- <code>
1334- <value><![CDATA[mfs_error_t err;
1385+ </code>
1386+ </step>
1387+ <step>
1388+ <description>
1389+ <value>State must not have changed, records 1, 2 and 3
1390+ must still be there unchanged.</value>
1391+ </description>
1392+ <tags>
1393+ <value />
1394+ </tags>
1395+ <code>
1396+ <value><![CDATA[mfs_error_t err;
13351397 size_t size;
13361398
13371399 size = sizeof mfs_buffer;
@@ -1351,43 +1413,46 @@
13511413 test_assert(MFS_BANK_1 == mfs1.current_bank, "internal data mismatch");
13521414 test_assert(current_counter == mfs1.current_counter - 1, "internal data mismatch");
13531415 test_assert(used_space == mfs1.used_space, "internal data mismatch");]]></value>
1354- </code>
1355- </step>
1356- </steps>
1357- </case>
1358- <case>
1359- <brief>
1360- <value>Transaction triggering an early garbage collect.</value>
1361- </brief>
1362- <description>
1363- <value>A transaction is started with sufficient space but not contiguous, a garbage collection is triggered.</value>
1364- </description>
1365- <condition>
1366- <value />
1367- </condition>
1368- <various_code>
1369- <setup_code>
1370- <value><![CDATA[bank_erase(MFS_BANK_0);
1416+ </code>
1417+ </step>
1418+ </steps>
1419+ </case>
1420+ <case>
1421+ <brief>
1422+ <value>Transaction triggering an early garbage collect.
1423+ </value>
1424+ </brief>
1425+ <description>
1426+ <value>A transaction is started with sufficient space but
1427+ not contiguous, a garbage collection is triggered.</value>
1428+ </description>
1429+ <condition>
1430+ <value />
1431+ </condition>
1432+ <various_code>
1433+ <setup_code>
1434+ <value><![CDATA[bank_erase(MFS_BANK_0);
13711435 bank_erase(MFS_BANK_1);
13721436 mfsStart(&mfs1, &mfscfg1);]]></value>
1373- </setup_code>
1374- <teardown_code>
1375- <value><![CDATA[mfsStop(&mfs1);]]></value>
1376- </teardown_code>
1377- <local_variables>
1378- <value />
1379- </local_variables>
1380- </various_code>
1381- <steps>
1382- <step>
1383- <description>
1384- <value>Filling up the storage by writing records with increasing IDs, MFS_NO_ERROR is expected.</value>
1385- </description>
1386- <tags>
1387- <value />
1388- </tags>
1389- <code>
1390- <value><![CDATA[mfs_id_t id;
1437+ </setup_code>
1438+ <teardown_code>
1439+ <value><![CDATA[mfsStop(&mfs1);]]></value>
1440+ </teardown_code>
1441+ <local_variables>
1442+ <value />
1443+ </local_variables>
1444+ </various_code>
1445+ <steps>
1446+ <step>
1447+ <description>
1448+ <value>Filling up the storage by writing records with
1449+ increasing IDs, MFS_NO_ERROR is expected.</value>
1450+ </description>
1451+ <tags>
1452+ <value />
1453+ </tags>
1454+ <code>
1455+ <value><![CDATA[mfs_id_t id;
13911456 mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
13921457 sizeof (mfs_data_header_t))) /
13931458 (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
@@ -1407,17 +1472,18 @@
14071472 test_assert(memcmp(mfs_pattern512, mfs_buffer, size) == 0,
14081473 "wrong record content");
14091474 }]]></value>
1410- </code>
1411- </step>
1412- <step>
1413- <description>
1414- <value>Erasing one record, MFS_NO_ERROR is expected.</value>
1415- </description>
1416- <tags>
1417- <value />
1418- </tags>
1419- <code>
1420- <value><![CDATA[mfs_error_t err;
1475+ </code>
1476+ </step>
1477+ <step>
1478+ <description>
1479+ <value>Erasing one record, MFS_NO_ERROR is expected.
1480+ </value>
1481+ </description>
1482+ <tags>
1483+ <value />
1484+ </tags>
1485+ <code>
1486+ <value><![CDATA[mfs_error_t err;
14211487 size_t size;
14221488
14231489 err = mfsEraseRecord(&mfs1, 1);
@@ -1425,218 +1491,228 @@
14251491 size = sizeof mfs_buffer;
14261492 err = mfsReadRecord(&mfs1, 1, &size, mfs_buffer);
14271493 test_assert(err == MFS_ERR_NOT_FOUND, "record not erased");]]></value>
1428- </code>
1429- </step>
1430- <step>
1431- <description>
1432- <value>Starting a transaction with the whole remaining space, MFS_ERR_OUT_OF_MEM is expected.</value>
1433- </description>
1434- <tags>
1435- <value />
1436- </tags>
1437- <code>
1438- <value><![CDATA[mfs_error_t err;
1494+ </code>
1495+ </step>
1496+ <step>
1497+ <description>
1498+ <value>Starting a transaction with the whole remaining
1499+ space, MFS_ERR_OUT_OF_MEM is expected.</value>
1500+ </description>
1501+ <tags>
1502+ <value />
1503+ </tags>
1504+ <code>
1505+ <value><![CDATA[mfs_error_t err;
14391506 size_t size = mfs1.config->bank_size - mfs1.used_space;
14401507
14411508 err = mfsStartTransaction(&mfs1, size);
14421509 test_assert(err == MFS_ERR_OUT_OF_MEM, "invalid error code");]]></value>
1443- </code>
1444- </step>
1445- <step>
1446- <description>
1447- <value>Starting a transaction with insufficient space for one more header, MFS_ERR_OUT_OF_MEM is expected.</value>
1448- </description>
1449- <tags>
1450- <value />
1451- </tags>
1452- <code>
1453- <value><![CDATA[mfs_error_t err;
1510+ </code>
1511+ </step>
1512+ <step>
1513+ <description>
1514+ <value>Starting a transaction with insufficient space
1515+ for one more header, MFS_ERR_OUT_OF_MEM is expected.
1516+ </value>
1517+ </description>
1518+ <tags>
1519+ <value />
1520+ </tags>
1521+ <code>
1522+ <value><![CDATA[mfs_error_t err;
14541523 size_t size = ((mfs1.config->bank_size - mfs1.used_space) - sizeof (mfs_data_header_t)) + 1;
14551524
14561525 err = mfsStartTransaction(&mfs1, size);
14571526 test_assert(err == MFS_ERR_OUT_OF_MEM, "invalid error code");]]></value>
1458- </code>
1459- </step>
1460- <step>
1461- <description>
1462- <value>Starting a transaction with just enough space for one more header, MFS_NO_ERROR is expected.</value>
1463- </description>
1464- <tags>
1465- <value />
1466- </tags>
1467- <code>
1468- <value><![CDATA[mfs_error_t err;
1527+ </code>
1528+ </step>
1529+ <step>
1530+ <description>
1531+ <value>Starting a transaction with just enough space for
1532+ one more header, MFS_NO_ERROR is expected.</value>
1533+ </description>
1534+ <tags>
1535+ <value />
1536+ </tags>
1537+ <code>
1538+ <value><![CDATA[mfs_error_t err;
14691539 size_t size = (mfs1.config->bank_size - mfs1.used_space) - sizeof (mfs_data_header_t);
14701540
14711541 err = mfsStartTransaction(&mfs1, size);
14721542 test_assert(err == MFS_NO_ERROR, "error starting transaction");]]></value>
1473- </code>
1474- </step>
1475- <step>
1476- <description>
1477- <value>Rolling back, MFS_NO_ERROR is expected.</value>
1478- </description>
1479- <tags>
1480- <value />
1481- </tags>
1482- <code>
1483- <value><![CDATA[mfs_error_t err;
1543+ </code>
1544+ </step>
1545+ <step>
1546+ <description>
1547+ <value>Rolling back, MFS_NO_ERROR is expected.</value>
1548+ </description>
1549+ <tags>
1550+ <value />
1551+ </tags>
1552+ <code>
1553+ <value><![CDATA[mfs_error_t err;
14841554
14851555 err = mfsRollbackTransaction(&mfs1);
14861556 test_assert(err == MFS_NO_ERROR, "error rolling back transaction");]]></value>
1487- </code>
1488- </step>
1489- </steps>
1490- </case>
1491- </cases>
1492- </sequence>
1493- <sequence>
1494- <type index="0">
1495- <value>Internal Tests</value>
1496- </type>
1497- <brief>
1498- <value>API Invalid Cases tests.</value>
1499- </brief>
1500- <description>
1501- <value>This test sequence tests the error coded returned by the various APIs when called when the system is not initialized.</value>
1502- </description>
1503- <condition>
1557+ </code>
1558+ </step>
1559+ </steps>
1560+ </case>
1561+ </cases>
1562+ </sequence>
1563+ <sequence>
1564+ <type index="0">
1565+ <value>Internal Tests</value>
1566+ </type>
1567+ <brief>
1568+ <value>API Invalid Cases tests.</value>
1569+ </brief>
1570+ <description>
1571+ <value>This test sequence tests the error coded returned by the
1572+ various APIs when called when the system is not initialized.
1573+ </value>
1574+ </description>
1575+ <condition>
1576+ <value />
1577+ </condition>
1578+ <shared_code>
1579+ <value><![CDATA[#include "hal_mfs.h"]]></value>
1580+ </shared_code>
1581+ <cases>
1582+ <case>
1583+ <brief>
1584+ <value>Initialization error from APIs.</value>
1585+ </brief>
1586+ <description>
1587+ <value>The API functions are invoked without prior
1588+ initialization.</value>
1589+ </description>
1590+ <condition>
1591+ <value />
1592+ </condition>
1593+ <various_code>
1594+ <setup_code>
15041595 <value />
1505- </condition>
1506- <shared_code>
1507- <value><![CDATA[#include "hal_mfs.h"]]></value>
1508- </shared_code>
1509- <cases>
1510- <case>
1511- <brief>
1512- <value>Initialization error from APIs.</value>
1513- </brief>
1514- <description>
1515- <value>The API functions are invoked without prior initialization.</value>
1516- </description>
1517- <condition>
1518- <value />
1519- </condition>
1520- <various_code>
1521- <setup_code>
1522- <value />
1523- </setup_code>
1524- <teardown_code>
1525- <value />
1526- </teardown_code>
1527- <local_variables>
1528- <value />
1529- </local_variables>
1530- </various_code>
1531- <steps>
1532- <step>
1533- <description>
1534- <value>The function mfsErase() is called, MFS_ERR_INV_STATE is expected.</value>
1535- </description>
1536- <tags>
1537- <value />
1538- </tags>
1539- <code>
1540- <value><![CDATA[mfs_error_t err = mfsErase(&mfs1);
1596+ </setup_code>
1597+ <teardown_code>
1598+ <value />
1599+ </teardown_code>
1600+ <local_variables>
1601+ <value />
1602+ </local_variables>
1603+ </various_code>
1604+ <steps>
1605+ <step>
1606+ <description>
1607+ <value>The function mfsErase() is called,
1608+ MFS_ERR_INV_STATE is expected.</value>
1609+ </description>
1610+ <tags>
1611+ <value />
1612+ </tags>
1613+ <code>
1614+ <value><![CDATA[mfs_error_t err = mfsErase(&mfs1);
15411615 test_assert(err == MFS_ERR_INV_STATE, "mfsErase() returned wrong status");]]></value>
1542- </code>
1543- </step>
1544- <step>
1545- <description>
1546- <value>The function mfsWriteRecord() is called, MFS_ERR_INV_STATE is expected.</value>
1547- </description>
1548- <tags>
1549- <value />
1550- </tags>
1551- <code>
1552- <value><![CDATA[mfs_error_t err = mfsWriteRecord(&mfs1, 1, 16, mfs_buffer);
1616+ </code>
1617+ </step>
1618+ <step>
1619+ <description>
1620+ <value>The function mfsWriteRecord() is called,
1621+ MFS_ERR_INV_STATE is expected.</value>
1622+ </description>
1623+ <tags>
1624+ <value />
1625+ </tags>
1626+ <code>
1627+ <value><![CDATA[mfs_error_t err = mfsWriteRecord(&mfs1, 1, 16, mfs_buffer);
15531628 test_assert(err == MFS_ERR_INV_STATE, "mfsWriteRecord() returned wrong status");]]></value>
1554- </code>
1555- </step>
1556- <step>
1557- <description>
1558- <value>The function mfsEraseRecord() is called, MFS_ERR_INV_STATE is expected.</value>
1559- </description>
1560- <tags>
1561- <value />
1562- </tags>
1563- <code>
1564- <value><![CDATA[mfs_error_t err = mfsEraseRecord(&mfs1, 1);
1629+ </code>
1630+ </step>
1631+ <step>
1632+ <description>
1633+ <value>The function mfsEraseRecord() is called,
1634+ MFS_ERR_INV_STATE is expected.</value>
1635+ </description>
1636+ <tags>
1637+ <value />
1638+ </tags>
1639+ <code>
1640+ <value><![CDATA[mfs_error_t err = mfsEraseRecord(&mfs1, 1);
15651641 test_assert(err == MFS_ERR_INV_STATE, "mfsEraseRecord() returned wrong status");]]></value>
1566- </code>
1567- </step>
1568- <step>
1569- <description>
1570- <value>The function mfsReadRecord() is called, MFS_ERR_INV_STATE is expected.</value>
1571- </description>
1572- <tags>
1573- <value />
1574- </tags>
1575- <code>
1576- <value><![CDATA[size_t size = sizeof mfs_buffer;
1642+ </code>
1643+ </step>
1644+ <step>
1645+ <description>
1646+ <value>The function mfsReadRecord() is called,
1647+ MFS_ERR_INV_STATE is expected.</value>
1648+ </description>
1649+ <tags>
1650+ <value />
1651+ </tags>
1652+ <code>
1653+ <value><![CDATA[size_t size = sizeof mfs_buffer;
15771654 mfs_error_t err = mfsReadRecord(&mfs1, 1, &size, mfs_buffer);
15781655 test_assert(err == MFS_ERR_INV_STATE, "mfsReadRecord() returned wrong status");]]></value>
1579- </code>
1580- </step>
1581- <step>
1582- <description>
1583- <value>The function mfsPerformGarbageCollection() is called, MFS_ERR_INV_STATE is expected.</value>
1584- </description>
1585- <tags>
1586- <value />
1587- </tags>
1588- <code>
1589- <value><![CDATA[mfs_error_t err = mfsPerformGarbageCollection(&mfs1);
1656+ </code>
1657+ </step>
1658+ <step>
1659+ <description>
1660+ <value>The function mfsPerformGarbageCollection() is
1661+ called, MFS_ERR_INV_STATE is expected.</value>
1662+ </description>
1663+ <tags>
1664+ <value />
1665+ </tags>
1666+ <code>
1667+ <value><![CDATA[mfs_error_t err = mfsPerformGarbageCollection(&mfs1);
15901668 test_assert(err == MFS_ERR_INV_STATE, "mfsPerformGarbageCollection() returned wrong status");]]></value>
1591- </code>
1592- </step>
1593- </steps>
1594- </case>
1595- <case>
1596- <brief>
1597- <value>Erasing non existing record.</value>
1598- </brief>
1599- <description>
1600- <value>An erase operation is attempted on an non-existing record.</value>
1601- </description>
1602- <condition>
1603- <value />
1604- </condition>
1605- <various_code>
1606- <setup_code>
1607- <value><![CDATA[mfsStart(&mfs1, &mfscfg1);
1669+ </code>
1670+ </step>
1671+ </steps>
1672+ </case>
1673+ <case>
1674+ <brief>
1675+ <value>Erasing non existing record.</value>
1676+ </brief>
1677+ <description>
1678+ <value>An erase operation is attempted on an non-existing
1679+ record.</value>
1680+ </description>
1681+ <condition>
1682+ <value />
1683+ </condition>
1684+ <various_code>
1685+ <setup_code>
1686+ <value><![CDATA[mfsStart(&mfs1, &mfscfg1);
16081687 mfsErase(&mfs1);]]></value>
1609- </setup_code>
1610- <teardown_code>
1611- <value><![CDATA[mfsStop(&mfs1);]]></value>
1612- </teardown_code>
1613- <local_variables>
1614- <value />
1615- </local_variables>
1616- </various_code>
1617- <steps>
1618- <step>
1619- <description>
1620- <value>Record one is erased, the error MFS_ERR_NOT_FOUND is expected.</value>
1621- </description>
1622- <tags>
1623- <value />
1624- </tags>
1625- <code>
1626- <value><![CDATA[mfs_error_t err;
1688+ </setup_code>
1689+ <teardown_code>
1690+ <value><![CDATA[mfsStop(&mfs1);]]></value>
1691+ </teardown_code>
1692+ <local_variables>
1693+ <value />
1694+ </local_variables>
1695+ </various_code>
1696+ <steps>
1697+ <step>
1698+ <description>
1699+ <value>Record one is erased, the error MFS_ERR_NOT_FOUND
1700+ is expected.</value>
1701+ </description>
1702+ <tags>
1703+ <value />
1704+ </tags>
1705+ <code>
1706+ <value><![CDATA[mfs_error_t err;
16271707
16281708 err = mfsEraseRecord(&mfs1, 1);
16291709 test_assert(err != MFS_NO_ERROR, "record was present");
16301710 test_assert(err == MFS_ERR_NOT_FOUND, "invalid error code");]]></value>
1631- </code>
1632- </step>
1633- </steps>
1634- </case>
1635- </cases>
1636- </sequence>
1637- </sequences>
1638- </instance>
1639- </instances>
1640- <exportedFeatures />
1641- </application>
1642-</SPC5-Config>
1711+ </code>
1712+ </step>
1713+ </steps>
1714+ </case>
1715+ </cases>
1716+ </sequence>
1717+ </sequences>
1718+</instance>
--- trunk/test/nasa_osal/source/test/nasa_osal_test_sequence_001.c (revision 14521)
+++ trunk/test/nasa_osal/source/test/nasa_osal_test_sequence_001.c (revision 14522)
@@ -110,6 +110,7 @@
110110 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
111111 test_assert_sequence("", "task executed");
112112 }
113+ test_end_step(1);
113114
114115 /* [1.1.2] OS_TaskCreate() is invoked with task_name set to NULL, an
115116 error is expected.*/
@@ -128,6 +129,7 @@
128129 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
129130 test_assert_sequence("", "task executed");
130131 }
132+ test_end_step(2);
131133
132134 /* [1.1.3] OS_TaskCreate() is invoked with stack_pointer set to NULL,
133135 an error is expected.*/
@@ -146,6 +148,7 @@
146148 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
147149 test_assert_sequence("", "task executed");
148150 }
151+ test_end_step(3);
149152
150153 /* [1.1.4] OS_TaskCreate() is invoked with a very long task name, an
151154 error is expected.*/
@@ -164,6 +167,7 @@
164167 test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
165168 test_assert_sequence("", "task executed");
166169 }
170+ test_end_step(4);
167171
168172 /* [1.1.5] OS_TaskCreate() is invoked with priority below and above
169173 allowed range, an error is expected.*/
@@ -192,6 +196,7 @@
192196 test_assert(err == OS_ERR_INVALID_PRIORITY, "priority error not detected");
193197 test_assert_sequence("", "task executed");
194198 }
199+ test_end_step(5);
195200
196201 /* [1.1.6] OS_TaskCreate() is invoked with a stack size below
197202 minimum, an error is expected.*/
@@ -210,6 +215,7 @@
210215 test_assert(err == OS_INVALID_INT_NUM, "stack insufficient size not detected");
211216 test_assert_sequence("", "task executed");
212217 }
218+ test_end_step(6);
213219
214220 /* [1.1.7] OS_TaskCreate() is invoked twice with duplicated name and
215221 then duplicated stack, an error is expected in both cases.*/
@@ -262,6 +268,7 @@
262268 test_assert(err == OS_SUCCESS, "wait failed");
263269 test_assert_sequence("A", "task not executed");
264270 }
271+ test_end_step(7);
265272 }
266273
267274 static const testcase_t nasa_osal_test_001_001 = {
@@ -337,6 +344,7 @@
337344 0);
338345 test_assert(err == OS_SUCCESS, "task 1 creation failed");
339346 }
347+ test_end_step(1);
340348
341349 /* [1.2.2] Tasks are made runnable atomically and their execution
342350 order tested.*/
@@ -345,6 +353,7 @@
345353 OS_TaskDelay(5);
346354 test_assert_sequence("ABCD", "task order violation");
347355 }
356+ test_end_step(2);
348357
349358 /* [1.2.3] Four tasks are created in priority order from high to
350359 low.*/
@@ -389,6 +398,7 @@
389398 0);
390399 test_assert(err == OS_SUCCESS, "task 4 creation failed");
391400 }
401+ test_end_step(3);
392402
393403 /* [1.2.4] Tasks are made runnable atomically and their execution
394404 order tested.*/
@@ -397,6 +407,7 @@
397407 OS_TaskDelay(5);
398408 test_assert_sequence("ABCD", "task order violation");
399409 }
410+ test_end_step(4);
400411
401412 /* [1.2.5] Four tasks are created in an not ordered way.*/
402413 test_set_step(5);
@@ -440,6 +451,7 @@
440451 0);
441452 test_assert(err == OS_SUCCESS, "task 3 creation failed");
442453 }
454+ test_end_step(5);
443455
444456 /* [1.2.6] Tasks are made runnable atomically and their execution
445457 order tested.*/
@@ -448,6 +460,7 @@
448460 OS_TaskDelay(5);
449461 test_assert_sequence("ABCD", "task order violation");
450462 }
463+ test_end_step(6);
451464 }
452465
453466 static const testcase_t nasa_osal_test_001_002 = {
@@ -480,6 +493,7 @@
480493 err = OS_TaskDelete((uint32)-1);
481494 test_assert(err == OS_ERR_INVALID_ID, "wrong task id not detected");
482495 }
496+ test_end_step(1);
483497 }
484498
485499 static const testcase_t nasa_osal_test_001_003 = {
@@ -520,6 +534,7 @@
520534 0);
521535 test_assert(err == OS_SUCCESS, "deletable task creation failed");
522536 }
537+ test_end_step(1);
523538
524539 /* [1.4.2] Letting the task run for a while then deleting it. A check
525540 is performed on the correct execution of the delete handler.*/
@@ -532,6 +547,7 @@
532547 test_assert(err == OS_SUCCESS, "delete failed");
533548 test_assert_sequence("ABC", "events order violation");
534549 }
550+ test_end_step(2);
535551 }
536552
537553 static const testcase_t nasa_osal_test_001_004 = {
--- trunk/test/nasa_osal/source/test/nasa_osal_test_sequence_002.c (revision 14521)
+++ trunk/test/nasa_osal/source/test/nasa_osal_test_sequence_002.c (revision 14522)
@@ -89,6 +89,7 @@
8989 0);
9090 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
9191 }
92+ test_end_step(1);
9293
9394 /* [2.1.2] OS_QueueCreate() is invoked with task_name set to NULL, an
9495 error is expected.*/
@@ -104,6 +105,7 @@
104105 0);
105106 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
106107 }
108+ test_end_step(2);
107109
108110 /* [2.1.3] OS_QueueCreate() is invoked with a very long task name, an
109111 error is expected.*/
@@ -119,6 +121,7 @@
119121 0);
120122 test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
121123 }
124+ test_end_step(3);
122125
123126 /* [2.1.4] OS_QueueDelete() is invoked with queue_id set to -1, an
124127 error is expected.*/
@@ -129,6 +132,7 @@
129132 err = OS_QueueDelete((uint32)-1);
130133 test_assert(err == OS_ERR_INVALID_ID, "wrong queue id not detected");
131134 }
135+ test_end_step(4);
132136
133137 /* [2.1.5] OS_QueueCreate() is invoked twice with duplicated name, an
134138 error is expected, then the queue is deleted using
@@ -147,6 +151,7 @@
147151 err = OS_QueueDelete(qid1);
148152 test_assert(err == OS_SUCCESS, "queue deletion failed");
149153 }
154+ test_end_step(5);
150155 }
151156
152157 static const testcase_t nasa_osal_test_002_001 = {
@@ -183,6 +188,7 @@
183188 err = OS_QueueGetIdByName(NULL, "queue");
184189 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
185190 }
191+ test_end_step(1);
186192
187193 /* [2.2.2] OS_QueueGetIdByName() is invoked with queue_name set to
188194 NULL, an error is expected.*/
@@ -193,6 +199,7 @@
193199 err = OS_QueueGetIdByName(&qid, NULL);
194200 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
195201 }
202+ test_end_step(2);
196203
197204 /* [2.2.3] OS_QueueGetIdByName() is invoked with a very long task
198205 name, an error is expected.*/
@@ -203,6 +210,7 @@
203210 err = OS_QueueGetIdByName(&qid, "very very long queue name");
204211 test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
205212 }
213+ test_end_step(3);
206214 }
207215
208216 static const testcase_t nasa_osal_test_002_002 = {
@@ -254,6 +262,7 @@
254262 err = OS_QueueCreate(&qid, "test queue", 4, MESSAGE_SIZE, 0);
255263 test_assert(err == OS_SUCCESS, "queue creation failed");
256264 }
265+ test_end_step(1);
257266
258267 /* [2.3.2] Creating the writer task.*/
259268 test_set_step(2);
@@ -269,6 +278,7 @@
269278 0);
270279 test_assert(err == OS_SUCCESS, "writer task creation failed");
271280 }
281+ test_end_step(2);
272282
273283 /* [2.3.3] Reading messages from the writer task.*/
274284 test_set_step(3);
@@ -284,6 +294,7 @@
284294 "wrong message");
285295 }
286296 }
297+ test_end_step(3);
287298
288299 /* [2.3.4] Waiting for task termination then checking for errors.*/
289300 test_set_step(4);
@@ -292,6 +303,7 @@
292303 tid = 0;
293304 test_assert_sequence("", "queue write errors occurred");
294305 }
306+ test_end_step(4);
295307 }
296308
297309 static const testcase_t nasa_osal_test_002_003 = {
@@ -339,6 +351,7 @@
339351 err = OS_QueueGetIdByName(&local_qid, "test queue");
340352 test_assert(err == OS_SUCCESS, "queue not found");
341353 }
354+ test_end_step(1);
342355
343356 /* [2.4.2] Get operation with a one second timeout, an error is
344357 expected.*/
@@ -349,6 +362,7 @@
349362 err = OS_QueueGet(qid, data, MESSAGE_SIZE, &copied, OS_Milli2Ticks(1000));
350363 test_assert(err == OS_QUEUE_TIMEOUT, "unexpected error code");
351364 }
365+ test_end_step(2);
352366
353367 /* [2.4.3] Get operation in non-blocking mode, an error is
354368 expected.*/
@@ -359,6 +373,7 @@
359373 err = OS_QueueGet(qid, data, MESSAGE_SIZE, &copied, OS_CHECK);
360374 test_assert(err == OS_QUEUE_EMPTY, "unexpected error code");
361375 }
376+ test_end_step(3);
362377 }
363378
364379 static const testcase_t nasa_osal_test_002_004 = {
--- trunk/test/nasa_osal/source/test/nasa_osal_test_sequence_003.c (revision 14521)
+++ trunk/test/nasa_osal/source/test/nasa_osal_test_sequence_003.c (revision 14522)
@@ -87,6 +87,7 @@
8787 tmr_callback);
8888 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
8989 }
90+ test_end_step(1);
9091
9192 /* [3.1.2] OS_TimerCreate() is invoked with timer_name set to NULL,
9293 an error is expected.*/
@@ -102,6 +103,7 @@
102103 tmr_callback);
103104 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
104105 }
106+ test_end_step(2);
105107
106108 /* [3.1.3] OS_TimerCreate() is invoked with accuracy set to NULL, an
107109 error is expected.*/
@@ -116,6 +118,7 @@
116118 tmr_callback);
117119 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
118120 }
121+ test_end_step(3);
119122
120123 /* [3.1.4] OS_TimerCreate() is invoked with callback_ptr set to NULL,
121124 an error is expected.*/
@@ -131,6 +134,7 @@
131134 NULL); /* Error.*/
132135 test_assert(err == OS_TIMER_ERR_INVALID_ARGS, "NULL not detected");
133136 }
137+ test_end_step(4);
134138
135139 /* [3.1.5] OS_TimerCreate() is invoked with a very long timer name,
136140 an error is expected.*/
@@ -146,6 +150,7 @@
146150 tmr_callback);
147151 test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
148152 }
153+ test_end_step(5);
149154
150155 /* [3.1.6] OS_TimerDelete() is invoked with timer_id set to -1, an
151156 error is expected.*/
@@ -156,6 +161,7 @@
156161 err = OS_TimerDelete((uint32)-1);
157162 test_assert(err == OS_ERR_INVALID_ID, "wrong timer id not detected");
158163 }
164+ test_end_step(6);
159165
160166 /* [3.1.7] OS_TimerCreate() is invoked twice with duplicated name, an
161167 error is expected, then the queue is deleted using
@@ -175,6 +181,7 @@
175181 err = OS_TimerDelete(tmid1);
176182 test_assert(err == OS_SUCCESS, "timer deletion failed");
177183 }
184+ test_end_step(7);
178185 }
179186
180187 static const testcase_t nasa_osal_test_003_001 = {
@@ -207,6 +214,7 @@
207214 err = OS_TimerSet((uint32)-1, 10, 10);
208215 test_assert(err == OS_ERR_INVALID_ID, "invalid timer_id not detected");
209216 }
217+ test_end_step(1);
210218 }
211219
212220 static const testcase_t nasa_osal_test_003_002 = {
@@ -243,6 +251,7 @@
243251 err = OS_TimerGetIdByName(NULL, "timer");
244252 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
245253 }
254+ test_end_step(1);
246255
247256 /* [3.3.2] OS_TimerGetIdByName() is invoked with timer name set to
248257 NULL, an error is expected.*/
@@ -253,6 +262,7 @@
253262 err = OS_TimerGetIdByName(&tmid, NULL);
254263 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
255264 }
265+ test_end_step(2);
256266
257267 /* [3.3.3] OS_TimerGetIdByName() is invoked with a very long task
258268 name, an error is expected.*/
@@ -263,6 +273,7 @@
263273 err = OS_TimerGetIdByName(&tmid, "very very long timer name");
264274 test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
265275 }
276+ test_end_step(3);
266277 }
267278
268279 static const testcase_t nasa_osal_test_003_003 = {
@@ -310,6 +321,7 @@
310321 err = OS_TimerGetIdByName(&local_tmid, "test timer");
311322 test_assert(err == OS_SUCCESS, "timer not found");
312323 }
324+ test_end_step(1);
313325
314326 /* [3.4.2] Setting up the timer for a 70mS one-shot tick.*/
315327 test_set_step(2);
@@ -319,6 +331,7 @@
319331 err = OS_TimerSet(local_tmid, 70000, 0);
320332 test_assert(err == OS_SUCCESS, "timer setup failed");
321333 }
334+ test_end_step(2);
322335
323336 /* [3.4.3] Waiting one second then counting the occurred ticks.*/
324337 test_set_step(3);
@@ -326,6 +339,7 @@
326339 (void) OS_TaskDelay(1000);
327340 test_assert(cnt == 1, "wrong ticks");
328341 }
342+ test_end_step(3);
329343 }
330344
331345 static const testcase_t nasa_osal_test_003_004 = {
@@ -375,6 +389,7 @@
375389 err = OS_TimerGetIdByName(&local_tmid, "test timer");
376390 test_assert(err == OS_SUCCESS, "timer not found");
377391 }
392+ test_end_step(1);
378393
379394 /* [3.5.2] Setting up the timer for a 70mS periodic tick.*/
380395 test_set_step(2);
@@ -384,6 +399,7 @@
384399 err = OS_TimerSet(local_tmid, 70000, 70000);
385400 test_assert(err == OS_SUCCESS, "timer setup failed");
386401 }
402+ test_end_step(2);
387403
388404 /* [3.5.3] Waiting one second then counting the occurred ticks.*/
389405 test_set_step(3);
@@ -391,6 +407,7 @@
391407 (void) OS_TaskDelay(1000);
392408 test_assert(cnt == 14, "wrong ticks");
393409 }
410+ test_end_step(3);
394411
395412 /* [3.5.4] Stopping the timer.*/
396413 test_set_step(4);
@@ -400,6 +417,7 @@
400417 err = OS_TimerSet(local_tmid, 0, 0);
401418 test_assert(err == OS_SUCCESS, "timer stop failed");
402419 }
420+ test_end_step(4);
403421 }
404422
405423 static const testcase_t nasa_osal_test_003_005 = {
--- trunk/test/nasa_osal/source/test/nasa_osal_test_sequence_004.c (revision 14521)
+++ trunk/test/nasa_osal/source/test/nasa_osal_test_sequence_004.c (revision 14522)
@@ -76,6 +76,7 @@
7676 0);
7777 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
7878 }
79+ test_end_step(1);
7980
8081 /* [4.1.2] OS_BinSemCreate() is invoked with sem_name set to NULL, an
8182 error is expected.*/
@@ -89,6 +90,7 @@
8990 0);
9091 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
9192 }
93+ test_end_step(2);
9294
9395 /* [4.1.3] OS_BinSemCreate() is invoked with an invalid
9496 sem_initial_value, an error is expected.*/
@@ -102,6 +104,7 @@
102104 0);
103105 test_assert(err == OS_INVALID_INT_NUM, "counter error not detected");
104106 }
107+ test_end_step(3);
105108
106109 /* [4.1.4] OS_BinSemCreate() is invoked with a very long timer name,
107110 an error is expected.*/
@@ -117,6 +120,7 @@
117120 test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
118121 #endif
119122 }
123+ test_end_step(4);
120124
121125 /* [4.1.5] OS_BinSemDelete() is invoked with timer_id set to -1, an
122126 error is expected.*/
@@ -127,6 +131,7 @@
127131 err = OS_BinSemDelete((uint32)-1);
128132 test_assert(err == OS_ERR_INVALID_ID, "wrong semaphore id not detected");
129133 }
134+ test_end_step(5);
130135
131136 /* [4.1.6] OS_BinSemCreate() is invoked twice with duplicated name,
132137 an error is expected, then the queue is deleted using
@@ -147,6 +152,7 @@
147152 err = OS_BinSemDelete(bsid1);
148153 test_assert(err == OS_SUCCESS, "semaphore deletion failed");
149154 }
155+ test_end_step(6);
150156 }
151157
152158 static const testcase_t nasa_osal_test_004_001 = {
@@ -179,6 +185,7 @@
179185 err = OS_BinSemFlush((uint32)-1);
180186 test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
181187 }
188+ test_end_step(1);
182189 }
183190
184191 static const testcase_t nasa_osal_test_004_002 = {
@@ -211,6 +218,7 @@
211218 err = OS_BinSemGive((uint32)-1);
212219 test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
213220 }
221+ test_end_step(1);
214222 }
215223
216224 static const testcase_t nasa_osal_test_004_003 = {
@@ -243,6 +251,7 @@
243251 err = OS_BinSemTake((uint32)-1);
244252 test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
245253 }
254+ test_end_step(1);
246255 }
247256
248257 static const testcase_t nasa_osal_test_004_004 = {
@@ -288,6 +297,7 @@
288297 err = OS_BinSemTimedWait((uint32)-1, 1000);
289298 test_assert(err == OS_ERR_INVALID_ID, "invalid sem_id not detected");
290299 }
300+ test_end_step(1);
291301
292302 /* [4.5.2] OS_BinSemTimedWait() is invoked with msecs set to 0, an
293303 error is expected.*/
@@ -298,6 +308,7 @@
298308 err = OS_BinSemTimedWait(bsid, 0);
299309 test_assert(err == OS_INVALID_INT_NUM, "invalid msec not detected");
300310 }
311+ test_end_step(2);
301312 }
302313
303314 static const testcase_t nasa_osal_test_004_005 = {
@@ -334,6 +345,7 @@
334345 err = OS_BinSemGetIdByName(NULL, "semaphore");
335346 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
336347 }
348+ test_end_step(1);
337349
338350 /* [4.6.2] OS_BinSemGetIdByName() is invoked with semaphore name set
339351 to NULL, an error is expected.*/
@@ -344,6 +356,7 @@
344356 err = OS_BinSemGetIdByName(&bsid, NULL);
345357 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
346358 }
359+ test_end_step(2);
347360
348361 /* [4.6.3] OS_BinSemGetIdByName() is invoked with a very long task
349362 name, an error is expected.*/
@@ -354,6 +367,7 @@
354367 err = OS_BinSemGetIdByName(&bsid, "very very long semaphore name");
355368 test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
356369 }
370+ test_end_step(3);
357371 }
358372
359373 static const testcase_t nasa_osal_test_004_006 = {
@@ -397,6 +411,7 @@
397411 err = OS_BinSemTimedWait(bsid, 1000);
398412 test_assert(err == OS_SEM_TIMEOUT, "unexpected error code");
399413 }
414+ test_end_step(1);
400415 }
401416
402417 static const testcase_t nasa_osal_test_004_007 = {
--- trunk/test/nasa_osal/source/test/nasa_osal_test_sequence_005.c (revision 14521)
+++ trunk/test/nasa_osal/source/test/nasa_osal_test_sequence_005.c (revision 14522)
@@ -75,6 +75,7 @@
7575 0);
7676 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
7777 }
78+ test_end_step(1);
7879
7980 /* [5.1.2] OS_CountSemCreate() is invoked with sem_name set to NULL,
8081 an error is expected.*/
@@ -88,6 +89,7 @@
8889 0);
8990 test_assert(err == OS_INVALID_POINTER, "NULL not detected");
9091 }
92+ test_end_step(2);
9193
9294 /* [5.1.3] OS_CountSemCreate() is invoked with an invalid <