blob: 4cda59a213993ad31809ded49316e18ed7475a56 [file] [log] [blame]
Sridevi Rameshb180c9f2017-08-06 10:27:41 -05001*** Settings ***
2Documentation This suite tests checkstop operations through HOST.
3Resource ../lib/utils.robot
4Resource ../lib/openbmc_ffdc.robot
5Resource ../lib/ras/host_utils.robot
6Resource ../lib/resource.txt
7Resource ../lib/state_manager.robot
8Resource ../lib/openbmc_ffdc_methods.robot
9Resource ../lib/boot_utils.robot
10Variables ../lib/ras/variables.py
11
12Library DateTime
13Library OperatingSystem
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -050014Library random
15Library Collections
Sridevi Rameshb180c9f2017-08-06 10:27:41 -050016
17Suite Setup RAS Suite Setup
18Test Setup RAS Test Setup
19Test Teardown FFDC On Test Case Fail
20Suite Teardown RAS Suite Cleanup
21
Sweta Potthuri18753a72017-10-30 06:01:03 -050022Force Tags Host_RAS
Sridevi Rameshb180c9f2017-08-06 10:27:41 -050023*** Variables ***
24${stack_mode} normal
25
Sridevi Rameshcf4507c2017-10-26 04:13:50 -050026*** Test Cases ***
Sridevi Rameshb180c9f2017-08-06 10:27:41 -050027# Memory channel (MCACALIFIR) related error injection.
28
29Verify Recoverable Callout Handling For MCA With Threshold 1
30 [Documentation] Verify recoverable callout handling for MCACALIFIR with
31 ... threshold 1.
32 [Tags] Verify_Recoverable_Callout_Handling_For_MCA_With_Threshold_1
33
34 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCACALIFIR_RECV1
35 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcacalfir_th1
36 Inject Recoverable Error With Threshold Limit Through Host
37 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
38
Sridevi Rameshcf4507c2017-10-26 04:13:50 -050039
Sridevi Rameshb180c9f2017-08-06 10:27:41 -050040Verify Recoverable Callout Handling For MCA With Threshold 32
41 [Documentation] Verify recoverable callout handling for MCACALIFIR with
42 ... threshold 32.
43 [Tags] Verify_Recoverable_Callout_Handling_For_MCA_With_Threshold_32
44
45 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCACALIFIR_RECV32
46 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcacalfir_th32
47 Inject Recoverable Error With Threshold Limit Through Host
48 ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path}
49
Sridevi Rameshb180c9f2017-08-06 10:27:41 -050050Verify Unrecoverable Callout Handling For MCA
51 [Documentation] Verify unrecoverable callout handling for MCACALIFIR.
52 [Tags] Verify_Unrecoverable_Callout_Handling_For_MCA
53
54 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCACALIFIR_UE
55 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcacalfir
56 Inject Unrecoverable Error Through Host
57 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
58
59# Memory buffer (MCIFIR) related error injection.
60
61Verify Recoverable Callout Handling For MCI With Threshold 1
62 [Documentation] Verify recoverable callout handling for mci with
63 ... threshold 1.
64 [Tags] Verify_Recoverable_Callout_Handling_For_MCI_With_Threshold_1
65
66 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCS_RECV1
67 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcifir_th1
68 Inject Recoverable Error With Threshold Limit Through Host
69 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
70
71Verify Unrecoverable Callout Handling For MCI
72 [Documentation] Verify unrecoverable callout handling for mci.
73 [Tags] Verify_Unrecoverable_Callout_Handling_For_MCI
74
75 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCS_UE
76 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcifir
77 Inject Unrecoverable Error Through Host
78 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
79
Sridevi Rameshb180c9f2017-08-06 10:27:41 -050080# CAPP accelerator (CXAFIR) related error injection.
81
82Verify Recoverable Callout Handling For CXA With Threshold 5
83 [Documentation] Verify recoverable callout handling for CXA with
84 ... threshold 5.
85 [Tags] Verify_Recoverable_Callout_Handling_For_CXA_With_Threshold_5
86
87 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} CXA_RECV5
88 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}cxafir_th5
89 Inject Recoverable Error With Threshold Limit Through Host
90 ... ${value[0]} ${value[1]} 5 ${value[2]} ${err_log_path}
91
92Verify Recoverable Callout Handling For CXA With Threshold 32
93 [Documentation] Verify recoverable callout handling for CXA with
94 ... threshold 32.
95 [Tags] Verify_Recoverable_Callout_Handling_For_CXA_With_Threshold_32
96
97 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} CXA_RECV32
98 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}cxafir_th32
99 Inject Recoverable Error With Threshold Limit Through Host
100 ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path}
101
Sridevi Rameshb6d7b7e2017-11-07 03:49:52 -0600102Verify Unrecoverable Callout Handling For CXA
103 [Documentation] Verify unrecoverable callout handling for CXAFIR.
104 [Tags] Verify_Unrecoverable_Callout_Handling_For_CXA
105
106 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} CXA_UE
107 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}cxafir_ue
108 Inject Unrecoverable Error Through Host
109 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
110
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500111# OBUSFIR related error injection.
112
113Verify Recoverable Callout Handling For OBUS With Threshold 32
114 [Documentation] Verify recoverable callout handling for OBUS with
115 ... threshold 32.
116 [Tags] Verify_Recoverable_Callout_Handling_For_OBUS_With_Threshold_32
117
118 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} OBUS_RECV32
119 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}obusfir_th32
120 Inject Recoverable Error With Threshold Limit Through Host
121 ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path}
122
123# Nvidia graphics processing units (NPU0FIR) related error injection.
124
125Verify Recoverable Callout Handling For NPU0 With Threshold 32
126 [Documentation] Verify recoverable callout handling for NPU0 with
127 ... threshold 32.
128 [Tags] Verify_Recoverable_Callout_Handling_For_NPU0_With_Threshold_32
129
130 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} NPU0_RECV32
131 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}npu0fir_th32
132 Inject Recoverable Error With Threshold Limit Through Host
133 ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path}
134
Sridevi Ramesh6bd6b4c2017-10-10 04:38:30 -0500135# Nest accelerator NXDMAENGFIR related error injection.
136
137Verify Recoverable Callout Handling For NXDMAENG With Threshold 1
138 [Documentation] Verify recoverable callout handling for NXDMAENG with
139 ... threshold 1.
140 [Tags] Verify_Recoverable_Callout_Handling_For_NXDMAENG_With_Threshold_1
141
142 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} NX_RECV1
143 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}nxfir_th1
144 Inject Recoverable Error With Threshold Limit Through Host
145 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
146
147
148Verify Recoverable Callout Handling For NXDMAENG With Threshold 32
149 [Documentation] Verify recoverable callout handling for NXDMAENG with
150 ... threshold 32.
151 [Tags] Verify_Recoverable_Callout_Handling_For_NXDMAENG_With_Threshold_32
152
153 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} NX_RECV32
154 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}nxfir_th32
155 Inject Recoverable Error With Threshold Limit Through Host
156 ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path}
157
158Verify Unrecoverable Callout Handling For NXDMAENG
159 [Documentation] Verify unrecoverable callout handling for NXDMAENG.
160 [Tags] Verify_Unrecoverable_Callout_Handling_For_NXDMAENG
161
162 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} NX_UE
163 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}nxfir_ue
164 Inject Unrecoverable Error Through Host
165 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
166
Sridevi Ramesh151fcf02017-10-24 02:08:27 -0500167
168# L2FIR related error injection.
169
170Verify Recoverable Callout Handling For L2FIR With Threshold 1
171 [Documentation] Verify recoverable callout handling for L2FIR with
172 ... threshold 1.
173 [Tags] Verify_Recoverable_Callout_Handling_For_L2FIR_With_Threshold_1
174
175 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} L2FIR_RECV1
Sridevi Rameshcf4507c2017-10-26 04:13:50 -0500176 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
Sridevi Ramesh151fcf02017-10-24 02:08:27 -0500177 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}l2fir_th1
178 Inject Recoverable Error With Threshold Limit Through Host
179 ... ${translated_fir} ${value[1]} 1 ${value[2]} ${err_log_path}
180
Sridevi Rameshb6d7b7e2017-11-07 03:49:52 -0600181Verify Recoverable Callout Handling For L2FIR With Threshold 32
182 [Documentation] Verify recoverable callout handling for L2FIR with
183 ... threshold 32.
184 [Tags] Verify_Recoverable_Callout_Handling_For_L2FIR_With_Threshold_32
185
186 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} L2FIR_RECV32
187 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
188 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}l2fir_th32
189 Inject Recoverable Error With Threshold Limit Through Host
190 ... ${translated_fir} ${value[1]} 32 ${value[2]} ${err_log_path}
191
192Verify Unrecoverable Callout Handling For L2FIR
193 [Documentation] Verify unrecoverable callout handling for L2FIR.
194 [Tags] Verify_Unrecoverable_Callout_Handling_For_L2FIR
195
196 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} L2FIR_UE
197 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
198 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}l2fir_ue
199 Inject Unrecoverable Error Through Host
200 ... ${translated_fir} ${value[1]} 1 ${value[2]} ${err_log_path}
201
Sridevi Ramesh151fcf02017-10-24 02:08:27 -0500202# L3FIR related error injection.
203
204Verify Recoverable Callout Handling For L3FIR With Threshold 1
205 [Documentation] Verify recoverable callout handling for L3FIR with
206 ... threshold 1.
207 [Tags] Verify_Recoverable_Callout_Handling_For_L3FIR_With_Threshold_1
208
209 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} L3FIR_RECV1
Sridevi Rameshcf4507c2017-10-26 04:13:50 -0500210 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
Sridevi Ramesh151fcf02017-10-24 02:08:27 -0500211 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}l3fir_th1
212 Inject Recoverable Error With Threshold Limit Through Host
213 ... ${translated_fir} ${value[1]} 1 ${value[2]} ${err_log_path}
214
215Verify Recoverable Callout Handling For L3FIR With Threshold 32
216 [Documentation] Verify recoverable callout handling for L3FIR with
217 ... threshold 32.
218 [Tags] Verify_Recoverable_Callout_Handling_For_L3FIR_With_Threshold_32
219
220 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} L3FIR_RECV32
Sridevi Rameshcf4507c2017-10-26 04:13:50 -0500221 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
Sridevi Ramesh151fcf02017-10-24 02:08:27 -0500222 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}l3fir_th32
223 Inject Recoverable Error With Threshold Limit Through Host
224 ... ${translated_fir} ${value[1]} 32 ${value[2]} ${err_log_path}
225
Sridevi Rameshb6d7b7e2017-11-07 03:49:52 -0600226Verify Unrecoverable Callout Handling For L3FIR
227 [Documentation] Verify unrecoverable callout handling for L3FIR.
228 [Tags] Verify_Unrecoverable_Callout_Handling_For_L3FIR
229
230 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} L3FIR_UE
231 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
232 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}l3fir_ue
233 Inject Unrecoverable Error Through Host
234 ... ${translated_fir} ${value[1]} 1 ${value[2]} ${err_log_path}
235
Sridevi Ramesh151fcf02017-10-24 02:08:27 -0500236# On chip controller (OCCFIR) related error injection.
237
238Verify Recoverable Callout Handling For OCC With Threshold 1
239 [Documentation] Verify recoverable callout handling for OCCFIR with
240 ... threshold 1.
241 [Tags] Verify_Recoverable_Callout_Handling_For_OCC_With_Threshold_1
242
243 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} OCCFIR_RECV1
244 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}occfir_th1
245 Inject Recoverable Error With Threshold Limit Through Host
246 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
247
248# Core management engine (CMEFIR) related error injection.
249
250Verify Recoverable Callout Handling For CMEFIR With Threshold 1
251 [Documentation] Verify recoverable callout handling for CMEFIR with
252 ... threshold 1.
253 [Tags] Verify_Recoverable_Callout_Handling_For_CMEFIR_With_Threshold_1
254
255 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} CMEFIR_RECV1
Sridevi Rameshcf4507c2017-10-26 04:13:50 -0500256 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
Sridevi Ramesh151fcf02017-10-24 02:08:27 -0500257 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}cmefir_th1
258 Inject Recoverable Error With Threshold Limit Through Host
259 ... ${translated_fir} ${value[1]} 1 ${value[2]} ${err_log_path}
260
Sridevi Ramesh70978ed2017-11-22 23:56:50 -0600261# Nest control vunit (NCUFIR) related error injection.
262
Sridevi Rameshb6d7b7e2017-11-07 03:49:52 -0600263Verify Recoverable Callout Handling For NCUFIR With Threshold 1
264 [Documentation] Verify recoverable callout handling for NCUFIR with
265 ... threshold 1.
266 [Tags] Verify_Recoverable_Callout_Handling_For_NCUFIR_With_Threshold_1
267
268 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} NCUFIR_RECV1
269 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
270 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}ncufir_th1
271 Inject Recoverable Error With Threshold Limit Through Host
272 ... ${translated_fir} ${value[1]} 1 ${value[2]} ${err_log_path}
Sridevi Ramesh4436af12017-10-30 04:19:41 -0500273
Sridevi Ramesh70978ed2017-11-22 23:56:50 -0600274Verify Unrecoverable Callout Handling For NCUFIR
275 [Documentation] Verify unrecoverable callout handling for NCUFIR.
276 [Tags] Verify_Unrecoverable_Callout_Handling_For_NCUFIR
277
278 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} NCUFIR_UE
279 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
280 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}ncufir_ue
281 Inject Unrecoverable Error Through Host
282 ... ${translated_fir} ${value[1]} 1 ${value[2]} ${err_log_path}
283
284# Core FIR related error injection.
285
286Verify Recoverable Callout Handling For CoreFIR With Threshold 5
287 [Documentation] Verify recoverable callout handling for CoreFIR with
288 ... threshold 5.
289 [Tags] Verify_Recoverable_Callout_Handling_For_CoreFIR_With_Threshold_5
290
291 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} COREFIR_RECV5
292 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
293 Disable CPU States Through HOST
294 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}corefir_th5
295 Inject Recoverable Error With Threshold Limit Through Host
296 ... ${value[0]} ${value[1]} 5 ${value[2]} ${err_log_path}
297
298Verify Recoverable Callout Handling For CoreFIR With Threshold 1
299 [Documentation] Verify recoverable callout handling for CoreFIR with
300 ... threshold 1.
301 [Tags] Verify_Recoverable_Callout_CoreFIR_Handling_For_With_Threshold_1
302
303 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} COREFIR_RECV1
304 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
305 Disable CPU States Through HOST
306 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}corefir_th1
307 Inject Recoverable Error With Threshold Limit Through Host
308 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
309
310Verify Unrecoverable Callout Handling For CoreFIR
311 [Documentation] Verify unrecoverable callout handling for CoreFIR.
312 [Tags] Verify_Unrecoverable_Callout_Handling_For_CoreFIR
313
314 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} COREFIR_UE
315 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EX
316 Disable CPU States Through HOST
317 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}corefir_ue
318 Inject Unrecoverable Error Through Host
319 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
320
321Verify Recoverable Callout Handling For EQFIR With Threshold 32
322 [Documentation] Verify recoverable callout handling for L3FIR with
323 ... threshold 32.
324 [Tags] Verify_Recoverable_Callout_Handling_For_EQFIR_With_Threshold_32
325
326 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} EQFIR_RECV32
327 ${translated_fir}= Fetch FIR Address Translation Value ${value[0]} EQ
328 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}eqfir_th32
329 Inject Recoverable Error With Threshold Limit Through Host
330 ... ${translated_fir} ${value[1]} 32 ${value[2]} ${err_log_path}
331
332
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500333*** Keywords ***
334
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500335Verify And Clear Gard Records On HOST
336 [Documentation] Verify And Clear gard records on HOST.
337
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500338 ${output}= Gard Operations On OS list
Sridevi Rameshb6d7b7e2017-11-07 03:49:52 -0600339 Should Not Contain ${output} No GARD
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500340 Gard Operations On OS clear all
341
342Verify Error Log Entry
343 [Documentation] Verify error log entry & signature description.
344 [Arguments] ${signature_desc} ${log_prefix}
345 # Description of argument(s):
346 # signature_desc Error log signature description.
347 # log_prefix Log path prefix.
348
349 ${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}/list
350 Should Not Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
351
352 Collect eSEL Log ${log_prefix}
353 ${error_log_file_path}= Catenate ${log_prefix}esel.txt
354 ${rc} ${output} = Run and Return RC and Output
Sridevi Ramesh6bd6b4c2017-10-10 04:38:30 -0500355 ... grep -i ${signature_desc} ${error_log_file_path}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500356 Should Not Be Empty ${output}
357
358Inject Recoverable Error With Threshold Limit Through Host
359 [Documentation] Inject and verify recoverable error on processor through
360 ... host.
361 ... Test sequence:
362 ... 1. Enable Auto Reboot Setting
363 ... 2. Inject Error on processor/centaur
364 ... 3. Check If HOST is running.
365 ... 4. Verify error log entry & signature description.
366 ... 4. Verify & clear gard records.
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500367 [Arguments] ${fir} ${chip_address} ${threshold_limit}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500368 ... ${signature_desc} ${log_prefix}
369 # Description of argument(s):
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500370 # fir FIR (Fault isolation register) value (e.g. 2011400).
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500371 # chip_address Chip address (e.g 2000000000000000).
372 # threshold_limit Threshold limit (e.g 1, 5, 32).
373 # signature_desc Error log signature description.
374 # log_prefix Log path prefix.
375
376 Set Auto Reboot 1
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500377 Inject Error Through HOST ${fir} ${chip_address} ${threshold_limit}
Sridevi Rameshcf4507c2017-10-26 04:13:50 -0500378 ... ${master_proc_chip}
379
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500380 Is Host Running
381 ${output}= Gard Operations On OS list
382 Should Contain ${output} No GARD
383 Verify Error Log Entry ${signature_desc} ${log_prefix}
384
385
386Inject Unrecoverable Error Through Host
387 [Documentation] Inject and verify recoverable error on processor through
388 ... host.
389 ... Test sequence:
390 ... 1. Enable Auto Reboot Setting
391 ... 2. Inject Error on processor/centaur
392 ... 3. Check If HOST is rebooted.
393 ... 4. Verify error log entry & signature description.
394 ... 4. Verify & clear gard records.
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500395 [Arguments] ${fir} ${chip_address} ${threshold_limit}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500396 ... ${signature_desc} ${log_prefix}
397 # Description of argument(s):
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500398 # fir FIR (Fault isolation register) value (e.g. 2011400).
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500399 # chip_address Chip address (e.g 2000000000000000).
400 # threshold_limit Threshold limit (e.g 1, 5, 32).
401 # signature_desc Error Log signature description.
402 # (e.g 'mcs(n0p0c0) (MCFIR[0]) mc internal recoverable')
403 # log_prefix Log path prefix.
404
405 Set Auto Reboot 1
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500406 Inject Error Through HOST ${fir} ${chip_address} ${threshold_limit}
Sridevi Rameshcf4507c2017-10-26 04:13:50 -0500407 ... ${master_proc_chip}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500408 Wait Until Keyword Succeeds 500 sec 20 sec Is Host Rebooted
409 Wait for OS
410 Verify And Clear Gard Records On HOST
411 Verify Error Log Entry ${signature_desc} ${log_prefix}
412
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500413Fetch FIR Address Translation Value
414 [Documentation] Fetch FIR address translation value through HOST.
Sridevi Rameshb6d7b7e2017-11-07 03:49:52 -0600415 [Arguments] ${fir} ${target_type}
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500416 # Description of argument(s):
Sridevi Rameshcf4507c2017-10-26 04:13:50 -0500417 # fir FIR (Fault isolation register) value (e.g. 2011400).
418 # core_id Core ID (e.g. 9).
419 # target_type Target type (e.g. 'EX', 'EQ', 'C').
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500420
421 Login To OS Host
422 Copy Address Translation Utils To HOST OS
423
Sridevi Rameshcf4507c2017-10-26 04:13:50 -0500424 # Fetch processor chip IDs.
425 ${proc_chip_id}= Get ProcChipId From OS Processor ${master_proc_chip}
426 # Example output:
427 # 00000000
428
429 ${core_ids}= Get Core IDs From OS ${proc_chip_id[-1]}
430 # Example output:
431 #./probe_cpus.sh | grep 'CHIP ID: 0' | cut -c21-22
432 # ['14', '15', '16', '17']
433
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500434 # Ignoring master core ID.
435 ${output}= Get Slice From List ${core_ids} 1
436 # Feth random non-master core ID.
437 ${core_ids_sub_list}= Evaluate random.sample(${core_ids}, 1) random
438 ${core_id}= Get From List ${core_ids_sub_list} 0
439 ${translated_fir_addr}= FIR Address Translation Through HOST
440 ... ${fir} ${core_id} ${target_type}
441
442 [Return] ${translated_fir_addr}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500443
444RAS Test SetUp
445 [Documentation] Validates input parameters.
446
447 Should Not Be Empty
448 ... ${OS_HOST} msg=You must provide DNS name/IP of the OS host.
449 Should Not Be Empty
450 ... ${OS_USERNAME} msg=You must provide OS host user name.
451 Should Not Be Empty
452 ... ${OS_PASSWORD} msg=You must provide OS host user password.
453
454 # Boot to OS.
Sridevi Ramesh6bd6b4c2017-10-10 04:38:30 -0500455 REST Power On quiet=${1}
Sridevi Ramesh4436af12017-10-30 04:19:41 -0500456 # Adding delay after host bring up.
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500457 Sleep 60s
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500458
459RAS Suite Setup
460 [Documentation] Create RAS log directory to store all RAS test logs.
461
462 ${RAS_LOG_DIR_PATH}= Catenate ${EXECDIR}/RAS_logs/
463 Set Suite Variable ${RAS_LOG_DIR_PATH}
Sridevi Rameshb6d7b7e2017-11-07 03:49:52 -0600464 Set Suite Variable ${master_proc_chip} False
465
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500466 Create Directory ${RAS_LOG_DIR_PATH}
467 OperatingSystem.Directory Should Exist ${RAS_LOG_DIR_PATH}
468 Empty Directory ${RAS_LOG_DIR_PATH}
469
Sridevi Ramesh4436af12017-10-30 04:19:41 -0500470 # Boot to Os.
471 REST Power On quiet=${1}
472
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500473RAS Suite Cleanup
474 [Documentation] Perform RAS suite cleanup and verify that host
475 ... boots after test suite run.
476
477 # Boot to OS.
Sridevi Ramesh6bd6b4c2017-10-10 04:38:30 -0500478 REST Power On quiet=${1}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500479 Delete Error Logs
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500480 Gard Operations On OS clear all