comparison src/cs/services/dar/tests/dar_test_regr.c @ 0:945cf7f506b2

src/cs: chipsetsw import from tcs211-fcmodem binary blobs and LCD demo files have been excluded, all line endings are LF only
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 22:50:11 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:945cf7f506b2
1 /********************************************************************************/
2 /* */
3 /* File Name: dar_test_regr.c */
4 /* */
5 /* Purpose: This file gathers non regression tests for DAR. */
6 /* */
7 /* Note: None. */
8 /* */
9 /* Version 0.1 */
10 /* */
11 /* Date Modification */
12 /* ---------------------------------------------------------------------------*/
13 /* 27 September 2001 Create */
14 /* */
15 /* Author Stephanie Gerthoux */
16 /* */
17 /* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved */
18 /********************************************************************************/
19
20 /********************************************************************************/
21 /* */
22 /* Include files used for Diaagnose riviera testing. */
23 /* */
24 /********************************************************************************/
25
26 #include "dar/tests/dar_test.h"
27 #include "rv/rv_defined_swe.h"
28
29 #ifdef RVM_DAR_SWE
30 #if (DAR_REGR == SW_COMPILED)
31
32 #include "rv/rv_general.h"
33 #include "rvm/rvm_use_id_list.h"
34 #include "rvm/rvm_gen.h"
35 #include "dar/tests/dar_test_regr.h"
36 #include "dar/dar_api.h"
37 #include "dar/dar_structs_i.h"
38 #include "dar/dar_messages_i.h"
39 #include "rvf/rvf_target.h"
40 #include "dar/dar_const_i.h"
41 #include "dar/dar_error_hdlr_i.h"
42 #include "dar/dar_macro_i.h"
43
44 /**** Global variables ****/
45 /* Define a pointer to the Global Environment Control block */
46 extern T_DAR_ENV_CTRL_BLK *dar_gbl_var_p;
47
48
49
50 /********************************************************************************/
51 /* */
52 /* Declare function prototype used for Riviera DAR testing. */
53 /* */
54 /********************************************************************************/
55 T_RV_REGR_RET dar_test_regr_return_verdict ( T_RV_REGR_ERR_TYPE error_type);
56
57
58 /* global variable to detect if the call back function was called */
59 INT8 dar_call_back_called = 1;
60
61 extern char dar_write_buffer[DAR_MAX_BUFFER_SIZE];
62
63 /********************************************************************************/
64 /* */
65 /* DAR CALLBACK FUNCTION */
66 /* */
67 /* Description: call back funtion used for the DAR test */
68 /* */
69 /* */
70 /********************************************************************************/
71 T_RV_RET dar_callback_test_function (T_DAR_BUFFER buffer_p)
72 {
73 rvf_free_buf((T_RVF_BUFFER *)buffer_p);
74 RV_TEST_TRACE_LOW ("DAR TEST REGR:DAR CALLBACK FUNCTION");
75 return(RV_OK);
76 }
77 /********************* End of dar_callback_function *****************************/
78
79 /********************************************************************************/
80 /* */
81 /* DAR STORE RECOVERY DATA FUNCTION */
82 /* */
83 /* Decription: Store data before a reset */
84 /* */
85 /* */
86 /********************************************************************************/
87 T_RV_RET dar_store_recovery_data(T_DAR_BUFFER buffer_p,UINT16 length)
88 {
89 UINT8 i=0;
90 for(i=0;i<length;i++)
91 {
92 buffer_p[i] = 9;
93 }
94 return(RV_OK);
95 }
96
97 /********************************************************************************/
98 /* */
99 /* DAR TEST REGISTER */
100 /* */
101 /* Decription: test register funtion used to save the return path */
102 /* */
103 /* */
104 /********************************************************************************/
105 T_RV_RET dar_test_register (T_RV_RETURN return_path)
106 {
107 if (return_path.callback_func == NULL)
108 {
109 dar_gbl_var_p->return_path.addr_id = return_path.addr_id;
110 dar_gbl_var_p->return_path.callback_func = NULL;
111 }
112 else
113 {
114 dar_gbl_var_p->return_path.callback_func = return_path.callback_func;
115 }
116 return(RV_OK);
117 }
118 /********************* End of dar_test_register ********************************/
119
120 /********************************************************************************/
121 /* */
122 /* DAR NON REGRESSION TEST 1 */
123 /* */
124 /* Decription: Test the dar filter function. */
125 /* Add a group */
126 /* */
127 /********************************************************************************/
128 T_RV_REGR_RET dar_regr_test_1 (T_RV_REGR_ERR_TYPE *error_type)
129 {
130 T_RVM_USE_ID filter_use_id;
131 T_RV_RETURN return_path;
132 UINT8 i;
133
134 /* initalize the return path, for this test the return path is a message */
135 return_path.callback_func = NULL;
136 return_path.addr_id = rvf_get_taskid();
137
138 /*----------------------------------------------------------------------------*/
139 /* start the dar filter */
140 /*----------------------------------------------------------------------------*/
141 /* fill the filter parameter */
142 filter_use_id = KPD_USE_ID;
143
144 /* start the dar filter - Add the group */
145 if (dar_diagnose_swe_filter(filter_use_id, DAR_DEBUG) != RV_OK)
146 {
147 *error_type = FUNCTION_ERROR;
148 return (dar_test_regr_return_verdict(*error_type));
149 }
150
151 /* wait 1s */
152 rvf_delay(RVF_MS_TO_TICKS(1000));
153
154 for (i=0; i<DAR_MAX_GROUP_NB; i++)
155 {
156 DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
157 DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
158 DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
159 }
160
161 rvf_delay(RVF_MS_TO_TICKS(3000));
162
163 return(TEST_PASSED);
164 }
165 /******************** End of dar_regr_test_1 function ***************************/
166
167 /********************************************************************************/
168 /* */
169 /* DAR NON REGRESSION TEST 2 */
170 /* */
171 /* Decription: Test the dar filter function. */
172 /* Search a group */
173 /* */
174 /********************************************************************************/
175 T_RV_REGR_RET dar_regr_test_2 (T_RV_REGR_ERR_TYPE *error_type)
176 {
177 T_RVM_USE_ID filter_use_id1;
178 T_RVM_USE_ID filter_use_id2;
179 T_RV_RETURN return_path;
180 UINT8 i;
181
182 /* initalize the return path, for this test the return path is a message */
183 return_path.callback_func = NULL;
184 return_path.addr_id = rvf_get_taskid();
185
186 /*----------------------------------------------------------------------------*/
187 /* start the dar filter */
188 /*----------------------------------------------------------------------------*/
189 /* fill the filter parameter use1 */
190 filter_use_id1 = KPD_USE_ID;
191
192 /* start the dar filter use1 */
193 if (dar_diagnose_swe_filter(filter_use_id1, DAR_WARNING) != RV_OK)
194 {
195 *error_type = FUNCTION_ERROR;
196 return (dar_test_regr_return_verdict(*error_type));
197 }
198
199 /* Wait 1s */
200 rvf_delay(RVF_MS_TO_TICKS(1000));
201
202 /*----------------------------------------------------------------------------*/
203 /* Add the dar filter 2 */
204 /*----------------------------------------------------------------------------*/
205 /* fill the filter parameter */
206 filter_use_id2 = RTC_USE_ID;
207
208 /* start the dar filter - Warning level*/
209 if (dar_diagnose_swe_filter(filter_use_id2, DAR_WARNING) != RV_OK)
210 {
211 *error_type = FUNCTION_ERROR;
212 return (dar_test_regr_return_verdict(*error_type));
213 }
214
215 /* Wait 1s */
216 rvf_delay(RVF_MS_TO_TICKS(1000));
217
218 for (i=0; i<DAR_MAX_GROUP_NB; i++)
219 {
220 DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
221 DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
222 DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
223 }
224
225 /* start the dar filter - Debug level*/
226 if (dar_diagnose_swe_filter(filter_use_id2, DAR_DEBUG) != RV_OK)
227 {
228 *error_type = FUNCTION_ERROR;
229 return (dar_test_regr_return_verdict(*error_type));
230 }
231
232 /* Wait 1s */
233 rvf_delay(RVF_MS_TO_TICKS(1000));
234
235 for (i=0; i<DAR_MAX_GROUP_NB; i++)
236 {
237 DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
238 DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
239 DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
240 }
241
242 return(TEST_PASSED);
243 }
244 /******************** End of dar_regr_test_2 function ***************************/
245
246 /********************************************************************************/
247 /* */
248 /* DAR NON REGRESSION TEST 3 */
249 /* */
250 /* Decription: Test the dar filter function. */
251 /* DELETE a group */
252 /* */
253 /********************************************************************************/
254 T_RV_REGR_RET dar_regr_test_3 (T_RV_REGR_ERR_TYPE *error_type)
255 {
256 T_RVM_USE_ID filter_use_id;
257 T_RV_RETURN return_path;
258 UINT8 i;
259
260 /* initalize the return path, for this test the return path is a message */
261 return_path.callback_func = NULL;
262 return_path.addr_id = rvf_get_taskid();
263
264 /*----------------------------------------------------------------------------*/
265 /* start the dar filter */
266 /*----------------------------------------------------------------------------*/
267 /* fill the filter parameter */
268 filter_use_id = KPD_USE_ID;
269
270 /* start the dar filter */
271 /* Add the Debug level (Add Debug + Warning level */
272 if (dar_diagnose_swe_filter(filter_use_id, DAR_DEBUG) != RV_OK)
273 {
274 *error_type = FUNCTION_ERROR;
275 return (dar_test_regr_return_verdict(*error_type));
276 }
277
278 /* Wait 1s*/
279 rvf_delay(RVF_MS_TO_TICKS(1000));
280
281 for (i=0; i<DAR_MAX_GROUP_NB; i++)
282 {
283 DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
284 DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
285 DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
286 }
287
288 /* Delete the Warning level */
289 /* It deletes the Warning and Debug Level */
290 if (dar_diagnose_swe_filter(filter_use_id, DAR_WARNING) != RV_OK)
291 {
292 *error_type = FUNCTION_ERROR;
293 return (dar_test_regr_return_verdict(*error_type));
294 }
295
296 /* Wait 1s */
297 rvf_delay(RVF_MS_TO_TICKS(1000));
298
299 for (i=0; i<DAR_MAX_GROUP_NB; i++)
300 {
301 DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
302 DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
303 DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
304 }
305
306 return(TEST_PASSED);
307 }
308 /******************** End of dar_regr_test_3 function ***************************/
309
310 /********************************************************************************/
311 /* */
312 /* DAR NON REGRESSION TEST 4 */
313 /* */
314 /* Decription: Test the dar filter function. */
315 /* add more than DAR max number group */
316 /* */
317 /********************************************************************************/
318 T_RV_REGR_RET dar_regr_test_4 (T_RV_REGR_ERR_TYPE *error_type)
319 {
320 T_RVM_USE_ID filter_use_id0;
321 T_RVM_USE_ID filter_use_id1;
322 T_RVM_USE_ID filter_use_id2;
323 T_RVM_USE_ID filter_use_id3;
324 T_RVM_USE_ID filter_use_id4;
325 T_RV_RETURN return_path;
326 UINT8 i;
327
328 /* initalize the return path, for this test the return path is a message */
329 return_path.callback_func = NULL;
330 return_path.addr_id = rvf_get_taskid();
331
332 /*----------------------------------------------------------------------------*/
333 /* start the dar filter */
334 /*----------------------------------------------------------------------------*/
335 /* fill the filter parameter */
336 filter_use_id0 = RVM_USE_ID;
337
338 filter_use_id1 = KPD_USE_ID;
339
340 filter_use_id2 = HCI_USE_ID;
341
342 filter_use_id3 = AUDIO_USE_ID;
343
344 filter_use_id4 = MKS_USE_ID;
345
346 /* start the dar filter */
347 if (dar_diagnose_swe_filter(filter_use_id0, DAR_WARNING) != RV_OK)
348 {
349 *error_type = FUNCTION_ERROR;
350 return (dar_test_regr_return_verdict(*error_type));
351 }
352 rvf_delay(RVF_MS_TO_TICKS(1000));
353
354 if (dar_diagnose_swe_filter(filter_use_id1, DAR_WARNING) != RV_OK)
355 {
356 *error_type = FUNCTION_ERROR;
357 return (dar_test_regr_return_verdict(*error_type));
358 }
359 rvf_delay(RVF_MS_TO_TICKS(1000));
360
361 if (dar_diagnose_swe_filter(filter_use_id2, DAR_WARNING) != RV_OK)
362 {
363 *error_type = FUNCTION_ERROR;
364 return (dar_test_regr_return_verdict(*error_type));
365 }
366 rvf_delay(RVF_MS_TO_TICKS(1000));
367
368 if (dar_diagnose_swe_filter(filter_use_id3, DAR_WARNING) != RV_OK)
369 {
370 *error_type = FUNCTION_ERROR;
371 return (dar_test_regr_return_verdict(*error_type));
372 }
373 rvf_delay(RVF_MS_TO_TICKS(1000));
374
375 if (dar_diagnose_swe_filter(filter_use_id4, DAR_WARNING) != RV_OK)
376 {
377 *error_type = FUNCTION_ERROR;
378 return (dar_test_regr_return_verdict(*error_type));
379 }
380 rvf_delay(RVF_MS_TO_TICKS(1000));
381
382 for (i=0; i<DAR_MAX_GROUP_NB; i++)
383 {
384 //DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
385 //DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
386 //DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
387 }
388
389 return(TEST_PASSED);
390 }
391 /******************** End of dar_regr_test_4 function ***************************/
392
393 /********************************************************************************/
394 /* */
395 /* DAR NON REGRESSION TEST 5 */
396 /* */
397 /* Decription: Test the dar write function. */
398 /* */
399 /********************************************************************************/
400 T_RV_REGR_RET dar_regr_test_5 (T_RV_REGR_ERR_TYPE *error_type)
401 {
402 T_RVM_USE_ID filter_use_id; /* Use ID */
403 T_RVM_USE_ID filter_use_id_2; /* Use ID */
404 T_RV_RETURN return_path;
405 UINT16 i;
406 T_DAR_INFO *buffer_p= "KPD test"; /* diagnose data to store */
407 T_DAR_INFO *buffer_2_p= "KPD +1 test"; /* diagnose data to store */
408 T_DAR_INFO *buffer_3_p= "Warning Audio without filter"; /* diagnose data to store */
409
410
411 /* initalize the return path, for this test the return path is a message */
412 return_path.callback_func = NULL;
413 return_path.addr_id = rvf_get_taskid();
414
415 /*----------------------------------------------------------------------------*/
416 /* start the dar filter */
417 /*----------------------------------------------------------------------------*/
418 /* fill the filter parameter use1 */
419 filter_use_id = KPD_USE_ID;
420 filter_use_id_2 = (KPD_USE_ID + 0x60);
421
422 /* start the dar filter */
423 if (dar_diagnose_swe_filter(filter_use_id, DAR_WARNING) != RV_OK)
424 {
425 *error_type = FUNCTION_ERROR;
426 return (dar_test_regr_return_verdict(*error_type));
427 }
428
429 /* start the dar filter */
430 if (dar_diagnose_swe_filter(filter_use_id_2, DAR_DEBUG) != RV_OK)
431 {
432 *error_type = FUNCTION_ERROR;
433 return (dar_test_regr_return_verdict(*error_type));
434 }
435
436 /* Wait 1s */
437 rvf_delay(RVF_MS_TO_TICKS(1000));
438
439 for (i=0; i<DAR_MAX_GROUP_NB; i++)
440 {
441 DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
442 DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
443 DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
444 }
445
446 /* start the dar diagnose write function */
447 for (i=0; i<1000; i++)
448 {
449 if ( dar_diagnose_write( buffer_p,
450 DAR_ASCII_FORMAT,
451 DAR_WARNING,
452 filter_use_id) != RV_OK)
453 {
454 *error_type = FUNCTION_ERROR;
455 return (dar_test_regr_return_verdict(*error_type));
456 }
457 }
458 rvf_delay(RVF_MS_TO_TICKS(1000));
459
460 /* start the dar diagnose write function */
461 if ( dar_diagnose_write( buffer_2_p,
462 DAR_ASCII_FORMAT,
463 DAR_WARNING,
464 filter_use_id_2) != RV_OK)
465 {
466 *error_type = FUNCTION_ERROR;
467 return (dar_test_regr_return_verdict(*error_type));
468 }
469
470 rvf_delay(RVF_MS_TO_TICKS(1000));
471
472 /* Audio warning without filtering */
473 rvf_send_trace (buffer_3_p,(sizeof("Warning Audio without filter")-1),NULL_PARAM,RV_TRACE_LEVEL_WARNING,AUDIO_USE_ID);
474
475 //for (i=0; i<DAR_MAX_BUFFER_SIZE; i++)
476 //{
477 // DAR_SEND_TRACE_PARAM("Diagnose write test",dar_write_buffer[i],RV_TRACE_LEVEL_DEBUG_HIGH);
478 //}
479
480 return(TEST_PASSED);
481 }
482 /******************** End of dar_regr_test_5 function ***************************/
483
484 /********************************************************************************/
485 /* */
486 /* DAR NON REGRESSION TEST 6 */
487 /* */
488 /* Decription: Test the dar write function with a bad mask level. */
489 /* */
490 /********************************************************************************/
491 T_RV_REGR_RET dar_regr_test_6 (T_RV_REGR_ERR_TYPE *error_type)
492 {
493 T_RVM_USE_ID filter_use_id; /* Use ID */
494 T_RV_RETURN return_path;
495 UINT8 i;
496 T_DAR_INFO *buffer_p= "Diagnose Test"; /* diagnose data to store */
497
498
499 /* initalize the return path, for this test the return path is a message */
500 return_path.callback_func = NULL;
501 return_path.addr_id = rvf_get_taskid();
502
503 /*----------------------------------------------------------------------------*/
504 /* start the dar filter */
505 /*----------------------------------------------------------------------------*/
506 /* fill the filter parameter use1 */
507 filter_use_id = AUDIO_USE_ID;
508
509 /* start the dar filter */
510 if (dar_diagnose_swe_filter(filter_use_id, DAR_DEBUG) != RV_OK)
511 {
512 *error_type = FUNCTION_ERROR;
513 return (dar_test_regr_return_verdict(*error_type));
514 }
515
516 /* Wait 1s */
517 rvf_delay(RVF_MS_TO_TICKS(1000));
518
519 for (i=0; i<DAR_MAX_GROUP_NB; i++)
520 {
521 //DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
522 //DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
523 //DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
524 }
525
526 /* start the dar diagnose write function */
527 if ( dar_diagnose_write( buffer_p,
528 DAR_ASCII_FORMAT,
529 DAR_DEBUG,
530 filter_use_id) != RV_OK)
531 {
532 *error_type = FUNCTION_ERROR;
533 return (dar_test_regr_return_verdict(*error_type));
534 }
535
536 rvf_delay(RVF_MS_TO_TICKS(1000));
537
538 //for (i=0; i<DAR_MAX_BUFFER_SIZE; i++)
539 //{
540 //DAR_SEND_TRACE_PARAM("Diagnose write test",dar_write_buffer[i],RV_TRACE_LEVEL_DEBUG_HIGH);
541 //}
542
543 return(TEST_PASSED);
544 }
545 /******************** End of dar_regr_test_6 function ***************************/
546
547
548 /***********************************************************************************/
549 /* */
550 /* DAR NON REGRESSION TEST 7 */
551 /* */
552 /* Decription: Test the dar write function. */
553 /* Write more data than DAR Buffer max size in order to test the */
554 /* circular buffer. */
555 /* */
556 /***********************************************************************************/
557 T_RV_REGR_RET dar_regr_test_7 (T_RV_REGR_ERR_TYPE *error_type)
558 {
559 T_RVM_USE_ID filter_use_id; /* Use ID */
560 T_RV_RETURN return_path;
561 UINT8 i;
562 /* diagnose data to store */
563 T_DAR_INFO *buffer_p= "DAR circular buffer tested ";
564
565 /* initalize the return path, for this test the return path is a message */
566 return_path.callback_func = NULL;
567 return_path.addr_id = rvf_get_taskid();
568
569 /*----------------------------------------------------------------------------*/
570 /* start the dar filter */
571 /*----------------------------------------------------------------------------*/
572 /* fill the filter parameter use1 */
573 filter_use_id = AUDIO_USE_ID;
574
575 /* start the dar filter */
576 if (dar_diagnose_swe_filter(filter_use_id, DAR_WARNING) != RV_OK)
577 {
578 *error_type = FUNCTION_ERROR;
579 return (dar_test_regr_return_verdict(*error_type));
580 }
581
582 rvf_delay(RVF_MS_TO_TICKS(1000));
583
584 /* start the dar diagnose write function */
585 if ( dar_diagnose_write( buffer_p,
586 DAR_ASCII_FORMAT,
587 DAR_WARNING,
588 filter_use_id) != RV_OK)
589 {
590 *error_type = FUNCTION_ERROR;
591 return (dar_test_regr_return_verdict(*error_type));
592 }
593
594 /* Wait 1s */
595 rvf_delay(RVF_MS_TO_TICKS(1000));
596
597 //for (i=0; i<DAR_MAX_BUFFER_SIZE; i++)
598 // {
599 //DAR_SEND_TRACE_PARAM("Diagnose write test",dar_write_buffer[i],RV_TRACE_LEVEL_DEBUG_HIGH);
600 //}
601
602 return(TEST_PASSED);
603 }
604 /******************** End of dar_regr_test_7 function ***************************/
605
606 /********************************************************************************/
607 /* */
608 /* DAR NON REGRESSION TEST 8 */
609 /* */
610 /* Decription: Test the dar write function. */
611 /* Store 2 string */
612 /* */
613 /********************************************************************************/
614 T_RV_REGR_RET dar_regr_test_8 (T_RV_REGR_ERR_TYPE *error_type)
615 {
616 T_RVM_USE_ID filter_use_id1; /* Use ID1 */
617 T_RVM_USE_ID filter_use_id2; /* Use ID2 */
618 T_RV_RETURN return_path;
619 UINT8 i;
620 T_DAR_INFO *buffer_p_1= "Diagnose test"; /* diagnose data to store */
621 T_DAR_INFO *buffer_p_2= "DAR"; /* diagnose data to store */
622
623
624
625 /* initalize the return path, for this test the return path is a message */
626 return_path.callback_func = NULL;
627 return_path.addr_id = rvf_get_taskid();
628
629 /*------------------------------------------------------------------------------*/
630 /* start the dar filter 1 */
631 /*------------------------------------------------------------------------------*/
632 /* fill the filter parameter use1 */
633 filter_use_id1= AUDIO_USE_ID;
634
635 /* start the dar filter */
636 if (dar_diagnose_swe_filter(filter_use_id1, DAR_WARNING) != RV_OK)
637 {
638 *error_type = FUNCTION_ERROR;
639 return (dar_test_regr_return_verdict(*error_type));
640 }
641
642 /*------------------------------------------------------------------------------*/
643 /* start the dar filter 2 */
644 /*------------------------------------------------------------------------------*/
645 /* fill the filter parameter use2 */
646 filter_use_id2 = KPD_USE_ID;
647
648 /* start the dar filter */
649 if (dar_diagnose_swe_filter(filter_use_id2, DAR_DEBUG) != RV_OK)
650 {
651 *error_type = FUNCTION_ERROR;
652 return (dar_test_regr_return_verdict(*error_type));
653 }
654
655 /* Wait 1s */
656 rvf_delay(RVF_MS_TO_TICKS(1000));
657
658 for (i=0; i<DAR_MAX_GROUP_NB; i++)
659 {
660 //DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
661 //DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
662 //DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
663 }
664
665 /*------------------------------------------------------------------------------*/
666 /* start the dar diagnose write */
667 /*------------------------------------------------------------------------------*/
668
669 /* start the dar_filter_1 diagnose write function */
670 if ( dar_diagnose_write( buffer_p_1,
671 DAR_ASCII_FORMAT,
672 DAR_WARNING,
673 filter_use_id1) != RV_OK)
674 {
675 *error_type = FUNCTION_ERROR;
676 return (dar_test_regr_return_verdict(*error_type));
677 }
678
679 /* start the dar_filter_2 diagnose write function */
680 if ( dar_diagnose_write( buffer_p_2,
681 DAR_ASCII_FORMAT,
682 DAR_DEBUG,
683 filter_use_id2) != RV_OK)
684 {
685 *error_type = FUNCTION_ERROR;
686 return (dar_test_regr_return_verdict(*error_type));
687 }
688
689 rvf_delay(RVF_MS_TO_TICKS(1000));
690
691 // for (i=0; i<DAR_MAX_BUFFER_SIZE; i++)
692 //{
693 //DAR_SEND_TRACE_PARAM("Diagnose write test",dar_write_buffer[i],RV_TRACE_LEVEL_DEBUG_HIGH);
694 //}
695
696 return(TEST_PASSED);
697 }
698 /******************** End of dar_regr_test_8 function ***************************/
699
700 /********************************************************************************/
701 /* */
702 /* DAR NON REGRESSION TEST 9 */
703 /* */
704 /* Decription: Test the dar write function. */
705 /* Test the DAR_NO_DIAGNOSE message */
706 /* */
707 /********************************************************************************/
708 T_RV_REGR_RET dar_regr_test_9 (T_RV_REGR_ERR_TYPE *error_type)
709 {
710 T_RVM_USE_ID filter_use_id1; /* Use ID1 */
711 T_RV_RETURN return_path;
712 UINT8 i;
713 T_DAR_INFO *buffer_p_1= "Diagnose test"; /* diagnose data to store */
714
715 /* initalize the return path, for this test the return path is a message */
716 return_path.callback_func = NULL;
717 return_path.addr_id = rvf_get_taskid();
718
719 /*------------------------------------------------------------------------------*/
720 /* start the dar filter 1 */
721 /*------------------------------------------------------------------------------*/
722 /* fill the filter parameter use1 */
723 filter_use_id1= AUDIO_USE_ID;
724
725 /* start the dar filter with debiug level */
726 if (dar_diagnose_swe_filter(filter_use_id1, DAR_DEBUG) != RV_OK)
727 {
728 *error_type = FUNCTION_ERROR;
729 return (dar_test_regr_return_verdict(*error_type));
730 }
731
732 /* Wait 1s */
733 rvf_delay(RVF_MS_TO_TICKS(1000));
734
735 /*------------------------------------------------------------------------------*/
736 /* start the dar diagnose write */
737 /*------------------------------------------------------------------------------*/
738
739 /* start the dar_filter_1 diagnose write function wih debug level */
740 if ( dar_diagnose_write( buffer_p_1,
741 DAR_ASCII_FORMAT,
742 DAR_DEBUG,
743 filter_use_id1) != RV_OK)
744 {
745 *error_type = FUNCTION_ERROR;
746 return (dar_test_regr_return_verdict(*error_type));
747 }
748
749 /* wait 1s */
750 rvf_delay(RVF_MS_TO_TICKS(1000));
751
752 //for (i=0; i<DAR_MAX_BUFFER_SIZE; i++)
753 //{
754 //DAR_SEND_TRACE_PARAM("Diagnose write test",dar_write_buffer[i],RV_TRACE_LEVEL_DEBUG_HIGH);
755 //}
756
757 /*------------------------------------------------------------------------------*/
758 /* start the dar filter 1 */
759 /*------------------------------------------------------------------------------*/
760 /* fill the filter parameter use1 */
761 filter_use_id1 = AUDIO_USE_ID;
762
763 /* start the dar filter with no_diagnose level*/
764 if (dar_diagnose_swe_filter(filter_use_id1, DAR_NO_DIAGNOSE) != RV_OK)
765 {
766 *error_type = FUNCTION_ERROR;
767 return (dar_test_regr_return_verdict(*error_type));
768 }
769
770 /* Wait 1s */
771 rvf_delay(RVF_MS_TO_TICKS(1000));
772
773 for (i=0; i<DAR_MAX_GROUP_NB; i++)
774 {
775 //DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
776 //DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
777 //DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
778 }
779
780 /* start the dar_filter_1 diagnose write function with debug level */
781 /* The dar filter has been started with no_diagnose_level. So an error must be occured*/
782 if ( dar_diagnose_write( buffer_p_1,
783 DAR_ASCII_FORMAT,
784 DAR_DEBUG,
785 filter_use_id1) != RV_OK)
786 {
787 *error_type = FUNCTION_ERROR;
788 return (dar_test_regr_return_verdict(*error_type));
789 }
790
791 rvf_delay(RVF_MS_TO_TICKS(1000));
792
793 //for (i=0; i<DAR_MAX_BUFFER_SIZE; i++)
794 //{
795 //DAR_SEND_TRACE_PARAM("Diagnose write test",dar_write_buffer[i],RV_TRACE_LEVEL_DEBUG_HIGH);
796 //}
797
798 /* Wait 1s */
799 rvf_delay(RVF_MS_TO_TICKS(1000));
800
801 for (i=0; i<DAR_MAX_GROUP_NB; i++)
802 {
803 //DAR_SEND_TRACE_PARAM("filter_array group test",dar_gbl_var_p ->dar_filter_array[i].group_nb,RV_TRACE_LEVEL_DEBUG_HIGH);
804 //DAR_SEND_TRACE_PARAM("filter_array warning test",dar_gbl_var_p ->dar_filter_array[i].mask_warning,RV_TRACE_LEVEL_DEBUG_HIGH);
805 //DAR_SEND_TRACE_PARAM("filter_array debug test",dar_gbl_var_p ->dar_filter_array[i].mask_debug,RV_TRACE_LEVEL_DEBUG_HIGH);
806 }
807
808 /* start the dar_filter_1 diagnose write function with warning level*/
809 /* The dar filter has been started with no_diagnose_level. So an error must be occured*/
810 if ( dar_diagnose_write( buffer_p_1,
811 DAR_ASCII_FORMAT,
812 DAR_WARNING,
813 filter_use_id1) != RV_OK)
814 {
815 *error_type = FUNCTION_ERROR;
816 return (dar_test_regr_return_verdict(*error_type));
817 }
818
819 rvf_delay(RVF_MS_TO_TICKS(1000));
820
821 //for (i=0; i<DAR_MAX_BUFFER_SIZE; i++)
822 //{
823 //DAR_SEND_TRACE_PARAM("Diagnose write test",dar_write_buffer[i],RV_TRACE_LEVEL_DEBUG_HIGH);
824 //}
825
826 return(TEST_PASSED);
827 }
828 /******************** End of dar_regr_test_9 function ***************************/
829
830 /********************************************************************************/
831 /* */
832 /* DAR NON REGRESSION TEST 10 */
833 /* */
834 /* Decription: Test the dar emergency function. */
835 /* */
836 /********************************************************************************/
837 T_RV_REGR_RET dar_regr_test_10 (T_RV_REGR_ERR_TYPE *error_type)
838 {
839 T_RVM_USE_ID filter_use_id; /* Use ID */
840 T_RV_RETURN return_path;
841 UINT8 i;
842 T_DAR_INFO *buffer_p= "DAR emergency"; /* diagnose data to store */
843
844
845 /* initalize the return path, for this test the return path is a message */
846 return_path.callback_func = NULL;
847 return_path.addr_id = rvf_get_taskid();
848
849 /* call the dar recovery config */
850 dar_recovery_config(dar_store_recovery_data);
851
852 /*----------------------------------------------------------------------------*/
853 /* start the dar emergency */
854 /*----------------------------------------------------------------------------*/
855 /* fill the filter parameter use1 */
856 filter_use_id= AUDIO_USE_ID;
857
858 DAR_SEND_TRACE("The system will be reset",RV_TRACE_LEVEL_DEBUG_HIGH);
859 rvf_delay(RVF_MS_TO_TICKS(1000));
860
861 /* start the dar diagnose write function */
862 if ( dar_diagnose_generate_emergency( buffer_p,
863 DAR_ASCII_FORMAT,
864 filter_use_id) != RV_OK)
865 {
866 *error_type = FUNCTION_ERROR;
867 return (dar_test_regr_return_verdict(*error_type));
868 }
869
870 rvf_delay(RVF_MS_TO_TICKS(1000));
871
872 //for (i=0; i<DAR_MAX_BUFFER_SIZE; i++)
873 //{
874 //DAR_SEND_TRACE_PARAM("Diagnose emergency test",(UINT8)dar_write_buffer[i],RV_TRACE_LEVEL_DEBUG_HIGH);
875 //}
876
877 return(TEST_PASSED);
878 }
879 /******************** End of dar_regr_test_10 function ***************************/
880
881
882 /********************************************************************************/
883 /* */
884 /* DAR NON REGRESSION TEST 11 */
885 /* */
886 /* Decription: Test the dar_reccovery_get_status after a power ON/OFF */
887 /* */
888 /********************************************************************************/
889 T_RV_REGR_RET dar_regr_test_11 (T_RV_REGR_ERR_TYPE *error_type)
890 {
891 T_DAR_RECOVERY_STATUS status=0;
892
893 /* call the dar recovery config */
894 dar_recovery_config(dar_store_recovery_data);
895
896 /*------------------------------------------------------------------------------*/
897 /* start the dar_recovery_get_status */
898 /*------------------------------------------------------------------------------*/
899
900 /* Get the status */
901 if (dar_recovery_get_status(&status)!= RV_OK)
902 {
903 *error_type = FUNCTION_ERROR;
904 return (dar_test_regr_return_verdict(*error_type));
905 }
906
907 return(TEST_PASSED);
908 }
909 /******************** End of dar_regr_test_11 function ***************************/
910
911 /********************************************************************************/
912 /* */
913 /* DAR NON REGRESSION TEST 12 */
914 /* */
915 /* Decription: Test the dar_reset_system */
916 /* */
917 /********************************************************************************/
918 T_RV_REGR_RET dar_regr_test_12 (T_RV_REGR_ERR_TYPE *error_type)
919 {
920 /* call the dar recovery config */
921 dar_recovery_config(dar_store_recovery_data);
922
923 DAR_SEND_TRACE("The system will be reset",RV_TRACE_LEVEL_DEBUG_HIGH);
924 rvf_delay(RVF_MS_TO_TICKS(1000));
925
926 /*---------------------------------------------------------------------------*/
927 /* start the dar_reset_system */
928 /*---------------------------------------------------------------------------*/
929 if (dar_reset_system()!= RV_OK)
930 {
931 *error_type = FUNCTION_ERROR;
932 return (dar_test_regr_return_verdict(*error_type));
933 }
934 return(TEST_PASSED);
935 }
936 /******************** End of dar_regr_test_12 function ***************************/
937
938 /********************************************************************************/
939 /* */
940 /* DAR NON REGRESSION TEST 13 */
941 /* */
942 /* Decription: Test the Dar_diagnose_generate_emergency. */
943 /* */
944 /********************************************************************************/
945 T_RV_REGR_RET dar_regr_test_13 (T_RV_REGR_ERR_TYPE *error_type)
946 {
947 T_RVM_USE_ID filter_use_id; /* Use ID */
948 T_DAR_INFO *buffer_p= "DAR EMERGENCY "; /* diagnose data to store */
949
950 /* call the dar recovery config */
951 dar_recovery_config(dar_store_recovery_data);
952
953 /*----------------------------------------------------------------------------*/
954 /* start the dar emergency */
955 /*----------------------------------------------------------------------------*/
956 /* fill the filter parameter use1 */
957 filter_use_id = AUDIO_USE_ID;
958
959 DAR_SEND_TRACE("The system will be reset",RV_TRACE_LEVEL_DEBUG_HIGH);
960 rvf_delay(RVF_MS_TO_TICKS(1000));
961
962
963 /* Generate an emergency */
964 if (dar_diagnose_generate_emergency(buffer_p,DAR_ASCII_FORMAT, filter_use_id)!= RV_OK)
965 {
966 *error_type = FUNCTION_ERROR;
967 return (dar_test_regr_return_verdict(*error_type));
968 }
969
970 return(TEST_PASSED);
971 }
972 /******************** End of dar_regr_test_13 function ***************************/
973
974 /********************************************************************************/
975 /* */
976 /* DAR NON REGRESSION TEST 14 */
977 /* */
978 /* Decription: Test the dar_start_watchdog_timer. */
979 /* */
980 /********************************************************************************/
981 T_RV_REGR_RET dar_regr_test_14 (T_RV_REGR_ERR_TYPE *error_type)
982 {
983 UINT16 timer = 3000; /* 3000 millisecondes before the timer expires */
984
985 /* call the dar recovery config */
986 dar_recovery_config(dar_store_recovery_data);
987
988 /*----------------------------------------------------------------------------*/
989 /* start the dar_start_watchdog_timer */
990 /*----------------------------------------------------------------------------*/
991
992 if (dar_start_watchdog_timer(timer)!= RV_OK)
993 {
994 *error_type = FUNCTION_ERROR;
995 return (dar_test_regr_return_verdict(*error_type));
996 }
997
998 return(TEST_PASSED);
999 }
1000 /******************** End of dar_regr_test_14 function **************************/
1001
1002 /********************************************************************************/
1003 /* */
1004 /* DAR NON REGRESSION TEST 15 */
1005 /* */
1006 /* Decription: Test the dar_reload_watchdog_timer. */
1007 /* */
1008 /********************************************************************************/
1009 T_RV_REGR_RET dar_regr_test_15 (T_RV_REGR_ERR_TYPE *error_type)
1010 {
1011 UINT16 timer = 3000; /* 3000 millisecondes before the timer expires */
1012
1013 /* call the dar recovery config */
1014 dar_recovery_config(dar_store_recovery_data);
1015
1016 /*----------------------------------------------------------------------------*/
1017 /* start the dar_start_watchdog_timer */
1018 /*----------------------------------------------------------------------------*/
1019
1020 if (dar_start_watchdog_timer(timer)!= RV_OK)
1021 {
1022 *error_type = FUNCTION_ERROR;
1023 return (dar_test_regr_return_verdict(*error_type));
1024 }
1025
1026 /*----------------------------------------------------------------------------*/
1027 /* start the dar_reload_watchdog_timer */
1028 /*----------------------------------------------------------------------------*/
1029 /* wait 1 s*/
1030 rvf_delay(RVF_MS_TO_TICKS(1000));
1031
1032 /* reload the Watchdog timer */
1033 if (dar_reload_watchdog_timer()!= RV_OK)
1034 {
1035 *error_type = FUNCTION_ERROR;
1036 return (dar_test_regr_return_verdict(*error_type));
1037 }
1038
1039 /* wait 1 s*/
1040 rvf_delay(RVF_MS_TO_TICKS(1000));
1041
1042 /* reload the Watchdog timer */
1043 if (dar_reload_watchdog_timer()!= RV_OK)
1044 {
1045 *error_type = FUNCTION_ERROR;
1046 return (dar_test_regr_return_verdict(*error_type));
1047 }
1048
1049 /* wait 1 s*/
1050 rvf_delay(RVF_MS_TO_TICKS(1000));
1051
1052 DAR_SEND_TRACE("The system will be reset",RV_TRACE_LEVEL_DEBUG_HIGH);
1053 rvf_delay(RVF_MS_TO_TICKS(1000));
1054
1055 /* reload the Watchdog timer */
1056 if (dar_reload_watchdog_timer()!= RV_OK)
1057 {
1058 *error_type = FUNCTION_ERROR;
1059 return (dar_test_regr_return_verdict(*error_type));
1060 }
1061
1062 return(TEST_PASSED);
1063 }
1064 /******************** End of dar_regr_test_15 function ***************************/
1065
1066 /********************************************************************************/
1067 /* */
1068 /* DAR NON REGRESSION TEST 16 */
1069 /* */
1070 /* Decription: Test the dar_start_watchdog_timer and then generate an infinite */
1071 /* loop */
1072 /* */
1073 /********************************************************************************/
1074 T_RV_REGR_RET dar_regr_test_16 (T_RV_REGR_ERR_TYPE *error_type)
1075 {
1076 UINT16 timer = 3000; /* 3000 millisecondes before the timer expires */
1077
1078 /* call the dar recovery config */
1079 dar_recovery_config(dar_store_recovery_data);
1080
1081 /*----------------------------------------------------------------------------*/
1082 /* start the dar_start_watchdog_timer */
1083 /*----------------------------------------------------------------------------*/
1084
1085 if (dar_start_watchdog_timer(timer)!= RV_OK)
1086 {
1087 *error_type = FUNCTION_ERROR;
1088 return (dar_test_regr_return_verdict(*error_type));
1089 }
1090
1091 /* Wait 1s */
1092 rvf_delay(RVF_MS_TO_TICKS(1000));
1093
1094 DAR_SEND_TRACE("The system will be reset",RV_TRACE_LEVEL_DEBUG_HIGH);
1095 rvf_delay(RVF_MS_TO_TICKS(1000));
1096
1097 /* Generate an infinite loop */
1098 #ifndef _WINDOWS
1099 while (1)
1100 {
1101 }
1102 #endif
1103
1104 return(TEST_PASSED);
1105 }
1106 /******************** End of dar_regr_test_16 function ***************************/
1107
1108 /********************************************************************************/
1109 /* */
1110 /* DAR NON REGRESSION TEST 17 */
1111 /* */
1112 /* Decription: Test the dar_start_watchdog_timer, Stop it and generate a */
1113 /* voluntary reset */
1114 /* */
1115 /********************************************************************************/
1116 T_RV_REGR_RET dar_regr_test_17 (T_RV_REGR_ERR_TYPE *error_type)
1117 {
1118 UINT8 timer = 3; /* 3 secondes before the timer expires */
1119
1120 DAR_SEND_TRACE("The system will be reset",RV_TRACE_LEVEL_DEBUG_HIGH);
1121 rvf_delay(RVF_MS_TO_TICKS(1000));
1122
1123 /* call the dar recovery config */
1124 dar_recovery_config(dar_store_recovery_data);
1125
1126 /*---------------------------------------------------------------------------*/
1127 /* start the dar_start_watchdog_timer */
1128 /*---------------------------------------------------------------------------*/
1129
1130 if (dar_start_watchdog_timer(timer)!= RV_OK)
1131 {
1132 *error_type = FUNCTION_ERROR;
1133 return (dar_test_regr_return_verdict(*error_type));
1134 }
1135
1136 /* Wait 1s */
1137 rvf_delay(RVF_MS_TO_TICKS(1000));
1138
1139
1140 /*----------------------------------------------------------------------------*/
1141 /* stop the watchdog timer */
1142 /*----------------------------------------------------------------------------*/
1143 if (dar_stop_watchdog_timer()!= RV_OK)
1144 {
1145 *error_type = FUNCTION_ERROR;
1146 return (dar_test_regr_return_verdict(*error_type));
1147 }
1148
1149 DAR_SEND_TRACE("The system will be reset",RV_TRACE_LEVEL_DEBUG_HIGH);
1150 rvf_delay(RVF_MS_TO_TICKS(1000));
1151
1152 /*----------------------------------------------------------------------------*/
1153 /* start the dar_reset_system */
1154 /*----------------------------------------------------------------------------*/
1155 if (dar_reset_system()!= RV_OK)
1156 {
1157 *error_type = FUNCTION_ERROR;
1158 return (dar_test_regr_return_verdict(*error_type));
1159 }
1160
1161 return(TEST_PASSED);
1162 }
1163 /******************** End of dar_regr_test_17 function ***************************/
1164
1165 /********************************************************************************/
1166 /* */
1167 /* DAR NON REGRESSION TEST 18 */
1168 /* */
1169 /* Decription: Test the exceptions */
1170 /* Jump to an unknow address in order to generate an exception */
1171 /* */
1172 /********************************************************************************/
1173 T_RV_REGR_RET dar_regr_test_18 (T_RV_REGR_ERR_TYPE *error_type)
1174 {
1175 /*---------------------------------------------------------------------------*/
1176 /*jump to an unreferenced address in order to crash the board */
1177 /*---------------------------------------------------------------------------*/
1178
1179 /* Jump to address 3000000 where nothing is defined */
1180 /* an exception must be generated */
1181 #ifndef _WINDOWS
1182 /* Variable declaration */
1183 void (*jump_address)() = (void (*)()) ((unsigned)0x2000000);
1184
1185 rvf_delay(RVF_MS_TO_TICKS(2000));
1186
1187 /* call the dar recovery config */
1188 if (dar_recovery_config(dar_store_recovery_data)!= RV_OK)
1189 {
1190 *error_type = FUNCTION_ERROR;
1191 return (dar_test_regr_return_verdict(*error_type));
1192 }
1193
1194 (*jump_address)();
1195 #endif
1196
1197 return(TEST_PASSED);
1198 }
1199 /******************** End of dar_regr_test_18 function ***************************/
1200
1201 /********************************************************************************/
1202 /* */
1203 /* DAR NON REGRESSION TEST 19 */
1204 /* */
1205 /* Decription: Test the exceptions */
1206 /* Jump to an address that contains variables in order */
1207 /* to generate an exception */
1208 /* */
1209 /********************************************************************************/
1210 T_RV_REGR_RET dar_regr_test_19 (T_RV_REGR_ERR_TYPE *error_type)
1211 {
1212 /*--------------------------------------------------------------------------*/
1213 /*jump to an unreferenced address in order to crash the board */
1214 /*--------------------------------------------------------------------------*/
1215
1216 /* Jump to address 1000000 which contains variables */
1217 /* an exception must be generated */
1218 #ifndef _WINDOWS
1219 /* Variable declaration */
1220 void (*jump_address)() = (void (*)()) ((unsigned)0x1000000);
1221
1222 /* call the dar recovery config */
1223 if (dar_recovery_config(dar_store_recovery_data)!= RV_OK)
1224 {
1225 *error_type = FUNCTION_ERROR;
1226 return (dar_test_regr_return_verdict(*error_type));
1227 }
1228
1229 (*jump_address)();
1230 #endif
1231
1232 return(TEST_PASSED);
1233 }
1234 /******************** End of dar_regr_test_19 function **************************/
1235
1236 /********************************************************************************/
1237 /* */
1238 /* DAR NON REGRESSION TEST 20 */
1239 /* */
1240 /* Description: Give the status and the recovery data */
1241 /* */
1242 /********************************************************************************/
1243 T_RV_REGR_RET dar_regr_test_20 (T_RV_REGR_ERR_TYPE *error_type)
1244 {
1245 /* Declare local variables */
1246 T_DAR_RECOVERY_STATUS status = 0;
1247 T_DAR_BUFFER buffer_p = NULL;
1248 UINT8 i = 0;
1249 T_RVF_MB_STATUS mb_status = RVF_GREEN;
1250
1251 /* allocate the memory for the buffer_p */
1252 mb_status =rvf_get_buf (dar_gbl_var_p->mb_dar,
1253 DAR_RECOVERY_DATA_MAX_BUFFER_SIZE,
1254 (T_RVF_BUFFER **) (&buffer_p));
1255
1256 /* If insufficient resources, then report a memory error and abort. */
1257 if (mb_status == RVF_YELLOW)
1258 {
1259 /* deallocate the memory */
1260 rvf_free_buf((T_RVF_BUFFER *)buffer_p);
1261 dar_error_trace(DAR_ENTITY_NO_MEMORY);
1262 return (RV_NOT_SUPPORTED);
1263 }
1264 else
1265 if (mb_status == RVF_RED)
1266 {
1267 dar_error_trace(DAR_ENTITY_NO_MEMORY);
1268 return (RV_MEMORY_ERR);
1269 }
1270
1271 /*----------------------------------------------------------------------------*/
1272 /* start the dar_recovery_get_status */
1273 /*----------------------------------------------------------------------------*/
1274
1275 /* Get the status */
1276 if (dar_recovery_get_status(&status)!= RV_OK)
1277 {
1278 *error_type = FUNCTION_ERROR;
1279 return (dar_test_regr_return_verdict(*error_type));
1280 }
1281
1282 /*----------------------------------------------------------------------------*/
1283 /* start the dar_get_recovery_data */
1284 /*----------------------------------------------------------------------------*/
1285
1286 /* Retrieve data that have been stored in the buffer_p just before reset*/
1287 if ( dar_get_recovery_data(buffer_p,DAR_RECOVERY_DATA_MAX_BUFFER_SIZE)!= RV_OK)
1288 {
1289 *error_type = FUNCTION_ERROR;
1290 return (dar_test_regr_return_verdict(*error_type));
1291 }
1292
1293 /* Trace the buffer - used for Debug */
1294 //for (i=0;i<DAR_RECOVERY_DATA_MAX_BUFFER_SIZE;i++)
1295 //{
1296 //DAR_SEND_TRACE_PARAM("Dar recovery buffer before reset",buffer_p[i],RV_TRACE_LEVEL_DEBUG_HIGH);
1297 //}
1298
1299 /* free the Header of the message */
1300 rvf_free_buf((T_RVF_BUFFER *)buffer_p);
1301
1302 return(TEST_PASSED);
1303 }
1304 /******************** End of dar_regr_test_20 function **************************/
1305
1306 /********************************************************************************/
1307 /* */
1308 /* DAR NON REGRESSION TEST 21 */
1309 /* */
1310 /* Decription: Test the branch to 0, if the callback is NULL */
1311 /* */
1312 /********************************************************************************/
1313 T_RV_REGR_RET dar_regr_test_21 (T_RV_REGR_ERR_TYPE *error_type)
1314 {
1315 T_DAR_RECOVERY_STATUS status=0;
1316
1317 /* call the dar recovery config */
1318 dar_recovery_config(NULL);
1319
1320 /*----------------------------------------------------------------------------*/
1321 /* start the dar_recovery_get_status */
1322 /*----------------------------------------------------------------------------*/
1323 DAR_SEND_TRACE("The system will be reset",RV_TRACE_LEVEL_DEBUG_HIGH);
1324 rvf_delay(RVF_MS_TO_TICKS(1000));
1325
1326 /* Get the status */
1327 if (dar_recovery_get_status(&status)!= RV_OK)
1328 {
1329 *error_type = FUNCTION_ERROR;
1330 return (dar_test_regr_return_verdict(*error_type));
1331 }
1332
1333 return(TEST_PASSED);
1334 }
1335 /******************** End of dar_regr_test_21 function **************************/
1336
1337 /********************************************************************************/
1338 /* */
1339 /* DAR NON REGRESSION TEST 22 */
1340 /* */
1341 /* Decription: Redirect trace(Warning/Debug) to DAR */
1342 /* */
1343 /********************************************************************************/
1344 T_RV_REGR_RET dar_regr_test_22 (T_RV_REGR_ERR_TYPE *error_type)
1345 {
1346 T_RVM_USE_ID filter_use_id_1;
1347 T_RVM_USE_ID filter_use_id_2;
1348 T_RV_RETURN return_path;
1349
1350 /* initalize the return path, for this test the return path is a message */
1351 return_path.callback_func = NULL;
1352 return_path.addr_id = rvf_get_taskid();
1353
1354 /*----------------------------------------------------------------------------*/
1355 /* start the dar filter */
1356 /*----------------------------------------------------------------------------*/
1357 /* fill the filter parameter */
1358 filter_use_id_1 = KPD_USE_ID;
1359 filter_use_id_2 = DAR_USE_ID;
1360
1361 /* start the dar filter - Add the group */
1362 if (dar_diagnose_swe_filter(filter_use_id_1, DAR_DEBUG) != RV_OK)
1363 {
1364 *error_type = FUNCTION_ERROR;
1365 return (dar_test_regr_return_verdict(*error_type));
1366 }
1367 if (dar_diagnose_swe_filter(filter_use_id_2, DAR_WARNING) != RV_OK)
1368 {
1369 *error_type = FUNCTION_ERROR;
1370 return (dar_test_regr_return_verdict(*error_type));
1371 }
1372
1373 rvf_send_trace ("KPD warning",(sizeof("KPD warning")-1),NULL_PARAM,RV_TRACE_LEVEL_WARNING,filter_use_id_1);
1374 rvf_send_trace ("KPD debug",(sizeof("KPD debug")-1),NULL_PARAM,RV_TRACE_LEVEL_DEBUG_HIGH,filter_use_id_1);
1375 rvf_send_trace ("DAR warning",(sizeof("DAR warning")-1),NULL_PARAM,RV_TRACE_LEVEL_WARNING,filter_use_id_2);
1376 rvf_send_trace ("DAR debug",(sizeof("DAR debug")-1),NULL_PARAM,RV_TRACE_LEVEL_DEBUG_HIGH,filter_use_id_2);
1377
1378 rvf_delay(RVF_MS_TO_TICKS(3000));
1379
1380 return(TEST_PASSED);
1381 }
1382 /******************** End of dar_regr_test_22 function ***************************/
1383
1384 /********************************************************************************/
1385 /* */
1386 /* DAR NON REGRESSION TEST 23 */
1387 /* */
1388 /* Decription: Redirect trace(Warning/Error) to DAR */
1389 /* */
1390 /********************************************************************************/
1391 T_RV_REGR_RET dar_regr_test_23 (T_RV_REGR_ERR_TYPE *error_type)
1392 {
1393 T_RVM_USE_ID filter_use_id_1;
1394 T_RVM_USE_ID filter_use_id_2;
1395 T_RV_RETURN return_path;
1396
1397 /* initalize the return path, for this test the return path is a message */
1398 return_path.callback_func = NULL;
1399 return_path.addr_id = rvf_get_taskid();
1400
1401 /*----------------------------------------------------------------------------*/
1402 /* start the dar filter */
1403 /*----------------------------------------------------------------------------*/
1404 /* fill the filter parameter */
1405 filter_use_id_1 = AUDIO_USE_ID;
1406 filter_use_id_2 = DAR_USE_ID;
1407
1408 /* start the dar filter - Add the group */
1409 if (dar_diagnose_swe_filter(filter_use_id_1, DAR_WARNING) != RV_OK)
1410 {
1411 *error_type = FUNCTION_ERROR;
1412 return (dar_test_regr_return_verdict(*error_type));
1413 }
1414 if (dar_diagnose_swe_filter(filter_use_id_2, DAR_DEBUG) != RV_OK)
1415 {
1416 *error_type = FUNCTION_ERROR;
1417 return (dar_test_regr_return_verdict(*error_type));
1418 }
1419
1420 rvf_send_trace ("AUDIO warning",(sizeof("AUDIO warning")-1),NULL_PARAM,RV_TRACE_LEVEL_WARNING,filter_use_id_1);
1421 rvf_send_trace ("AUDIO debug",(sizeof("AUDIO debug")-1),NULL_PARAM,RV_TRACE_LEVEL_DEBUG_HIGH,filter_use_id_1);
1422 rvf_send_trace ("DAR warning",(sizeof("DAR warning")-1),NULL_PARAM,RV_TRACE_LEVEL_WARNING,filter_use_id_2);
1423 rvf_send_trace ("DAR debug",(sizeof("DAR debug")-1),NULL_PARAM,RV_TRACE_LEVEL_DEBUG_HIGH,filter_use_id_2);
1424 rvf_send_trace ("ETM error",(sizeof("ETM error")-1),NULL_PARAM,RV_TRACE_LEVEL_ERROR,ETM_USE_ID);
1425
1426 rvf_delay(RVF_MS_TO_TICKS(3000));
1427
1428 return(TEST_PASSED);
1429 }
1430 /******************** End of dar_regr_test_23 function ***************************/
1431
1432
1433
1434 /********************************************************************************/
1435 /* */
1436 /* DAR NON REGRESSION TEST 24 */
1437 /* */
1438 /* Decription: Redirect trace(Error/Warning) to DAR */
1439 /* */
1440 /********************************************************************************/
1441 T_RV_REGR_RET dar_regr_test_24 (T_RV_REGR_ERR_TYPE *error_type)
1442 {
1443 T_RVM_USE_ID filter_use_id_1;
1444 T_RVM_USE_ID filter_use_id_2;
1445 T_RV_RETURN return_path;
1446
1447 /* initalize the return path, for this test the return path is a message */
1448 return_path.callback_func = NULL;
1449 return_path.addr_id = rvf_get_taskid();
1450
1451 /*----------------------------------------------------------------------------*/
1452 /* start the dar filter */
1453 /*----------------------------------------------------------------------------*/
1454 /* fill the filter parameter */
1455 filter_use_id_1 = AUDIO_USE_ID;
1456 filter_use_id_2 = DAR_USE_ID;
1457
1458 /* start the dar filter - Add the group */
1459 if (dar_diagnose_swe_filter(filter_use_id_1, DAR_WARNING) != RV_OK)
1460 {
1461 *error_type = FUNCTION_ERROR;
1462 return (dar_test_regr_return_verdict(*error_type));
1463 }
1464 if (dar_diagnose_swe_filter(filter_use_id_2, DAR_DEBUG) != RV_OK)
1465 {
1466 *error_type = FUNCTION_ERROR;
1467 return (dar_test_regr_return_verdict(*error_type));
1468 }
1469
1470 rvf_send_trace ("ETM error",(sizeof("ETM error")-1),NULL_PARAM,RV_TRACE_LEVEL_ERROR,ETM_USE_ID);
1471 rvf_send_trace ("AUDIO warning",(sizeof("AUDIO warning")-1),NULL_PARAM,RV_TRACE_LEVEL_WARNING,filter_use_id_1);
1472 rvf_send_trace ("AUDIO debug",(sizeof("AUDIO debug")-1),NULL_PARAM,RV_TRACE_LEVEL_DEBUG_HIGH,filter_use_id_1);
1473 rvf_send_trace ("DAR warning",(sizeof("DAR warning")-1),NULL_PARAM,RV_TRACE_LEVEL_WARNING,filter_use_id_2);
1474 rvf_send_trace ("DAR debug",(sizeof("DAR debug")-1),NULL_PARAM,RV_TRACE_LEVEL_DEBUG_HIGH,filter_use_id_2);
1475
1476 rvf_delay(RVF_MS_TO_TICKS(3000));
1477
1478 return(TEST_PASSED);
1479 }
1480 /******************** End of dar_regr_test_24 function ***************************/
1481
1482 /**********************************************************************************/
1483 /* */
1484 /* Function Name: dar_test_regr_return_verdict */
1485 /* */
1486 /* Purpose: The purpose of this function is to return the DAR test verdict */
1487 /* coresponding to the type of error. */
1488 /* */
1489 /* Input Parameters: */
1490 /* error_type : type_of_error */
1491 /* */
1492 /* Output Parameters: */
1493 /* verdict of the test. */
1494 /* */
1495 /* Note: */
1496 /* None. */
1497 /* */
1498 /* Revision History: */
1499 /* 19 October 2001 Stephanie Gerthoux: Creation. */
1500 /* */
1501 /**********************************************************************************/
1502 T_RV_REGR_RET dar_test_regr_return_verdict ( T_RV_REGR_ERR_TYPE error_type)
1503 {
1504 /******************** dar_test_regr_return_verdict function begins ************/
1505
1506 switch(error_type)
1507 {
1508 case NO_EVENT_RECV:
1509 case BAD_EVENT_RECV:
1510 case EVENT_PARAM_ERROR:
1511 case FUNCTION_ERROR:
1512 {
1513 return(TEST_FAILED);
1514 break;
1515 }
1516
1517 case MEMORY_ERROR:
1518 {
1519 return(TEST_IRRECOVERABLY_FAILED);
1520 break;
1521 }
1522
1523 default:
1524 {
1525 return(TEST_IRRECOVERABLY_FAILED);
1526 break;
1527 }
1528 } /* switch(error_type) */
1529 }
1530
1531 /******************** End of dar_test_regr_return_verdict function **************/
1532
1533 /********************************************************************************/
1534 /* */
1535 /* Function Name: trace_dar_test_verdict */
1536 /* */
1537 /* Purpose: The purpose of this function is to trace test verdict. */
1538 /* */
1539 /* Input Parameters: */
1540 /* test_verdict : verdict of the test */
1541 /* nb_of_test_in_list : number of test to pass */
1542 /* nb_of_test_succeeded : number of the test passed */
1543 /* error_flag : error flag of the test */
1544 /* */
1545 /* Output Parameters: */
1546 /* None. */
1547 /* */
1548 /* Note: */
1549 /* None. */
1550 /* */
1551 /* Revision History: */
1552 /* 19 October 2001 Stephanie Gerthoux: Creation. */
1553 /* */
1554 /********************************************************************************/
1555 T_RV_RET trace_dar_test_verdict ( T_RV_TEST_RET test_verdict,
1556 T_RV_REGR_TEST_TOT nb_of_test_in_list,
1557 T_RV_REGR_TEST_TOT nb_of_test_succeeded,
1558 T_RV_REGR_ERR_TYPE *error_type)
1559 {
1560 /******************** trace_dar_test_verdict function begins ******************/
1561 if (nb_of_test_succeeded != nb_of_test_in_list)
1562 {
1563 switch (test_verdict)
1564 {
1565 case TEST_PASSED:
1566 {
1567 RV_TEST_TRACE_HIGH ("PASS DAR TEST");
1568 break;
1569 }
1570 case TEST_FAILED:
1571 {
1572 RV_TEST_TRACE_HIGH ("FAIL DAR TEST");
1573
1574 switch(*error_type)
1575 {
1576 case NO_EVENT_RECV:
1577 {
1578 RV_TEST_TRACE_HIGH ("Received no event from DAR entity");
1579 break;
1580 }
1581 case BAD_EVENT_RECV:
1582 {
1583 RV_TEST_TRACE_HIGH ("Received event not waited in DAR entity");
1584 break;
1585 }
1586 case EVENT_PARAM_ERROR:
1587 {
1588 RV_TEST_TRACE_HIGH ("Received event with wrong parameters in DAR entity");
1589 break;
1590 }
1591 case FUNCTION_ERROR:
1592 {
1593 RV_TEST_TRACE_HIGH ("A DAR API function has been called and an unexpected error occurred");
1594 break;
1595 }
1596 case MEMORY_ERROR:
1597 {
1598 RV_TEST_TRACE_HIGH ("A memory error occurs in the DAR entity");
1599 break;
1600 }
1601 }
1602
1603 break;
1604 }
1605
1606 case TEST_IRRECOVERABLY_FAILED:
1607 {
1608 RV_TEST_TRACE_HIGH ("FAIL DAR TEST");
1609
1610 switch(*error_type)
1611 {
1612 case NO_EVENT_RECV:
1613 {
1614 RV_TEST_TRACE_HIGH ("Received no event from DAR entity");
1615 break;
1616 }
1617 case BAD_EVENT_RECV:
1618 {
1619 RV_TEST_TRACE_HIGH ("DAR entity received event not waited ");
1620 break;
1621 }
1622 case EVENT_PARAM_ERROR:
1623 {
1624 RV_TEST_TRACE_HIGH ("Received event with wrong parameters");
1625 break;
1626 }
1627 case FUNCTION_ERROR:
1628 {
1629 RV_TEST_TRACE_HIGH ("A DAR API function has been called and an unexpected error occurred");
1630 break;
1631 }
1632 case MEMORY_ERROR:
1633 {
1634 RV_TEST_TRACE_HIGH ("A memory error occurs in the DAR entity");
1635 break;
1636 }
1637 }
1638
1639 break;
1640 }
1641
1642 default:
1643 {
1644 RV_TEST_TRACE_ERROR ("!!! DAR ERROR !!! Wrong test_verdict value");
1645 break;
1646 }
1647
1648 } /* switch(test_verdict) */
1649 } /* if (nb_of_test_succeeded != nb_of_test_in_list) */
1650
1651 else /* (nb_of_test_succeeded == nb_of_test_in_list) -> All tests performed */
1652 {
1653 if (*error_type != NO_ERR)
1654 {
1655 RV_TEST_TRACE_HIGH ("!!! ERROR !!! DAR NON REGRESSION PERFORMED WITH ERROR(S)");
1656 }
1657 else
1658 {
1659 RV_TEST_TRACE_HIGH ("DAR NON REGRESSION PERFORMED WITH NO ERROR");
1660 }
1661
1662 RV_TEST_TRACE_HIGH ("*************** END OF DAR NON REGRESSION ***************");
1663 }
1664
1665 return (RV_OK);
1666 }
1667
1668 /******************** End of trace_dar_test_verdict function ********************/
1669
1670 /********************************************************************************/
1671 /* */
1672 /* Function Name: dar_test_rgr */
1673 /* */
1674 /* Purpose: This function executes the DAR non regression tests. */
1675 /* */
1676 /* Input Parameters: */
1677 /* None. */
1678 /* */
1679 /* Output Parameters: */
1680 /* None. */
1681 /* */
1682 /* Note: */
1683 /* None. */
1684 /* */
1685 /* Revision History: */
1686 /* 27 September 2001 Stephanie Gerthoux: Creation. */
1687 /* */
1688 /********************************************************************************/
1689 T_RV_REGR_RET dar_test_regr ( T_RV_REGR_TEST_LIST list[],
1690 T_RV_REGR_TEST_TOT nb_of_test_in_list,
1691 T_RV_REGR_TEST_OCC test_occ)
1692 {
1693 T_RV_REGR_ERR_TYPE error_type = NO_ERR;
1694 T_RV_REGR_RET test_verdict = TEST_PASSED;
1695 T_RV_REGR_TEST_TOT i = 0;
1696 T_RV_REGR_TEST_OCC j = 0;
1697
1698 /************************* Start dar_test_regr function ***********************/
1699
1700 RV_TEST_TRACE_HIGH ("**************** START DAR NON REGRESSION **************");
1701
1702 /************************************************************************/
1703 /* */
1704 /* Memory dump -> check memory and stack used before testing. */
1705 /* */
1706 /************************************************************************/
1707 rvf_dump_mem ();
1708 rvf_dump_tasks();
1709
1710 for (i=0; i<nb_of_test_in_list; i++)
1711 {
1712 for (j=0; j<test_occ; j++)
1713 {
1714 if (test_verdict != TEST_IRRECOVERABLY_FAILED)
1715 {
1716 switch (list[i].list_nbr)
1717 {
1718 case 1:
1719 {
1720 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 1: Dar filter start- add a group");
1721 test_verdict = dar_regr_test_1 (&error_type);
1722 break;
1723 }
1724 case 2:
1725 {
1726 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 2: Dar filter start- search a group");
1727 test_verdict = dar_regr_test_2 (&error_type);
1728 break;
1729 }
1730 case 3:
1731 {
1732 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 3: Dar filter start- delete a group");
1733 test_verdict = dar_regr_test_3 (&error_type);
1734 break;
1735 }
1736
1737 case 4:
1738 {
1739 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 4: DAR filter - add more than DAR max number group ");
1740 test_verdict = dar_regr_test_4 (&error_type);
1741 break;
1742 }
1743
1744 case 5:
1745 {
1746 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 5: DAR write function ");
1747 test_verdict = dar_regr_test_5 (&error_type);
1748 break;
1749 }
1750
1751 case 6:
1752 {
1753 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 6: DAR write function with bad debug level");
1754 test_verdict = dar_regr_test_6 (&error_type);
1755 break;
1756 }
1757
1758 case 7:
1759 {
1760 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 7: DAR write function - Long data ");
1761 test_verdict = dar_regr_test_7 (&error_type);
1762 break;
1763 }
1764
1765 case 8:
1766 {
1767 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 8: DAR write function - Store 2 string");
1768 test_verdict = dar_regr_test_8 (&error_type);
1769 break;
1770 }
1771
1772 case 9:
1773 {
1774 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 9: DAR write function - DAR_NO_DIAGNOSE message");
1775 test_verdict = dar_regr_test_9 (&error_type);
1776 break;
1777 }
1778
1779 case 10:
1780 {
1781 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 10: DAR emergency function ( PC)");
1782 test_verdict = dar_regr_test_10 (&error_type);
1783 break;
1784 }
1785
1786 case 11:
1787 {
1788 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 11: DAR recovery get status after a reset or an ON/OFF");
1789 test_verdict = dar_regr_test_11 (&error_type);
1790 break;
1791 }
1792
1793 case 12:
1794 {
1795 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 12: DAR reset system");
1796 test_verdict = dar_regr_test_12 (&error_type);
1797 break;
1798 }
1799
1800 case 13:
1801 {
1802 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 13: DAR diagnose generate emergency (board)");
1803 test_verdict = dar_regr_test_13 (&error_type);
1804 break;
1805 }
1806
1807 case 14:
1808 {
1809 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 14: DAR start watchdog timer");
1810 test_verdict = dar_regr_test_14 (&error_type);
1811 break;
1812 }
1813
1814 case 15:
1815 {
1816 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 15: DAR reload watchdog timer");
1817 test_verdict = dar_regr_test_15 (&error_type);
1818 break;
1819 }
1820
1821 case 16:
1822 {
1823 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 16: DAR start watchdog timer + infinite loop");
1824 test_verdict = dar_regr_test_16 (&error_type);
1825 break;
1826 }
1827
1828 case 17:
1829 {
1830 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 17: DAR start watchdog timer + stop + voluntary reset");
1831 test_verdict = dar_regr_test_17 (&error_type);
1832 break;
1833 }
1834
1835 case 18:
1836 {
1837 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 18: DAR Exception: Jump to unknown address ");
1838
1839
1840 test_verdict = dar_regr_test_18 (&error_type);
1841 break;
1842 }
1843
1844 case 19:
1845 {
1846 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 19: DAR Exception : Jump to variables address");
1847 /* call the dar recovery config */
1848 dar_recovery_config(dar_store_recovery_data);
1849 test_verdict = dar_regr_test_19 (&error_type);
1850 break;
1851 }
1852
1853 case 20:
1854 {
1855 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 20: DAR recovery get status and get recovery data");
1856 test_verdict = dar_regr_test_20 (&error_type);
1857 break;
1858 }
1859
1860 case 21:
1861 {
1862 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 21: DAR - Branch to 0 with a callback = NULL ");
1863 test_verdict = dar_regr_test_21 (&error_type);
1864 break;
1865 }
1866
1867 case 22:
1868 {
1869 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 22: Redirect trace(Warning/Debug) to DAR");
1870 test_verdict = dar_regr_test_22 (&error_type);
1871 break;
1872 }
1873
1874 case 23:
1875 {
1876 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 23: Redirect trace(Warning/Error) to DAR");
1877 test_verdict = dar_regr_test_23 (&error_type);
1878 break;
1879 }
1880
1881 case 24:
1882 {
1883 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 24: Redirect trace(Error/Warning) to DAR");
1884 test_verdict = dar_regr_test_24 (&error_type);
1885 break;
1886 }
1887
1888 default:
1889 {
1890 RV_TEST_TRACE_ERROR ("!!! ERROR !!! Invalid DAR test_number value for REGR test_type");
1891 test_verdict = TEST_IRRECOVERABLY_FAILED;
1892 break;
1893 }
1894 }
1895
1896 trace_dar_test_verdict (test_verdict,
1897 nb_of_test_in_list,
1898 i,
1899 &error_type);
1900 } /* End of "if (test_verdict != TEST_IRRECOVERABLY_FAILED)" */
1901
1902 } /* End of "for (j = 0; j < test_occ; j ++)" */
1903
1904 } /* End of "for (i = 0; i < nb_of_test_in_list; i ++)" */
1905
1906 trace_dar_test_verdict (test_verdict,
1907 nb_of_test_in_list,
1908 nb_of_test_in_list,
1909 &error_type);
1910
1911 /************************************************************************/
1912 /* */
1913 /* Memory dump -> check memory and stack used before testing. */
1914 /* */
1915 /************************************************************************/
1916 rvf_dump_mem ();
1917 rvf_dump_tasks();
1918
1919 return (test_verdict);
1920 }
1921
1922 /************************** dar_test_regr function *************************/
1923 #endif
1924 #endif /* ((DAR_REGR == SW_COMPILED) || (DAR_MISC == SW_COMPILED)) */
1925
1926
1927
1928 /********************************************************************************/
1929 /* */
1930 /* ------------------------------------------------ */
1931 /* | WARNING - IMPORTANT | */
1932 /* ------------------------------------------------ */
1933 /* */
1934 /* */
1935 /* Function Name: dar_lib_test */
1936 /* */
1937 /* Purpose: This function is only used in order to have a function in the*/
1938 /* dar_lib when the DAR is NOT_COMPILED */
1939 /* */
1940 /* Input Parameters: */
1941 /* None */
1942 /* */
1943 /* Output Parameters: */
1944 /* NONE */
1945 /* */
1946 /********************************************************************************/
1947 void dar_lib_test(void)
1948 {
1949 }