comparison chipsetsw/services/dar/tests/dar_test_misc.c @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /********************************************************************************/
2 /* */
3 /* File Name: dar_test_misc.c */
4 /* */
5 /* Purpose: This file gathers misc tests for DAR. */
6 /* */
7 /* Note: None. */
8 /* */
9 /* Version 0.1 */
10 /* */
11 /* Date Modification */
12 /* ---------------------------------------------------------------------------*/
13 /* 5 November 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 DAR riviera testing. */
23 /* */
24 /********************************************************************************/
25
26 #include "rv/rv_defined_swe.h"
27 #include "dar/tests/dar_test.h"
28
29 #ifdef RVM_DAR_SWE
30 #if (DAR_MISC == SW_COMPILED)
31
32 #include "rv/rv_general.h"
33 #include "rvm/rvm_gen.h"
34 #include "dar/tests/dar_test_regr.h"
35 #include "dar/tests/dar_test_misc.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 /********************************************************************************/
45 /* */
46 /* Function Name: dar_test_misc */
47 /* */
48 /* Purpose: This function executes the DAR misc tests. */
49 /* */
50 /* Input Parameters: */
51 /* test number. */
52 /* */
53 /* Output Parameters: */
54 /* None. */
55 /* */
56 /* Note: */
57 /* None. */
58 /* */
59 /* Revision History: */
60 /* 5 November 2001 Stephanie Gerthoux: Creation. */
61 /* */
62 /********************************************************************************/
63
64 T_RV_MISC_RET dar_test_misc (T_RV_MISC_TEST_NBR test_number)
65 {
66
67 T_RV_MISC_ERR_TYPE error_type = NO_ERR;
68 T_RV_MISC_RET test_verdict = TEST_PASSED;
69
70
71 /************************* Start dar_test_misc function *************************/
72
73 RV_TEST_TRACE_HIGH ("**************** START DAR MISC ****************");
74
75 /************************************************************************/
76 /* */
77 /* Memory dump -> check memory and stack used before testing. */
78 /* */
79 /************************************************************************/
80 rvf_dump_mem ();
81 rvf_dump_tasks();
82
83 switch (test_number)
84 {
85 case 1:
86 {
87 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 1: Dar filter start- add a group");
88 test_verdict = dar_regr_test_1 (&error_type);
89 break;
90 }
91 case 2:
92 {
93 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 2: Dar filter start- search a group");
94 test_verdict = dar_regr_test_2 (&error_type);
95 break;
96 }
97 case 3:
98 {
99 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 3: Dar filter start- delete a group");
100 test_verdict = dar_regr_test_3 (&error_type);
101 break;
102 }
103
104 case 4:
105 {
106 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 4: DAR filter - add more than DAR max number group ");
107 test_verdict = dar_regr_test_4 (&error_type);
108 break;
109 }
110
111 case 5:
112 {
113 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 5: DAR write function ");
114 test_verdict = dar_regr_test_5 (&error_type);
115 break;
116 }
117
118 case 6:
119 {
120 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 6: DAR write function with bad debug level");
121 test_verdict = dar_regr_test_6 (&error_type);
122 break;
123 }
124
125 case 7:
126 {
127 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 7: DAR write function - Long data ");
128 test_verdict = dar_regr_test_7 (&error_type);
129 break;
130 }
131
132 case 8:
133 {
134 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 8: DAR write function - Store 2 string");
135 test_verdict = dar_regr_test_8 (&error_type);
136 break;
137 }
138
139 case 9:
140 {
141 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 9: DAR write function - DAR_NO_DIAGNOSE message");
142 test_verdict = dar_regr_test_9 (&error_type);
143 break;
144 }
145
146 case 10:
147 {
148 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 10: DAR emergency function ( PC)");
149 test_verdict = dar_regr_test_10 (&error_type);
150 break;
151 }
152
153 case 11:
154 {
155 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 11: DAR recovery get status after an ON/OFF");
156 test_verdict = dar_regr_test_11 (&error_type);
157 break;
158 }
159
160 case 12:
161 {
162 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 12: DAR reset system");
163 test_verdict = dar_regr_test_12 (&error_type);
164 break;
165 }
166
167 case 13:
168 {
169 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 13: DAR diagnose generate emergency (board)");
170 test_verdict = dar_regr_test_13 (&error_type);
171 break;
172 }
173
174 case 14:
175 {
176 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 14: DAR start watchdog timer");
177 test_verdict = dar_regr_test_14 (&error_type);
178 break;
179 }
180
181 case 15:
182 {
183 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 15: DAR reload watchdog timer");
184 test_verdict = dar_regr_test_15 (&error_type);
185 break;
186 }
187
188 case 16:
189 {
190 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 16: DAR start watchdog timer + infinite loop");
191 test_verdict = dar_regr_test_16 (&error_type);
192 break;
193 }
194
195 case 17:
196 {
197 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 17: DAR start watchdog timer + stop + infinite loop");
198 test_verdict = dar_regr_test_17 (&error_type);
199 break;
200 }
201
202 case 18:
203 {
204 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 18: DAR Exception: Jump to unknown address ");
205 test_verdict = dar_regr_test_18 (&error_type);
206 break;
207 }
208
209 case 19:
210 {
211 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 19: DAR Exception : Jump to variables address");
212 test_verdict = dar_regr_test_19 (&error_type);
213 break;
214 }
215
216 case 20:
217 {
218 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 20: DAR recovery get status and get recovery data");
219 test_verdict = dar_regr_test_20 (&error_type);
220 break;
221 }
222
223 case 21:
224 {
225 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 21: DAR - Branch to 0 with a callback = NULL ");
226 test_verdict = dar_regr_test_21 (&error_type);
227 break;
228 }
229
230 case 22:
231 {
232 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 22: Redirect trace(Warning/Error) to DAR");
233 test_verdict = dar_regr_test_22 (&error_type);
234 break;
235 }
236
237 case 23:
238 {
239 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 23: Redirect trace(Warning/Error) to DAR");
240 test_verdict = dar_regr_test_23 (&error_type);
241 break;
242 }
243
244 case 24:
245 {
246 RV_TEST_TRACE_HIGH ("**DAR TEST REGR 24: Redirect trace(Error/Warning) to DAR");
247 test_verdict = dar_regr_test_24 (&error_type);
248 break;
249 }
250
251 default:
252 {
253 RV_TEST_TRACE_ERROR ("!!! ERROR !!! Invalid DAR test_number value for misc test_type");
254 test_verdict = TEST_IRRECOVERABLY_FAILED;
255 break;
256 }
257
258 } /* switch */
259
260 trace_dar_test_verdict (test_verdict,
261 0,
262 test_number,
263 &error_type);
264
265 trace_dar_test_verdict (test_verdict,
266 test_number,
267 test_number,
268 &error_type);
269 /************************************************************************/
270 /* */
271 /* Memory dump -> check memory and stack used before testing */
272 /* */
273 /************************************************************************/
274 rvf_dump_mem ();
275 rvf_dump_tasks();
276
277 return (test_verdict);
278 }
279
280 /************************** Stop dar_test_misc function *************************/
281
282 #endif /* #ifdef RVM_DAR_SWE */
283 #endif /* #if (DAR_MISC == SW_COMPILED) */
284
285